Black Friday sale: 85 Claude Code agents for $29 one-time · lifetime updatesGet access →

MCP setup

Updated · 5 min read

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.

terminal
# 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-package

Replace the names and addresses with the server you want. Its documentation gives the exact command.

See and remove servers#

terminal
claude mcp list
claude mcp remove my-server

Inside 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.

.mcp.json
{
  "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.

Keep reading