SolveLang Blog · MCP
How do I add an MCP server to Claude Code?
Published
One command adds a local MCP server to Claude Code: claude mcp add, the server's name, two dashes, and the command that starts the server. For example, to add a server that runs over npx: claude mcp add my-server -- npx -y my-mcp-server. Everything after the double dash is the command Claude Code will run, exactly as your shell would.
Scopes: where the config lives
Claude Code has three scopes, and picking the wrong one is the most common reason a server 'disappears'. Local scope (the default) writes to your user config, ~/.claude.json, and applies to you in one project. Project scope writes .mcp.json in the repository root — the file you commit so the whole team gets the same servers, and the one Claude Code asks you to approve before first use. User scope applies to every project on your machine.
Note that Claude Code and Claude Desktop use different configuration files. Desktop reads claude_desktop_config.json and needs a full quit and restart to notice changes; editing that file does nothing for Claude Code, and vice versa. Half of all 'my MCP server isn't showing up' reports are this file mix-up.
Verify, and remote servers
Verify with claude mcp list from the shell, or /mcp inside a session — both show the configured servers and whether they connected. A server that is listed but not connected usually failed to start: run its command by hand and read the error, which is almost always a PATH or missing-runtime problem.
Remote servers use HTTP instead of a local command: claude mcp add --transport http my-server https://example.com/mcp. If the server needs OAuth, the /mcp panel inside a session walks the sign-in flow. Environment variables for a server go in its config entry — remember they are stored in plain text in the config file, so treat ~/.claude.json and .mcp.json as files that can hold secrets.
The safety check before you add anything
An MCP server runs with your permissions and its tools become instructions your agent will follow. The OWASP MCP Top 10 lists tool poisoning — malicious or later-changed tool descriptions that steer the agent — as a core risk, and measurements of public remote servers have found a large share accepting connections with no authentication at all. Add servers the way you would install software: from publishers you can identify, pinned where possible, with the smallest scope that works.
SolveLang's own MCP server follows that shape: it is published as @solvelang/mcp-server and listed in the official MCP registry under io.github.saiidz/solvelang, so the listing, the package, and the source all point at the same publisher.
Questions, answered briefly
Why isn't my MCP server showing up?
Check the scope first — a server added with local scope only exists in the project where you added it — then the file: Claude Code reads ~/.claude.json and .mcp.json, not the Desktop app's config. Finally, start the server's command by hand; a server that cannot start cannot connect.
Do I need to restart Claude Code after adding a server?
Servers added with claude mcp add are picked up by new sessions. A running session may need /mcp to reconnect or a restart to see config changes, and project-scope servers ask for approval before their first use.