How to Use MCP Servers with Claude Code
Connect Claude Code to external tools and APIs using MCP servers. GitHub, Slack, databases, and more.
Step-by-step
How to Use MCP Servers with Claude Code
Understand MCP servers
MCP (Model Context Protocol) servers extend Claude Code with external tools — databases, APIs, file systems, and services. They let Claude interact with tools beyond your local codebase.
Configure MCP servers in settings
Add MCP server configurations to your `.claude/settings.json` or project-level `.claude.json`. Each server specifies a command to run and optional environment variables.
Use the /mcp command
Run `/mcp` in Claude Code to see connected MCP servers and their available tools. This helps you understand what capabilities are available.
Let Claude discover and use tools
When you ask Claude to perform a task, it automatically discovers relevant MCP tools. For example, if a GitHub MCP is configured, Claude can create PRs, read issues, and manage repos.
Tips
Pro tips
- *
Start with officially supported MCP servers from the Anthropic MCP registry
- *
MCP servers run locally — your data doesn't pass through additional third parties
- *
Use `scope: project` vs `scope: user` to control which MCP servers are available where
Related guides