Overview
Visual Studio Code supports MCP (Model Context Protocol) through GitHub Copilot for enhanced AI-powered development capabilities. Through Portkey’s MCP Gateway, you can seamlessly connect any MCP server to VS Code without managing infrastructure or authentication.
Key Benefits
- Secure Authentication: Portkey handles OAuth flows and token management
- Unified Authentication: Single OAuth token to rule them all
- Team Collaboration: Share MCP server configurations, manage access permissions, and ensure everyone on your team has the tools they need—configured correctly, every time
- Complete Observability: See every request, track latency, monitor errors, and understand usage patterns
Prerequisites
Before you begin, ensure you have:
- Visual Studio Code installed (latest version)
- GitHub Copilot access and extension installed
- MCP support enabled in VS Code (enabled by default)
- Portkey account with workspace access
- MCP server registered in Portkey’s MCP Hub
Verify MCP Support
Check that MCP is enabled in VS Code:
- Open Settings (
Cmd/Ctrl + ,)
- Search for
chat.mcp.access
- Ensure it’s not set to
none
Quick Setup
Step 1: Get Your MCP Server URL
- Log in to Portkey Dashboard
- Navigate to MCP Hub → Your Servers
- Copy your server URL:
https://mcp.portkey.ai/:workspace-id/:server-id/mcp
Option A: Workspace Configuration (Recommended for Teams)
- Create a
.vscode/mcp.json file in your workspace root
- Add your Portkey MCP server configuration:
{
"servers": {
"portkey-mcp": {
"type": "http",
"url": "https://mcp.portkey.ai/:workspace-id/:server-id/mcp"
}
}
}
Option B: Using Command Palette
- Open Command Palette (
Cmd/Ctrl + Shift + P)
- Run
MCP: Add Server
- Choose
HTTP as the server type
- Enter your Portkey MCP server URL
- Select
Workspace Settings to save configuration
Step 3: Trust and Start Server
When you first use the MCP server, VS Code will prompt you to confirm trust. Click Trust to enable the server.
Step 4: Authentication
Portkey handles all authentication flows automatically:
-
First Connection: When VS Code first connects to an authenticated MCP server, Portkey will:
- Open your browser for OAuth authorization (if required)
- Store credentials securely
- Maintain session state
-
Subsequent Connections: Authentication tokens are refreshed automatically
-
Team Access: Workspace members share the same authentication scope based on your Portkey settings
Configuration Examples
Single Server Setup
{
"servers": {
"linear-integration": {
"type": "http",
"url": "https://mcp.portkey.ai/ws-abc123/linear-def456/mcp"
}
}
}
Multiple Servers Setup
{
"servers": {
"linear": {
"type": "http",
"url": "https://mcp.portkey.ai/ws-abc123/linear-def456/mcp"
},
"github": {
"type": "http",
"url": "https://mcp.portkey.ai/ws-abc123/github-ghi789/mcp"
},
"slack": {
"type": "http",
"url": "https://mcp.portkey.ai/ws-abc123/slack-jkl012/mcp"
}
}
}
Support
Need help? We’re here for you:
Last modified on January 28, 2026