Experimental MCP server for VS Code workspace interaction
Code MCP Server
⚠️ Experimental Project - This is an experimental MCP server for VS Code integration. While it includes comprehensive testing, it's still in active development. Use with caution in production environments and expect potential breaking changes.
An experimental Model Context Protocol (MCP) server that aims to enable AI assistants like Claude to interact with VS Code workspaces. This project attempts to provide development tools for file operations, code execution, Git management, Docker integration, and project management, though it's still evolving and may have limitations.
Inspired by codemcp - This experimental project adapts security and configuration concepts from the codemcp project, exploring project-specific TOML configuration, restricted command execution, and session management features. We're learning and iterating on these concepts.
✨ Key Features (Experimental)
- 🎯 Workspace Management - Attempts to provide smart VS Code workspace detection and path validation
- 🛡️ Project Configuration - Experimental
.vscode-mcp.tomlconfiguration system for project-specific settings - 📂 File Operations - Basic file CRUD operations, search, and comparison features
- ⚡ Code Execution - Experimental support for Python and JavaScript execution with package management
- 🔧 Git Integration - Git workflow tools with diff analysis (still being refined)
- 🐳 Docker Integration - Basic Docker container and image operations
- 🏗️ Project Scaffolding - Template-based project creation (limited framework support)
- 🔍 Code Analysis - Experimental code analysis and quality metrics
Note: All features are experimental and may not work perfectly in all environments. We're actively working to improve reliability and coverage.
🚀 Quick Start
⚠️ Experimental Software: Please test thoroughly in development environments before using with important projects. This MCP server is under active development and may have unexpected behaviors.
Method 1: NPM Installation (Experimental)
Try the experimental package installation:
# Install globally (experimental)
npm install -g code-mcp
# Or use with npx (recommended for testing)
npx code-mcp --help
Experimental Claude Desktop integration:
# Generate configuration (may need adjustments)
npx code-mcp --config
# Follow the instructions to add the config to Claude Desktop
Manual Claude Desktop Configuration: Add this to your Claude Desktop config file:
{
"mcpServers": {
"code-mcp": {
"command": "npx",
"args": ["code-mcp"],
"env": { "NODE_ENV": "production" }
}
}
}
Method 2: Local Development Installation
Prerequisites
- Node.js 18+ with ES Modules support
- pnpm 8+ (recommended package manager)
- VS Code (any recent version)
- Claude Desktop or other MCP-compatible AI
Installation
Clone and build:
git clone https://github.com/agentics-ai/code-mcp.git cd code-mcp pnpm install && pnpm run buildAuto-configure Claude Desktop:
# macOS/Linux ./scripts/generate-claude-config.sh # Windows scripts\generate-claude-config.batManual configuration (if needed):
Add to your Claude Desktop config file:
{ "mcpServers": { "code-mcp": { "command": "node", "args": ["/path/to/code-mcp/dist/src/index.js"], "env": { "NODE_ENV": "production" } } } }Test installation:
pnpm test # Run 473 testsRestart Claude Desktop and ask: "What development tools are available?"
⚙️ Project Configuration (Experimental)
This experimental feature allows creating a .vscode-mcp.toml file in your project root for project-specific settings. Please note that this configuration system is still being developed and may change:
[general]
projectName = "My Project"
autoCommit = true # Experimental feature
sessionTracking = true # Still in development
[security]
# Experimental allowlist-based security
allowedCommands = [
"npm install", "npm test", "npm run build",
"git status", "git add .", "git commit",
"python -m pytest", "docker build"
]
commandTimeout = 300
[project]
language = "typescript"
framewor
Tools (4)
file_operationsPerform basic file CRUD operations, search, and comparison within the workspace.code_executionExecute Python and JavaScript code with package management support.git_managementPerform Git workflow operations including diff analysis.docker_integrationManage Docker containers and images.Environment Variables
NODE_ENVSets the environment mode for the serverConfiguration
{"mcpServers": {"code-mcp": {"command": "npx", "args": ["code-mcp"], "env": { "NODE_ENV": "production" }}}}