Skip to main content
Glama

MCP - Agent to VSC

Local MCP server that connects an MCP-capable VS Code agent such as Cline to OpenAI and workspace file tools.

Flow

Cline / VS Code -> MCP (stdio) -> local Node.js server -> OpenAI API

Related MCP server: Code MCP Server

Tools

  • ask_ai — send prompts to OpenAI

  • read_file — read workspace files

  • write_file — write workspace files

  • list_files — list workspace files/directories

  • workspace_info — inspect configuration

Install

Requirements: Node.js 20+.

npm install

Set OPENAI_API_KEY in the environment. Never commit the real key.

PowerShell:

$env:OPENAI_API_KEY="sk-..."
npm start

Cline

Add this server to Cline's MCP settings:

{
  "mcpServers": {
    "mcp-agent-to-vsc": {
      "command": "node",
      "args": ["C:\\path\\to\\mcp-agent-to-vsc\\server.mjs"],
      "env": {
        "OPENAI_API_KEY": "YOUR_API_KEY",
        "OPENAI_MODEL": "gpt-5.6",
        "WORKSPACE_ROOT": "C:\\path\\to\\your\\workspace"
      }
    }
  }
}

For local VS Code MCP configuration, see .vscode/mcp.json.

Security

The server restricts file access to WORKSPACE_ROOT. Keep your API key in an environment variable or an ignored .env file.

Available Tools

5 tools
ask_aiC

Send a prompt to OpenAI and return the answer.

Inputs: prompt (required), model, system.

list_filesB

List files and directories in the workspace.

Inputs: path.

read_fileA

Read a file inside the VS Code workspace.

Inputs: path (required), max_chars.

workspace_infoA

Show MCP workspace and model configuration.

Inputs: no named parameters.

write_fileC

Write a file inside the VS Code workspace.

Inputs: path (required), content (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct function: AI query, file read, file write, file listing, and workspace configuration. There is no functional overlap, so an agent can reliably select the correct tool.

    Naming Consistency4/5

    Most names follow a verb_noun pattern (ask_ai, read_file, write_file, list_files), but workspace_info breaks the pattern as a noun phrase. Overall the naming is clear and predictable.

    Tool Count5/5

    Five tools is a well-scoped set for an agent-to-VS Code integration covering the essential file operations, AI interaction, and workspace context. Each tool earns its place without redundancy.

    Completeness4/5

    The set covers core file read/write/list and AI query, which covers common agent workflows. Minor gaps include delete or rename file operations, but these are not critical for the apparent purpose.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      D
      maintenance
      An experimental MCP server that enables AI assistants to interact with VS Code workspaces through file operations, code execution, and Git management. It also provides tools for Docker integration, project scaffolding, and secure command execution using project-specific configurations.
      76
      13 npm
      3
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Experimental MCP server for local LLM orchestration with filesystem tools (read, write, list, delete files) and a CLI agent that communicates via Ollama.
      ISC