Skip to content
All documentation

Share MCP servers across AI clients

You set up an MCP server in Claude Code and now want it in Cursor, Codex or VS Code as well. Every AI client keeps its MCP servers in a file of its own, under a key of its own, and Codex even in a format of its own, so a server added in one client stays unknown to all the others. This page shows where the files are and three ways to keep several clients on the same servers, with what each one costs.

Where each client keeps its servers

  • Claude Code: .mcp.json in the project, or ~/.claude.json for your user, under mcpServers.
  • Cursor: .cursor/mcp.json in the project, or ~/.cursor/mcp.json, under mcpServers.
  • Codex: ~/.codex/config.toml, or .codex/config.toml in the project, as TOML tables named [mcp_servers.<name>].
  • VS Code (GitHub Copilot): .vscode/mcp.json in the project, under servers.

The MCP config converter lists every client it converts, with every path and the date it was checked against the client’s own documentation.

Way 1: copy and convert by hand

You copy the entry from one file into the next. For a local server that is started by a command, this is mostly copy and paste between clients that share mcpServers, such as Claude Code and Cursor. Remote servers differ more: Claude Code and VS Code want a type, and Claude Desktop keeps them out of its file altogether. Variables are written differently too: ${NAME} in Claude Code, ${env:NAME} in Cursor and VS Code. The MCP config converter does the conversion in your browser and says what it had to leave out.

What it costs: every new server and every changed token means one edit per client and per machine, and every file holds its own copy of each credential.

Way 2: a project file in the repository

Servers that belong to one project can live in the project itself: Claude Code reads .mcp.json, Cursor .cursor/mcp.json, VS Code .vscode/mcp.json and Codex .codex/config.toml from the project folder. Committed to the repository, they give everybody who works on it the same servers.

What it costs: it is still one file per client. A token must never be committed, so each file refers to an environment variable that every person sets on their own machine. Servers you use in every project stay in each client’s user file.

Way 3: one remote address for every client

Each client connects once to one remote MCP server that holds the other servers for it. With OnlyMCP that address is https://only-mcp.com/api/mcp. You connect GitHub, Linear or your own server once in the dashboard, and its tools appear in every connected client, on every machine, prefixed with the name of the connection. The credentials are stored encrypted on the server: a client holds only its own OnlyMCP credential, and each device can be revoked on its own. How each client connects is on supported clients. The same address also carries your skills, agents and memory, see what OnlyMCP is.

What it costs: a hosted service sits between your clients and your servers, and only remote servers reachable over https can be connected. A server that runs as a local program, such as one that reads files on your disk, stays in each client’s own file, see connectable MCP servers. OnlyMCP has a free plan; what each plan includes is on pricing.

Which way fits

  • One client on one machine: the client’s own file is enough.
  • A team repository: project files, converted once per client.
  • Several clients or machines with the same servers and tokens: one address for all of them.

Where to go next