connect and login write the MCP entry for five apps. This page is what each app needs beyond that file, and how to write the entry by hand for any other client.
How to use it
| App | File written | After writing |
|---|---|---|
| Claude Code | .mcp.json (mcpServers.designsource) |
It asks once to allow the server. /mcp__designsource__integrate-design-system runs the guide. |
| Cursor | .cursor/mcp.json (mcpServers.designsource, type: "stdio") |
Restart Cursor. |
| VS Code (Copilot) | .vscode/mcp.json (servers.designsource, type: "stdio") |
Restart VS Code. |
| Codex | .codex/config.toml ([mcp_servers.designsource], startup_timeout_sec = 60) |
Trust the project in Codex when it asks; it reads the file only then. |
| Gemini CLI | .gemini/settings.json (mcpServers.designsource) |
With folder trust on, trust the folder; otherwise it skips the file. |
Headless Claude Code (claude -p) needs the tools allowed: --allowedTools "mcp__designsource__*". An interactive session prompts instead.
Any other client. The server is plain stdio MCP, so write the same command in the client's own shape; the Connect an agent dialog's Other apps fold holds the three shapes with a placeholder where the token goes. Windsurf and Cline take the mcpServers JSON:
{
"mcpServers": {
"designsource": {
"command": "npx",
"args": ["-y", "designsource", "mcp"],
"env": { "DS_SYNC_TOKEN": "<project token>" }
}
}
}Codex by hand, in ~/.codex/config.toml:
[mcp_servers.designsource]
command = "npx"
args = ["-y", "designsource", "mcp"]
env = { DS_SYNC_TOKEN = "<project token>" }VS Code by hand uses servers with "type": "stdio". A file with a token in its env belongs out of version control.
How it works
Every written entry runs npx -y designsource@latest mcp (with --project <id> from connect, with nothing from login): @latest so a cached older command line never serves an old server, plain npx since the file is committed across systems. Only the designsource entry is touched; your other servers stay. A file with comments or one that is not plain JSON is left alone and the entry is printed for you to add. An entry already naming the same project is left as it is, so teammates on other systems do not rewrite each other's.
A server started from a committed entry trusts only what it should: a saved token goes only to the server it was saved for, an --api naming another server in a repository's file gets nothing, and the account sign-in applies only in folders you ran login in.
Windsurf has no project-level file, so connect does not write one; use the snippet.
What can go wrong
- Claude Code on Windows may need
npxthroughcmd /c. Changing the committed file changes it for everyone; add it in your own local scope instead:claude mcp add --scope local designsource -- cmd /c npx -y designsource@latest mcp --project <project id>. - Codex or Gemini CLI does not list the tools: trust the folder in the app;
connectandloginprint the reminder for those two. - A rotated project token: run
connectagain in a terminal; the running server reads the new token on its next call. - A tool list without
add_ui_kitor the account tools: the cached command line is older than the server; the entry's@latestfixes it on the next start.
Related
connectandlogin: what the files hold and where the credentials go.- How agents use a design system.