VS Code Integration
VS Code supports MCP servers for extending GitHub Copilot’s capabilities. mpak bundles integrate with VS Code’s Agent mode.
Prerequisites
Section titled “Prerequisites”- VS Code 1.99+ (April 2025 or later)
- GitHub Copilot extension
- Agent mode enabled
Configuration File Location
Section titled “Configuration File Location”.vscode/mcp.jsonCommit to share with your team.
Open Command Palette → “Preferences: Open User Settings (JSON)”
Add under "mcp.servers":
{ "mcp.servers": { "echo": { "command": "mpak", "args": ["run", "@nimblebraininc/echo"] } }}Quick Setup
Section titled “Quick Setup”Using Command Palette
Section titled “Using Command Palette”- Open Command Palette (
Cmd+Shift+P/Ctrl+Shift+P) - Run “MCP: Add Server”
- Select “Command (stdio)”
- Enter:
mpak run @nimblebraininc/echo
Manual Configuration
Section titled “Manual Configuration”Create .vscode/mcp.json:
{ "servers": { "echo": { "command": "mpak", "args": ["run", "@nimblebraininc/echo"] } }}Multiple Servers
Section titled “Multiple Servers”{ "servers": { "echo": { "command": "mpak", "args": ["run", "@nimblebraininc/echo"] }, "ipinfo": { "command": "mpak", "args": ["run", "@nimblebraininc/ipinfo"], "env": { "IPINFO_API_TOKEN": "your-token" } } }}Using MCP Servers
Section titled “Using MCP Servers”Once configured:
- Open the Chat view
- Switch to Agent mode (click the mode selector)
- Copilot will automatically use MCP tools when relevant
You’ll be prompted to approve tool usage the first time. Enable “Yolo mode” in settings to auto-approve.
Configuration with Secrets
Section titled “Configuration with Secrets”Option 1: Input Variables (Recommended)
Section titled “Option 1: Input Variables (Recommended)”VS Code can prompt for secrets and store them encrypted:
{ "inputs": [ { "id": "ipinfo-token", "type": "promptString", "description": "IPInfo API Token", "password": true } ], "servers": { "ipinfo": { "command": "mpak", "args": ["run", "@nimblebraininc/ipinfo"], "env": { "IPINFO_API_TOKEN": "${input:ipinfo-token}" } } }}Option 2: .env File
Section titled “Option 2: .env File”Reference your existing .env:
{ "servers": { "ipinfo": { "command": "mpak", "args": ["run", "@nimblebraininc/ipinfo"], "envFile": "${workspaceFolder}/.env" } }}Option 3: mpak config
Section titled “Option 3: mpak config”Store secrets with mpak:
mpak config set @nimblebraininc/ipinfo api_key=your-tokenThen use a clean config:
{ "servers": { "ipinfo": { "command": "mpak", "args": ["run", "@nimblebraininc/ipinfo"] } }}Auto-Discovery
Section titled “Auto-Discovery”VS Code can discover MCP servers from Claude Desktop. If you already have servers configured there, enable auto-discovery in VS Code settings:
{ "chat.mcp.discovery.enabled": true}Pin to a Specific Version
Section titled “Pin to a Specific Version”{ "servers": { "echo": { "command": "mpak", "args": ["run", "@nimblebraininc/echo@1.0.0"] } }}Troubleshooting
Section titled “Troubleshooting”Server Not Starting
Section titled “Server Not Starting”- Check MCP server status in the Chat view
- View server logs: Command Palette → “MCP: Show Server Logs”
- Test the bundle directly:
mpak run @package/name
Command Not Found
Section titled “Command Not Found”Ensure mpak is installed globally:
npm install -g @nimblebrain/mpakwhich mpakTrust Prompt
Section titled “Trust Prompt”VS Code prompts you to trust MCP servers on first run. This is a security feature - only approve servers from trusted sources.