drio
Open app

Code MCP

Source

An MCP Server and companion VSCode Extension.

Catalog onlyCatalog onlySTDIO

Overview

Code MCP is a monorepo that includes the Code MCP Server and its companion VS Code extension, enabling AI agents and assistants to interact with VS Code through the Model Context Protocol.

To use Code MCP, first install the MCP Server using the command npx code-mcp-server install, then install the MCP Extension from the Visual Studio Marketplace.

  • Integration of AI agents with VS Code. - Supports Model Context Protocol for seamless interaction. - Easy installation and configuration for various AI setups.
  1. Enabling AI assistants like Goose and Claude to work within the VS Code environment.
  2. Facilitating AI-driven coding assistance and automation.
  3. Enhancing developer productivity through AI interactions.

Add to your AI client

Use these steps to connect Code MCP in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "code-mcp-block": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "code-mcp-block": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "code-mcp-block": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "code-mcp-block": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "code-mcp-block": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "code-mcp-block": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-mcp-block"
      ]
    }
  }
}

FAQ

What is the Model Context Protocol?

The Model Context Protocol is a framework that allows AI agents to communicate and interact with applications like VS Code.

Is Code MCP free to use?

Yes! Code MCP is open-source and free to use under the Apache License 2.0.

Can I customize the AI agents?

Yes! You can configure the AI agents according to your needs by modifying the setup files.