What Do MCP Servers Do?
An MCP server connects Claude Code to a tool or service outside your local machine. Without one, Claude can only read files and run terminal commands. Add a GitHub server and Claude can read pull requests, create issues, and check CI status. Add a Postgres server and it can query your database. Each server runs as its own process and gives Claude new tools to call.
MCP stands for Model Context Protocol. It is an open standard. The same servers work with Claude Code, Cursor, and other tools that support the protocol.
How to Add Your First MCP Server
The claude mcp add command registers a server. You pick a transport (stdio for local tools, http for remote services) and point Claude Code at the server package.
Here is the simplest possible setup. The filesystem MCP server gives Claude controlled access to a specific directory outside your project:
# Add a filesystem MCP server (no API key needed)
claude mcp add --transport stdio filesystem
-- npx -y @modelcontextprotocol/server-filesystem /Users/you/Documents
Claude Code launches the server as a child process and talks to it over stdio. The npx -y flag downloads and runs the package without a global install. Replace the path with the directory you want Claude to read.
For remote services, the pattern changes to HTTP transport with authentication. Here is GitHub, which is typically the first server developers add for real work:
# Add the GitHub MCP server
claude mcp add --transport http github https://api.github.com/mcp
# For servers that need an API key, pass it as an environment variable
claude mcp add --transport stdio my-database
--env DATABASE_URL=postgresql://localhost:5432/mydb
-- npx -y @modelcontextprotocol/server-postgres
Each server gets a name (“filesystem”, “github”, “my-database”) that you use to manage it later. By default, the config saves to your user-level settings. The server shows up in every project. For project-specific servers, add --scope project to write the config to .mcp.json in your repo instead.
How to Verify the Connection Works
After adding a server, check that Claude Code sees it:
# List all registered MCP servers
claude mcp list
# Test a specific server's connection
claude mcp get github
A working server shows its status and how many tools it exposes. If it shows “disconnected,” run the server command by hand in a terminal to see the error output. The most common failure is a missing API key or a JSON syntax error in the config.
Inside an active Claude Code session, the /mcp command opens a panel showing every connected server with its tool count. You can disconnect and reconnect servers from this panel without restarting the session.
The real test is asking Claude something that requires the server. If you added GitHub, ask Claude to list your open pull requests. If it calls the MCP tool and returns real data, the connection works.
Where to Find MCP Servers
Pick one or two servers that match how you work. Most developers do well with five or six total. Adding twenty creates overhead because Claude loads tool schemas from every server at the start of each conversation.
Good starting choices by workflow:
- Code collaboration: GitHub (PRs, issues, CI status)
- Databases: Postgres, Supabase, or your production database
- Testing: Playwright for browser automation
- Project management: Linear, Jira, or Asana
- Communication: Slack for team notifications
The official MCP server registry on GitHub maintains a curated list of community-built servers. Anthropic’s own reference repo has over 85,000 stars. Before building a custom integration, check whether a server already exists for your tool.
The next lesson puts everything together. You will combine CLAUDE.md rules, a skill, and an MCP server into a working code review agent.
