Skip to content

VS Code Integration

VS Code supports MCP servers for extending GitHub Copilot’s capabilities. mpak bundles integrate with VS Code’s Agent mode.

  • VS Code 1.99+ (April 2025 or later)
  • GitHub Copilot extension
  • Agent mode enabled
.vscode/mcp.json

Commit to share with your team.

  1. Open Command Palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Run “MCP: Add Server”
  3. Select “Command (stdio)”
  4. Enter: mpak run @nimblebraininc/echo

Create .vscode/mcp.json:

{
"servers": {
"echo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/echo"]
}
}
}
{
"servers": {
"echo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/echo"]
},
"ipinfo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/ipinfo"],
"env": {
"IPINFO_API_TOKEN": "your-token"
}
}
}
}

Once configured:

  1. Open the Chat view
  2. Switch to Agent mode (click the mode selector)
  3. 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.

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}"
}
}
}
}

Reference your existing .env:

{
"servers": {
"ipinfo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/ipinfo"],
"envFile": "${workspaceFolder}/.env"
}
}
}

Store secrets with mpak:

Terminal window
mpak config set @nimblebraininc/ipinfo api_key=your-token

Then use a clean config:

{
"servers": {
"ipinfo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/ipinfo"]
}
}
}

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
}
{
"servers": {
"echo": {
"command": "mpak",
"args": ["run", "@nimblebraininc/echo@1.0.0"]
}
}
}
  1. Check MCP server status in the Chat view
  2. View server logs: Command Palette → “MCP: Show Server Logs”
  3. Test the bundle directly: mpak run @package/name

Ensure mpak is installed globally:

Terminal window
npm install -g @nimblebrain/mpak
which mpak

VS Code prompts you to trust MCP servers on first run. This is a security feature - only approve servers from trusted sources.