Skip to content

Register with Cursor and VS Code too, and document all of it (#1) - #2

Merged
jepegit merged 1 commit into
mainfrom
multi-client-registration
Sep 5, 2026
Merged

jepegit merged 1 commit into
mainfrom
multi-client-registration

Conversation

@jepegit

@jepegit jepegit commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Closes #1.

Claude Desktop was not a decision — it was the client the design work happened to target, and nothing about the server is specific to it. The question in #1 has no good answer, so this fixes it.

cellpy mcp install                     # Claude Desktop (default, unchanged)
cellpy mcp install --client cursor
cellpy mcp install --client vscode
cellpy mcp install --list-clients      # where each keeps its config

The part that fails silently

Clients differ in two ways. The file location is the obvious one; the other is the top-level key. VS Code reads servers, everyone else reads mcpServers — write the wrong one and the file parses, saves, and does nothing, with no error anywhere and the user believing they registered. The key is now per-client data rather than a constant, and a test pins each.

Client File Key
Claude Desktop %APPDATA%/Claude/claude_desktop_config.json · ~/Library/Application Support/Claude/… · ~/.config/Claude/… mcpServers
Cursor ~/.cursor/mcp.json mcpServers
VS Code %APPDATA%/Code/User/mcp.json · ~/Library/Application Support/Code/User/mcp.json · ~/.config/Code/User/mcp.json servers

Paths verified against the current VS Code and Cursor documentation rather than from memory.

Claude Code is deliberately not written to

Its servers live in ~/.claude.json — alongside the sign-in session and per-project trust decisions — or in a project-scoped .mcp.json whose location depends on which project was meant. claude mcp add exists and handles scopes.

Merging into a file that important to save someone one command is a bad trade, so config_path("claude-code") refuses. The refusal carries the command, filled in with the machine's own interpreter, because a refusal that does not say what to do instead just moves the problem.

Also

  • status reports which clients it can see cellpy registered with, instead of naming one client's config path while supporting three.
  • README gains a Registering with your client section: the table above, the claude mcp add line, a by-hand JSON block, and why to use the full interpreter path — a desktop client activates no virtualenv and inherits no shell PATH, which is the most common reason a server shows up as failed.

Testing

60 tests (was 53). New ones cover each client's path shape, the servers/mcpServers split in both directions, an existing VS Code file keeping its other servers and its inputs, the Claude Code refusal carrying its command, and installing into one client not touching another.

No cellpy change needed — cellpy mcp install --client was already passed straight through to this package.

🤖 Generated with Claude Code

Claude Desktop was not a decision — it was the one client the design work
happened to target, and nothing about the server is specific to it. #1 asked
why, which is a fair question with no good answer.

    cellpy mcp install --client cursor
    cellpy mcp install --client vscode
    cellpy mcp install --list-clients

## The part that fails silently

Clients differ in two ways. The file location is the obvious one. The other is
the top-level key: **VS Code reads `servers`, everyone else reads
`mcpServers`**. Write the wrong one and the file parses, saves, and does
nothing — no error anywhere, and the user is left believing they registered.
So the key is per-client data rather than a constant, and a test asserts each
client gets its own.

## Claude Code is deliberately not written to

Its servers live in `~/.claude.json`, next to the sign-in session and
per-project trust decisions, or in a project-scoped `.mcp.json` whose location
depends on which project was meant. `claude mcp add` exists and handles
scopes.

Merging into a file that important, to save someone one command, is a bad
trade. So `config_path("claude-code")` refuses — and the refusal carries the
command, filled in with this machine's interpreter, because a refusal that
does not say what to do instead just moves the problem.

## Also

- `status` now reports which clients it can see cellpy registered with, rather
  than naming one client's config path while supporting three.
- README gains a "Registering with your client" section: the table of paths
  and keys, the `claude mcp add` line, a by-hand JSON block, and the reason to
  use the full interpreter path — a desktop client activates no virtualenv and
  inherits no shell PATH, which is the most common reason a server shows up as
  failed.

Paths verified against the current VS Code and Cursor documentation rather
than from memory. No cellpy change needed: `cellpy mcp install --client` was
already passed straight through.

Closes #1.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jepegit jepegit mentioned this pull request Sep 5, 2026
@jepegit
jepegit merged commit e2b975c into main Sep 5, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

how to register

1 participant