Connecting an MCP server is not just copying a JSON snippet. Each client has its own scope model, transport support, secret syntax, and file location. A config that works in one client can be ignored, rejected, or silently misread in another.
This guide is the integration path. Use the client center for the full reference on each product and the Config Generator for a file you can inspect and copy.
1. Identify the client and its category
Do not treat every product as the same kind of client:
| Client | Category | Config | Scope |
|---|---|---|---|
| OpenAI Codex | Coding agent | TOML | User, trusted project |
| Claude Code | Coding agent | JSON/CLI | Local, project, user |
| Cursor | Coding agent | JSON | Global, project |
| Windsurf / Devin Desktop | Coding agent | JSON | Global |
| Cline | Editor extension | JSON | Global |
| VS Code / Copilot | Editor extension | JSON | Workspace, profile |
| Groq | API platform | HTTP request | Per request |
Groq is not a desktop client. Its Remote MCP integration is a server-side API request. Do not generate an mcp.json for it, and do not paste a client config into an API request.
2. Choose the scope deliberately
- Project scope is shareable and belongs in the repository. It should contain no secrets.
- User/global scope applies across projects and is convenient for personal tools.
- Local scope in Claude Code is stored per project in a managed file.
For a team, prefer a project config with environment references and a documented setup step. For personal credentials, use user scope or the client’s secret store. Never commit a real token just to make setup faster.
3. Match the transport
- Local process → stdio.
- Shared remote service → Streamable HTTP.
- Legacy SSE → only when the server has no modern endpoint and the client still supports it.
Codex does not document SSE. Claude Code supports it but marks it deprecated. Cursor infers remote transport from the URL. Windsurf uses serverUrl. VS Code uses explicit type values. Copying a URL between clients is not enough; the surrounding shape differs.
4. Generate, then review
The Config Generator emits the exact structure for the selected client. Review:
- The top-level key (mcp_servers, mcpServers, or servers).
- The remote field name (url or serverUrl).
- The transport type values.
- The environment/header placeholder syntax.
- The scope and file path.
Then merge it with existing entries instead of replacing the whole file. A working unrelated server is not improved by being overwritten.
5. Put secrets in the right place
- Claude Code:
${VAR}and${VAR:-default}expansion in .mcp.json. - Cursor:
${env:VAR}interpolation. - Windsurf:
${env:VAR}interpolation. - Codex: literal env values in TOML; use
bearer_token_env_varfor remote bearer tokens. - Cline: replace placeholders or configure through the client; do not assume interpolation.
- VS Code:
${input:id}prompts defined in an inputs array.
A placeholder that the client does not expand is just a bad token. Test with a non-production credential and verify the client’s behavior before relying on the syntax.
6. Curate the tool surface
Connecting a server exposes all of its tools (subject to toolsets and permissions). Before an agent session:
- Disable tools you do not need.
- Prefer read-only tools for exploration.
- Review destructive tools and approval settings.
- Remove servers that do not earn their context cost.
- Keep credentials scoped to the tools’ resources.
More tools can make an agent less reliable. A small, well-described set usually outperforms a large catalog.
7. Verify the connection
For every client:
- Restart or reload the client.
- Confirm the server is listed without a configuration error.
- Inspect the tool list.
- Invoke one read-only tool.
- Try an invalid argument and confirm a visible error.
- Confirm the server reconnects after a client restart.
If configuration fails, paste the file into the Config Doctor. It parses JSON and TOML locally, checks the client shape, and shows a diff for safe fixes. Nothing is uploaded.
8. Run a real task
A connection is not a workflow. Start with a small task that has an observable result:
- Fetch a pull request and summarize it.
- Query a staging database for a known row.
- Open a local page and read its heading.
- Search official docs for an API version.
Then write down what worked, what the agent misunderstood, and which tool description needs improvement. The workflow library contains task-oriented sequences that combine servers with a client and a verification step.
Common integration mistakes
- Editing the wrong scope or file.
- Using an absolute path that does not exist in the client’s environment.
- Relying on PATH in a GUI app.
- Committing a token.
- Mixing
urlandserverUrl. - Using SSE where the client supports only Streamable HTTP.
- Assuming a tool is available because the server connected.
- Treating a configuration parse as a compatibility test.
What “working” means
A client integration is working when the client can discover the intended tools, invoke a read-only tool successfully, show a useful failure for invalid input, and survive a restart without exposing credentials. That is the minimum bar. A full acceptance test should also cover the relevant user workflow and a permission failure.
For client-specific setup, read Codex, Claude Code, Cursor, Windsurf, Cline, and VS Code. For API-style MCP, read Groq.
Sources
Sources were checked on Oct 23, 2026. Versions and client behavior can change; confirm the current documentation before relying on a configuration.