How to Install MCP Servers in Claude Code
How to add MCP servers to Claude Code from the terminal — the claude mcp add command, project vs user scope, and how to confirm the server connected.
Where the config lives
- Project (shared)
.mcp.json in your project root - User (global)
~/.claude.json
# Add a server from the terminal
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem /path/to/allowed/dir
# List configured servers and their status
claude mcp listStep by step
- 1
Add the server with the CLI
Run "claude mcp add <name> -- <command> [args...]". Everything after the -- is the command Claude Code runs to launch the server. Use -e KEY=value to pass environment variables.
- 2
Choose a scope
Add --scope project to write the server into a shared .mcp.json your team commits, or --scope user to make it available across all your projects. Local scope (the default) keeps it to the current project for just you.
- 3
Verify the connection
Run "claude mcp list" to see each server and whether it connected. You can also use the /mcp command inside a Claude Code session to inspect available servers and tools.
Popular MCP servers to try in Claude Code
Frequently asked questions
How do I add an MCP server to Claude Code?
Use the terminal: claude mcp add <name> -- <command> [args...]. For example, claude mcp add github -- npx -y @modelcontextprotocol/server-github. Add -e KEY=value for secrets and --scope project or user to control where it is stored.
What is the difference between project and user scope in Claude Code?
Project scope writes to a .mcp.json in the repository so your whole team shares the server; user scope stores it in your global config so it follows you across projects. Local (default) scope keeps it to the current project for only you.
How do I check whether a Claude Code MCP server connected?
Run claude mcp list from the terminal, or use the /mcp slash command inside a session. For verbose connection logs, start Claude Code with the --debug flag.