Claude Code

Anthropic's terminal coding agent. Servers are added with a command rather than by editing a file.

Command line verified 2026-07-15

How to add a server to Claude Code

  1. Open a terminal in your project
  2. Run the claude mcp add command shown below
  3. Run claude mcp list to confirm it connected

Where the configuration lives

Project.mcp.json
Global~/.claude.json

Local server configuration

claude mcp add {{name}}{{envFlags}} -- {{command}} {{argsPlain}}

Hosted server configuration

claude mcp add {{name}} --transport http {{url}}

Placeholders such as {{name}}, {{command}}, {{args}} and {{url}} are filled from each server's package or endpoint data.

Protocol support

Support is uneven across clients. A server that only exposes prompts is of no use in a client that does not implement them.

Transports
TransportSupported
stdioYes
Streamable HTTPYes
SSEYes
Features
FeatureSupported
ToolsYes
ResourcesYes
PromptsYes
SamplingNo
RootsYes
ElicitationYes
OAuthYes

Official Claude Code MCP documentation

Frequently asked questions

How do I add an MCP server to Claude Code?
1. Open a terminal in your project 2. Run the claude mcp add command shown below 3. Run claude mcp list to confirm it connected
Where is the Claude Code MCP configuration file?
project: .mcp.json; global: ~/.claude.json.
Can Claude Code run a local MCP server?
Yes. It can start a local process and talk to it over stdio, so packaged servers work without any hosting.
Which parts of the protocol does Claude Code not support?
It does not implement sampling. A server whose value is mostly in those features will feel incomplete here.
Does Claude Code need restarting after adding a server?
No, it picks up the change without a restart.
When was this setup information last checked?
These details were verified on 2026-07-15. Clients change their configuration format from time to time, so check the official documentation if something does not work.

Other clients

Claude Desktop Cursor Visual Studio Code Cline Windsurf Zed