MCP setup
MCP (Model Context Protocol) is an open standard that lets Claude Code use outside tools and data, such as your issue tracker, a database or a documentation site.
You add a server once, and Claude can call its tools whenever a task needs them.
Add a server#
There are two kinds. A remote server is reached over HTTP. A local server is a program that Claude Code starts for you.
# Remote (HTTP) server
claude mcp add --transport http my-server https://example.com/mcp
# Local server, started with a command
claude mcp add my-local-server -- npx -y some-mcp-packageReplace the names and addresses with the server you want. Its documentation gives the exact command.
See and remove servers#
claude mcp list
claude mcp remove my-serverInside a session, run /mcp to see which servers are connected and sign in to the ones that need it.
Share servers with your team#
By default a server is private to you in this project. Add --scope project to save it in a .mcp.json file at the project root, which you can commit so everyone gets the same tools. Use --scope user to make it available in all your projects.
{
"mcpServers": {
"docs": {
"type": "http",
"url": "https://example.com/mcp"
}
}
}Stay safe with MCP#
- Only add servers from sources you trust. A server can read whatever data you let it reach.
- Give each server the smallest access it needs. Use read-only credentials where you can.
- Never put secrets in a committed
.mcp.json. Use environment variables instead.
Frequently asked questions
Do I need MCP to use Claude Code?
No. Claude Code works well without it. MCP is for connecting extra tools and data.