cursor-mcp-to-github-copilot-port
v1.0.1
Published
Port Cursor ~/.cursor/mcp.json to VS Code .vscode/mcp.json for GitHub Copilot MCP
Maintainers
Readme
Cursor MCP → GitHub Copilot (VS Code) port
npm package: cursor-mcp-to-github-copilot-port
CLI and library that ports your Cursor MCP configuration into the format Visual Studio Code and GitHub Copilot expect, so you can reuse the same MCP servers after switching editors.
What is Model Context Protocol (MCP)?
MCP is an open standard for connecting AI assistants to tools and data outside the model: issue trackers, docs, databases, custom scripts, and more. The editor starts one or more MCP servers (local processes or remote HTTP endpoints). Those servers advertise tools (and sometimes resources and prompts). When you chat in agent mode, the model can call those tools so the assistant can act on your systems with your approval, according to each product’s UI and policies.
How MCP works in Cursor
Configuration file
Cursor stores MCP server definitions in a JSON file, typically~/.cursor/mcp.json(user-wide).Shape of the file
The top-level object usesmcpServers. Each key is a display name; the value describes the server:- Local (stdio):
command, optionalargs,env,envFile. - Remote (HTTP):
url, optionalheaders.
- Local (stdio):
How Cursor uses it
Cursor loads this config, starts or connects to servers, and exposes their tools to Chat, Composer, and related AI flows. The on-disk JSON is the source of truth.This package’s input
The CLI reads that file (default~/.cursor/mcp.json) and expectsmcpServers.
How to enable MCP in VS Code with GitHub Copilot
MCP in VS Code is used from GitHub Copilot Chat (Agent mode and tools). You need a supported VS Code build, Copilot access, and a valid mcp.json.
Prerequisites
- Visual Studio Code 1.99+.
- GitHub Copilot signed in (getting access).
- Copilot Business / Enterprise: org may need “MCP servers in Copilot” enabled (about MCP).
Where VS Code stores MCP config
| Scope | File |
|--------|------|
| Workspace | .vscode/mcp.json |
| User | Profile mcp.json (e.g. macOS ~/Library/Application Support/Code/User/mcp.json) |
Command Palette: MCP: Open Workspace Folder MCP Configuration, MCP: Open User Configuration.
Ways to add servers
- Edit
mcp.jsonmanually —servers,type:stdio|http(reference). - GitHub MCP Registry in Extensions (GitHub docs).
code --add-mcp(VS Code MCP servers).- Optional:
"chat.mcp.discovery.enabled": trueinsettings.jsonto discover configs from apps like Claude Desktop.
Using MCP in the UI
Open Copilot Chat → Agent → tools; start/trust servers; complete Auth for remote servers when prompted.
More: Add and manage MCP servers in VS Code, Extending Copilot Chat with MCP.
What this package does
| It does | It does not |
|--------|------------------|
| Reads Cursor mcp.json (mcpServers) | Install editors or enable Copilot |
| Writes VS Code mcp.json with servers | Start MCP servers |
| Adds type: stdio / http | Map exotic Cursor-only fields |
| Optional Snyk IDE_CONFIG_PATH Cursor → VSCode | Store secrets for you |
It is a config migrator. You still trust, start, and authenticate in VS Code.
How to run this package (step-by-step)
1. Install
npx cursor-mcp-to-github-copilot-port --helpFrom a monorepo clone of this project:
cd packages/cursor-mcp-to-github-copilot-port
node bin/cli.mjs --helpGlobal:
npm install -g cursor-mcp-to-github-copilot-port2. Preview (--dry-run)
npx cursor-mcp-to-github-copilot-port --dry-run3. Write workspace .vscode/mcp.json
cd /path/to/your/project
npx cursor-mcp-to-github-copilot-port --forceUse --merge --force if the file already exists.
4. Or user / Insiders config
npx cursor-mcp-to-github-copilot-port -t user --force
npx cursor-mcp-to-github-copilot-port -t insiders --force5. Open VS Code
Copilot Chat → Agent → tools to start/trust servers.
6. Custom paths
npx cursor-mcp-to-github-copilot-port -s ~/.cursor/mcp.json -o ./.vscode/mcp.json --forceWhy the formats differ
| | Cursor | VS Code + Copilot |
|---|--------|-------------------|
| File | ~/.cursor/mcp.json | .vscode/mcp.json or user mcp.json |
| Key | mcpServers | servers |
| type | Often omitted | Required stdio / http |
What gets converted (details)
- Stdio:
command,args,env,envFile→type: "stdio". SnykIDE_CONFIG_PATH:Cursor→VSCodeunless--no-fix-snyk. - HTTP:
url,headers→type: "http"; emptyheadersomitted. - Names: normalized to camelCase-style ids unless
--no-sanitize-names. inputs: copied if present.
Requirements
- Node.js 18+
- VS Code + Copilot when using the generated config (see above).
CLI reference
| Option | Description |
|--------|-------------|
| -s, --source <path> | Cursor file (default ~/.cursor/mcp.json) |
| -t, --target | workspace | user | insiders | stdout |
| -o, --out <path> | Output path |
| --merge / --force | Merge or overwrite |
| --dry-run | Print JSON only |
| --no-sanitize-names / --no-fix-snyk | Disable renames / Snyk env fix |
| -h, --help | Help |
User mcp.json paths: macOS ~/Library/Application Support/Code/User/mcp.json; Windows %APPDATA%\Code\User\mcp.json; Linux ~/.config/Code/User/mcp.json. Insiders uses Code - Insiders.
Monorepo (full Git repo)
If you install from npm you only get this package. In the full repository, this package lives under packages/cursor-mcp-to-github-copilot-port with a private root package.json and npm run publish:cli.
Development
npm testPublishing
npm publish --access public(from this directory; or npm run publish:cli from monorepo root after npm install)
Security & limitations
Treat mcp.json as sensitive. This CLI does not start servers. Enterprise MCP may be policy-gated. See GitHub: about MCP.
License
MIT (see package.json).
