mcp-agent-to-vsc
Provides a tool to send prompts to OpenAI's API and retrieve responses.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-agent-to-vsc Read package.json and use AI to list dependencies"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 OpenAIread_file— read workspace fileswrite_file— write workspace fileslist_files— list workspace files/directoriesworkspace_info— inspect configuration
Install
Requirements: Node.js 20+.
npm installSet OPENAI_API_KEY in the environment. Never commit the real key.
PowerShell:
$env:OPENAI_API_KEY="sk-..."
npm startCline
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 toolsask_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
Scored across 5 tools
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.
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.
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.
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
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- AlicenseAqualityAmaintenanceFilesystem MCP server for AI assistants. Search, read, edit, and manage local files in directories you choose.6141,264 npm32MIT
- AlicenseCqualityDmaintenanceAn 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.7613 npm3MIT
- AlicenseNot gradedqualityCmaintenanceLocal MCP server bridging ChatGPT Web to local tools for file, shell, git, test, and process management with secure policy controls.MIT
- AlicenseNot gradedqualityDmaintenanceExperimental MCP server for local LLM orchestration with filesystem tools (read, write, list, delete files) and a CLI agent that communicates via Ollama.ISC