Skip to main content
Visual Studio Code supports servers through a dedicated mcp.json file. MCP tools are available when you use GitHub Copilot agent features (Copilot Chat with tool use).
You need GitHub Copilot and a recent VS Code build with MCP support. See Add and manage MCP servers in VS Code for the latest UI flows.

Setup

1

Open MCP configuration

Open the Command Palette (Shift+Command+P on macOS, Ctrl+Shift+P on Windows or Linux) and run MCP: Open User Configuration for a personal server, or MCP: Open Workspace Folder MCP Configuration to store config in .vscode/mcp.json for the current project.
2

Add the OpenCX server

Paste this into mcp.json:
{
  "servers": {
    "opencx": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@opencx/mcp"],
      "env": {
        "OPENCX_API_KEY": "your-api-key-here"
      }
    }
  }
}
Replace your-api-key-here with your OpenCX API key.For secrets you prefer not to store in the file, use input variables (for example ${input:opencx-api-key}) and define the corresponding inputs entry in the same mcp.json.
3

Trust and start the server

When VS Code starts the server for the first time, confirm any trust prompts. Use the MCP: List Servers command to see status, logs, and restart options.
4

Verify in Copilot Chat

Open Copilot Chat in agent mode and ask: “List my recent chat sessions.”

Workspace vs user config

LocationPathBest for
Workspace.vscode/mcp.jsonTeam-shared setup (omit secrets from git; use inputs or envFile)
UserOpened via MCP: Open User ConfigurationPersonal OpenCX access across all folders

Debugging

  1. Run MCP: List Servers and select opencx to view output and errors.
  2. Confirm Node.js 18+ is on your PATH in the same environment VS Code uses (node --version in the integrated terminal).
  3. If tools never appear, confirm Copilot Chat is using a model and mode that supports tools (see Use tools with agents).

Get Started

API key setup and all client configs

Cursor

Similar editor-native MCP setup

Prompt Library

Ready-to-use prompts by domain

Troubleshooting

Common issues and fixes