claude-vscode-mcp

KodachiQube/claude-vscode-mcp

3.2

If you are the rightful owner of claude-vscode-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Claude VS Code MCP Integration is a sophisticated system designed to enhance the capabilities of Claude within the Visual Studio Code environment, focusing on efficient context management and long development sessions.

Tools
5
Resources
0
Prompts
0

Claude VS Code MCP Integration

A VS Code Extension + MCP Server that gives Claude full IDE capabilities while aggressively optimizing context usage to maintain long development sessions.

Architecture

Claude Desktop → MCP Server → VS Code Extension
                     ↓
              Context Optimizer
                     ↓
              Cached State Manager

Features

  • Context-Efficient Communication: Minimal token usage for maximum functionality
  • Progressive Disclosure: Start with summaries, drill down only when needed
  • Smart Caching: LRU cache for frequently accessed information
  • Task-Oriented Tools: High-level operations that understand developer intent
  • Stateful Operations: Maintain context across multiple operations

Quick Setup

# Clone and setup
git clone https://github.com/KodachiQube/claude-vscode-mcp.git
cd claude-vscode-mcp
chmod +x scripts/setup.sh
./scripts/setup.sh

Manual Setup

1. Build VS Code Extension

cd extension
npm install
npm run compile
npx vsce package --no-dependencies
code --install-extension *.vsix

2. Build MCP Server

cd mcp-server
npm install
npm run build
npm link

3. Update Claude Config

The setup script will automatically update your Claude config. If it fails, manually add:

{
  "mcpServers": {
    "vscode-efficient": {
      "command": "claude-vscode-mcp",
      "env": {
        "NODE_ENV": "production"
      }
    }
  }
}

Available Tools

Task Management

  • start_development_task - Begin a development task (bug fix, feature, refactor, test)
  • set_focus - Set focus on a specific file and line

Code Analysis

  • check_code - Quick health check of code (~20 tokens)
  • get_errors - Get detailed error information for focused code
  • get_hover_info - Get type/documentation info
  • get_references - Get reference summary

Refactoring

  • smart_refactor - Preview refactoring operations
  • apply_last_refactor - Apply the previewed refactor

Search

  • search_symbols - Search workspace symbols efficiently

Development

Watch Mode

# Terminal 1: VS Code Extension
cd extension && npm run watch

# Terminal 2: MCP Server
cd mcp-server && npm run dev

Testing

After setup, restart both Claude Desktop and VS Code, then try:

"Start a development task to fix the authentication bug in the login component"

This should return a minimal (~50 token) response with relevant context.

Context Usage Guidelines

  1. Always start minimal - Use check_code first
  2. Progressive detail - Only request details when needed
  3. Cache everything - Reuse previous queries
  4. Batch operations - Group related requests
  5. Smart summaries - Return counts, not lists

Architecture Details

VS Code Extension

  • Provides WebSocket bridge on port 43000
  • Manages context with LRU caching
  • Handles VS Code API interactions

MCP Server

  • Connects to VS Code via WebSocket
  • Provides context-efficient tools
  • Maintains session state

Communication Protocol

  • JSON-RPC style messages
  • Minimal response formats
  • Progressive disclosure patterns

License

MIT