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

# 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 list

Step by step

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

  1. 1
    Moxie Docs MCP
    MCP & Agent Skills for Automated Documentation, and codebase conventions + context
    7 4 2
  2. 2
    S
    Server Gitlabmodelcontextprotocol
    GitLab platform integration for project management and CI/CD operations
    4 4 2
  3. 3
    S
    Server Gitmodelcontextprotocol
    Direct Git repository operations including reading, searching, and analyzing local repositories
    3 0 1
  4. 4
    A
    Astronomy Oraclegregario
    Accurate astronomical catalog data and observing session planner. 13,000+ deep-sky objects from OpenNGC with deterministic visibility, rise/transit/set, and alt/az calculations. npx astronomy-oracle
    3 1 0
  5. 5
    M
    Mcp@agentfund
    Fundraising infrastructure for AI agents on Solana — campaigns, x402 donations, and on-chain reputation. MCP tools for registering agents, creating campaigns, and donating via the x402 pay-to-call flow, backed by Anchor programs (agentregistry, escrow, reputation). npx -y @agentfund/mcp
    5 0 0
  6. 6
    G
    GhidraMCP13bm
    MCP server for integrating Ghidra with AI assistants. This plugin enables binary analysis, providing tools for function inspection, decompilation, memory exploration, and import/export analysis via the Model Context Protocol.
    4 0 0
  7. 7
    C
    Codebeamer Mcp3KniGHtcZ
    Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.
    4 0 0
  8. 8
    S
    Server Filesystemmodelcontextprotocol
    Direct local file system access.
    4 0 0

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.

Install MCP servers in other clients

Claude DesktopCursorWindsurfVS Code (GitHub Copilot)