vscode-mcp
vscode-mcp
一个 MCP (Model Context Protocol) 服务器,为 VS Code 和 Cursor 提供 Claude IDE 功能。Claude 可以直接在聊天中读取、写入、编辑、搜索和运行工作区中的命令。
工具
工具 | 描述 |
| 读取文件内容,支持可选的行范围 |
| 写入或覆盖文件(自动创建父目录) |
| 替换文件中的精确字符串 |
| 列出文件和目录(支持递归) |
| 创建目录树 |
| 删除文件或目录 |
| 移动或重命名文件/目录 |
| 在文件中进行 Grep 风格的正则搜索 |
| 通过 glob 模式查找文件(例如 |
| 执行任何 Shell 命令并捕获输出 |
| 获取平台、Node 版本、git 分支及状态 |
| 获取文件元数据(大小、修改时间、类型) |
Related MCP server: code-context
安装
npm install
npm run build在 Cursor 中使用
Cursor 从以下位置读取 MCP 服务器配置:
全局:
~/.cursor/mcp.json项目:
.cursor/mcp.json(位于项目根目录)
选项 A — 通过 node 运行(构建后)
添加到你的 Cursor MCP 配置中:
{
"mcpServers": {
"vscode-mcp": {
"command": "node",
"args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
}
}
}选项 B — 通过 npx 运行(无需手动构建)
{
"mcpServers": {
"vscode-mcp": {
"command": "npx",
"args": ["--yes", "vscode-mcp"]
}
}
}编辑配置后,打开 Cursor Settings → Features → MCP 并点击 Refresh(或重启 Cursor)。
在 VS Code + Copilot Chat 中使用(支持 MCP)
添加到你的 VS Code settings.json 中:
"mcp": {
"servers": {
"vscode-mcp": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/vscode-mcp/dist/index.js"]
}
}
}开发
npm run dev # watch mode (recompiles on save)
npm start # run the built server提示
所有路径都可以是 绝对路径 或 相对于工作区根目录的路径。
将
workspace_root传递给任何工具,以将相对路径锚定到特定目录。run_command接受任何 Shell 命令 — 可用于git、npm、代码检查工具、编译器等。search_files会自动跳过node_modules、dist和隐藏文件夹。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceAn MCP server that implements Claude Code-like functionality, allowing the AI to analyze codebases, modify files, execute commands, and manage projects through direct file system interactions.15304MIT
- AlicenseAqualityCmaintenanceAn MCP server that provides dynamic codebase context to Claude Code through tools like hybrid search, recent changes, and symbol definitions, enhancing AI-assisted coding with local RAG.8MIT
- AlicenseNot gradedqualityFmaintenanceMCP server that integrates with VS Code to enable file operations, git diffs, and line highlighting via MCP clients like Claude.42MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that allows Claude Desktop to remotely control Claude Code instances for executing commands and managing files.61GPL 3.0
Related MCP Connectors
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/KloutDevs/vscode-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server