Skip to content
| Marketplace
Sign in
Visual Studio Code>Chat>MCP BridgeNew to Visual Studio Code? Get it now.
MCP Bridge

MCP Bridge

Allan Santos

|
1 install
| (0) | Free
Bridge MCP servers to VS Code Copilot Chat — exposes MCP tools as extension tools via vscode.lm.registerTool()
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

MCP Bridge

VS Code Marketplace Version Installs Rating License: MIT

Bridge MCP servers to VS Code Copilot Chat — expose any MCP tool as a native Copilot Chat tool via vscode.lm.registerTool().

In corporate environments where native MCP support in VS Code Chat is blocked by policy, MCP Bridge provides an alternative path: it connects to MCP servers as a regular VS Code extension and exposes their tools to Copilot Chat.


✨ Features

  • 🔌 Multi-server support — Connect to any number of MCP servers simultaneously
  • 🚀 All transports — Stdio, SSE, and Streamable HTTP
  • 🛠️ Tool bridging — MCP tools appear as VS Code language model tools accessible in Copilot Chat
  • 🔒 OAuth 2.1 + PKCE — Built-in authentication for HTTP-based MCP servers
  • 🔄 Auto-reconnection — Exponential backoff reconnection when servers disconnect
  • 🔍 Server discovery — Automatically detect servers from VS Code, Claude Desktop, and Cursor configs
  • 🌲 Sidebar TreeView — Visual management of servers, tools, resources, and prompts
  • 🎯 Dual registration — Generic bridge tool + individual per-server tools
  • 🔐 SecretStorage — OAuth tokens stored securely via VS Code SecretStorage

🚀 Quick Start

  1. Install the extension from the VS Code Marketplace
  2. Add a server via the command palette (MCP Bridge: Add Server) or in settings.json:
{
  "mcpBridge.servers": {
    "my-server": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-atlassian"],
      "env": {
        "ATLASSIAN_API_TOKEN": "${env:ATLASSIAN_API_TOKEN}"
      }
    }
  }
}
  1. Use in Copilot Chat — Reference #mcpTool or use @mcp /tools to discover available tools

⚙️ Configuration

Add MCP servers to your VS Code settings.json under mcpBridge.servers:

{
  "mcpBridge.servers": {
    "atlassian": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@anthropic/mcp-server-atlassian"],
      "env": {
        "ATLASSIAN_API_TOKEN": "${env:ATLASSIAN_API_TOKEN}"
      },
      "enabled": true
    },
    "my-api": {
      "type": "sse",
      "url": "http://localhost:3000/sse",
      "headers": {
        "Authorization": "Bearer ${env:MY_API_TOKEN}"
      }
    },
    "remote": {
      "type": "streamable-http",
      "url": "https://mcp.example.com/api"
    }
  }
}

Server Options

Property Type Required Description
type "stdio" \| "sse" \| "streamable-http" Yes Transport type
command string stdio only Command to run
args string[] No Command arguments
env object No Environment variables (stdio). Supports ${env:VAR}
url string sse/http Server URL
headers object No HTTP headers. Supports ${env:VAR}
oauth object No OAuth 2.1 configuration for HTTP transports
enabled boolean No Enable/disable (default: true)

Global Settings

Setting Default Description
mcpBridge.toolCallTimeout 30000 Timeout in ms for MCP tool calls (0 = no timeout)

🌐 Supported Transports

Transport Use Case Auth
stdio Local CLI tools (npx, python, etc.) Env vars
SSE Server-Sent Events endpoints Headers, OAuth 2.1
streamable-http Modern HTTP-based MCP servers Headers, OAuth 2.1

🛠️ Available Tools

MCP Bridge registers 9 management tools accessible via Copilot Chat:

Tool Reference Description
mcp-bridge_call_tool #mcpTool Call any MCP tool by server + tool name
mcp-bridge_list_servers #mcpList List all servers with status and counts
mcp-bridge_add_server #mcpAdd Add a new MCP server
mcp-bridge_remove_server #mcpRemove Remove a server
mcp-bridge_toggle_server #mcpToggle Enable/disable a server
mcp-bridge_reconnect_server #mcpReconnect Reconnect a server
mcp-bridge_get_server_logs #mcpLogs Get recent server logs
mcp-bridge_diagnose_server #mcpDiagnose Run comprehensive server diagnosis
mcp-bridge_list_tools #mcpTools List tools from connected servers

💬 Commands

Command Description
MCP Bridge: Add Server Add a new MCP server via UI wizard
MCP Bridge: Remove Server Remove a server configuration
MCP Bridge: Reconnect Server Reconnect a specific server
MCP Bridge: Enable/Disable Server Toggle a server on/off
MCP Bridge: Reconnect All Servers Reconnect all servers at once
MCP Bridge: Refresh Server List Refresh the sidebar view
MCP Bridge: Scan for MCP Servers Discover servers from external configs
MCP Bridge: Import Discovered Server Import a discovered server
MCP Bridge: Import All Discovered Servers Import all discovered servers

🏗️ Architecture Overview

┌─────────────────────────────────────────────────────┐
│                    VS Code                          │
│                                                     │
│  ┌──────────┐    ┌──────────────┐    ┌──────────┐  │
│  │ Copilot  │◄──►│  MCP Bridge  │◄──►│ Sidebar  │  │
│  │  Chat    │    │  Extension   │    │ TreeView │  │
│  └──────────┘    └──────┬───────┘    └──────────┘  │
│                         │                           │
│         vscode.lm.registerTool()                    │
└─────────────────────────┬───────────────────────────┘
                          │
              ┌───────────┼───────────┐
              ▼           ▼           ▼
         ┌────────┐  ┌────────┐  ┌────────┐
         │ stdio  │  │  SSE   │  │  HTTP  │
         │ server │  │ server │  │ server │
         └────────┘  └────────┘  └────────┘
src/
├── extension.ts           # Activation — wires all modules
├── types.ts               # Shared TypeScript interfaces
├── mcp/
│   ├── transport.ts       # Transport factory (Stdio/SSE/StreamableHTTP)
│   ├── client.ts          # MCP Client wrapper
│   └── manager.ts         # Multi-connection manager with reconnection
├── tools/
│   └── provider.ts        # Tool registration bridge (vscode.lm.registerTool)
├── sidebar/
│   ├── tree-provider.ts   # TreeDataProvider
│   └── commands.ts        # Sidebar commands
└── config/
    └── settings.ts        # Configuration management

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Development

npm install
npm run build     # Production build with esbuild
npm run watch     # Watch mode for development
npm run compile   # Type check
npm run test      # Run tests

📄 License

This project is licensed under the MIT License — see the LICENSE file for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft