Code MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add code-mcp -- npx code-mcp
README.md

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.toml configuration 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

  1. Clone and build:

    git clone https://github.com/agentics-ai/code-mcp.git
    cd code-mcp
    pnpm install && pnpm run build
    
  2. Auto-configure Claude Desktop:

    # macOS/Linux
    ./scripts/generate-claude-config.sh
    
    # Windows
    scripts\generate-claude-config.bat
    
  3. Manual 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" }
        }
      }
    }
    
  4. Test installation:

    pnpm test  # Run 473 tests
    

    Restart 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 server

Configuration

claude_desktop_config.json
{"mcpServers": {"code-mcp": {"command": "npx", "args": ["code-mcp"], "env": { "NODE_ENV": "production" }}}}

Try it

What development tools are available in this workspace?
Find all Python files in my project and run the tests.
Show me the current Git status and create a diff of the recent changes.
Build the Docker container defined in the project root.
Create a new project scaffold using the typescript template.

Frequently Asked Questions

What are the key features of Code MCP Server?

Smart VS Code workspace detection and path validation. Project-specific configuration via .vscode-mcp.toml. Integrated file CRUD operations and search. Support for Python and JavaScript code execution. Git workflow tools with diff analysis.

What can I use Code MCP Server for?

Automating repetitive file management tasks within a VS Code workspace. Running project-specific tests directly through AI commands. Managing Git commits and diffs without leaving the AI chat interface. Orchestrating Docker container builds for local development environments.

How do I install Code MCP Server?

Install Code MCP Server by running: npx code-mcp

What MCP clients work with Code MCP Server?

Code MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Code MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare