Transform your VSCode into a powerful MCP server - Give AI assistants seamless access to your entire development environment with intelligent multi-instance coordination.
- Install the CodeBridge MCP extension in VSCode
- Extension automatically starts as MCP server on port
9100 - Your VSCode is now accessible via MCP! π
claude mcp add --transport http codebridge http://localhost:9100/mcp{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"codebridge-mcp": {
"type": "local",
"command": [
"npx", "mcp-remote", "http://localhost:9100/mcp",
"--allow-http", "--transport", "http-only"
],
"enabled": true
}
}
}{
"mcpServers": {
"codebridge-mcp": {
"command": "npx",
"args": [
"mcp-remote", "http://localhost:9100/mcp",
"--allow-http", "--transport", "http-only"
]
}
}
}http://localhost:9100/mcp
- Multi-Instance Support: React frontend (VSCode #1) + Node.js backend (VSCode #2) + Mobile app (VSCode #3) - all accessible through one MCP connection
- Intelligent Routing: AI automatically knows which workspace to target for each request
- Live Context: Real-time diagnostics, open files, and editor state - not just static files
- Zero Setup: Works with your existing VSCode setup, no LSP configuration needed
- Real-Time Analysis: AI sees live diagnostics and errors as you code
- Cross-Project Intelligence: AI understands relationships between frontend/backend code
- Context-Aware Suggestions: Based on your actual workspace state and current selection
- Rich Metadata: Symbols, references, definitions - full IDE context for AI
get_workspaces- Discover all VSCode instances and workspace foldersget_diagnostics- Live LSP diagnostics with workspace targetingget_open_files- Open files across all instances (aggregated)get_file_content- File content with workspace-specific routingget_selection- Selected text and context with workspace targetingfind_references- Cross-workspace symbol referencesfind_definition- Symbol definitions with workspace routingget_workspace_symbols- Symbol search across all workspacessearch_files- File search with workspace filtering
- VSCode 1.80.0+ - The extension runs inside VSCode
- Node.js 18+ - For MCP client connections (if using npm-based clients)
- No external dependencies - Everything is self-contained in the extension
Note: The extension creates an HTTP MCP server that any MCP-compatible client can connect to.
codebridge-mcp.server.autoStart: Auto-start MCP server on activation (default: true)codebridge-mcp.server.port: Preferred MCP server port (default: 9100)codebridge-mcp.debug.enableLogging: Debug logging for troubleshooting (default: false)
codebridge-mcp.coordination.enabled: Enable multi-instance coordination (default: true)codebridge-mcp.coordination.mode: Force coordination mode - "auto", "master", "worker", "standalone" (default: "auto")codebridge-mcp.coordination.masterPort: Master instance port (default: 9100)codebridge-mcp.coordination.workerPortRange: Worker port range (default: [9101, 9199])
codebridge-mcp.failover.enabled: Enable automatic failover (default: true)codebridge-mcp.failover.electionTimeout: Leader election timeout in ms (default: 5000)codebridge-mcp.failover.healthCheckInterval: Health check frequency in ms (default: 3000)
CodeBridge MCP: Start Server- Start the MCP serverCodeBridge MCP: Stop Server- Stop the MCP serverCodeBridge MCP: Show Server Status- Display server and workspace infoCodeBridge MCP: Toggle Debug Logging- Enable/disable debug logging
CodeBridge MCP: Show Coordination Status- Display master/worker status and connectionsCodeBridge MCP: List Connected Instances- Show all connected VSCode instancesCodeBridge MCP: Force Master Mode- Override coordination detection (advanced)CodeBridge MCP: Reset Coordination- Restart coordination system
// Discover all your workspaces
await client.callTool("get_workspaces", {});
// Get real-time diagnostics from your code
await client.callTool("get_diagnostics", {
workspace: "MyProject"
});
// Access your open files
await client.callTool("get_open_files", {});
// Get your current selection
await client.callTool("get_selection", {});Perfect for full-stack development - have separate VSCode instances for frontend, backend, mobile app, etc., all accessible through one MCP connection!
Example workflow:
VSCode #1: React Frontend (port 9100 - Master)
VSCode #2: Node.js Backend (port 9101 - Worker)
VSCode #3: Mobile App (port 9102 - Worker)
β AI Assistant connects once to port 9100
β Gets unified access to all three codebases
β Can analyze frontend/backend interactions
β Routes tools to the right project automatically
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β VSCode #1 β β VSCode #2 β β VSCode #3 β
β (Master) β β (Worker) β β (Worker) β
β Port: 9100 βββββΊβ Port: 9101 β β Port: 9102 β
β βββββββββββββ β β βββββββββββββ β β βββββββββββββ β
β βMCP Server β β β βLocal Toolsβ β β βLocal Toolsβ β
β β+ Coord β β β β β β β β β β
β βββββββββββββ β β βββββββββββββ β β βββββββββββββ β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β²
β
ββββββββββββββ
β MCP Client β (Always connects to port 9100)
ββββββββββββββ
- Express.js: HTTP server and coordination endpoints
- @modelcontextprotocol/sdk: Standards-compliant MCP transport
- VSCode API: Direct access for optimal performance
- TypeScript: Full type safety and robust error handling
- Leader Election: Raft-inspired consensus for fault tolerance
Build and package the extension:
# Install dependencies
bun install
# Build the extension
bun run build
# Package for distribution
bun run package
# Run in development mode
bun run devIf port 9100 is occupied, the extension will automatically find the next available port (9101, 9102, etc.). Check VSCode status bar or run CodeBridge MCP: Show Server Status to see the actual port.
- Ensure VSCode extension is running (
CodeBridge MCP: Show Server Status) - Verify the MCP endpoint URL matches your server port
- Check firewall settings allow localhost connections
- Enable debug logging:
CodeBridge MCP: Toggle Debug Logging
- Only connect MCP clients to the master instance (usually port 9100)
- Use
CodeBridge MCP: Show Coordination Statusto check master/worker roles - Reset coordination if needed:
CodeBridge MCP: Reset Coordination
# Install dependencies
bun install
# Build the extension
bun run build
# Package for distribution
bun run package
# Run in development mode
bun run devSee DEVELOPMENT.md for technical details and contribution guidelines.