# How to add MCP servers to Claude Code

Claude Code reads MCP servers from ~/.claude.json (for you) or .mcp.json (for one project), under the "mcpServers" key. A local server’s entry is a command with args; a remote server’s entry is its URL in "url". You can also add a server with one terminal command, claude mcp add.

Last checked 25 Nov 2026. Page: https://ai-powered.com/clients/claude-code

## Quick facts

- Local servers: Yes (stdio)
- Remote servers: Streamable HTTP: Yes · SSE: Yes (URL field: url)
- Sign-in: OAuth: Yes · Headers: Yes (Sign in from /mcp or with claude mcp login <name>. Fixed tokens go in --header.)
- Resources: Yes
- Prompts: Yes
- Tool approval: Yes
- Tool limit: No fixed limit (No fixed per-server tool cap. Tool search loads tool definitions only when needed, so the practical limit is your context window.)
- Plans: Claude Code needs a Pro, Max, Ultra, Team, Enterprise or Console account. The free claude.ai plan does not include it.
- Platforms: macOS, Windows and Linux

## Claude Code config files

| Scope | System | Path |
| --- | --- | --- |
| For you | All systems | `~/.claude.json` |
| For one project | All systems | `.mcp.json` |

## Servers that work in Claude Code

- [REA](https://ai-powered.com/mcp/rea): CLI and MCP server that lets coding agents reverse engineer apps and binaries
- [Browser Use](https://ai-powered.com/mcp/browser-use): Browser agents and cloud browsers for AI, with an MCP server for web tasks
- [Scrapling MCP Server](https://ai-powered.com/mcp/scrapling-mcp-server): MCP server for AI clients to scrape sites with HTTP and stealth browser sessions
- [HyperFrames by HeyGen](https://ai-powered.com/mcp/hyperframes-by-heygen): Hosted MCP connector for creating and rendering videos from HTML through AI chat
- [Context7](https://ai-powered.com/mcp/context7): Version-specific library docs and code examples piped into coding agents via MCP
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): MCP server and CLI that let coding agents drive and inspect a live Chrome browser
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Local MCP server that builds a code knowledge graph for AI coding agents
- [GitHub](https://ai-powered.com/mcp/github): Official MCP server connecting AI assistants to GitHub repos, issues and workflows
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): MCP toolkit giving coding agents symbol-level code retrieval and editing
- [ffmpeg-skill](https://ai-powered.com/mcp/ffmpeg-skill): Local FFmpeg video and audio editing tools for coding agents over MCP
- [Ha MCP](https://ai-powered.com/mcp/ha-mcp): MCP server for managing and automating Home Assistant from AI assistants
- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Open-source analytics app where an AI agent builds charts and dashboards from your data

## Troubleshooting

- The server’s own flags are read as Claude Code flags: Put -- before the server command. Everything after -- is passed to the server unchanged.
- A remote server in .mcp.json is skipped with “has a url but no type”: Add "type": "http" (or "sse") to the entry. Without a type, Claude Code reads the entry as a local server.
- The server takes too long to start: Raise the startup timeout, for example MCP_TIMEOUT=10000 claude for 10 seconds.
- Sign-in fails with “does not support dynamic client registration”: Register an OAuth app with the server, then add it again with --client-id (and --client-secret if needed).
- A tool result is cut off: Results above 25,000 tokens are limited by default. Raise MAX_MCP_OUTPUT_TOKENS before starting Claude Code.
- You can’t tell whether the server or Claude Code is at fault: Test the server on its own with the MCP Inspector (npx @modelcontextprotocol/inspector). If it lists tools there, check the Claude Code setup.

## Safety

- Servers in a project’s .mcp.json need your approval before they run. Only approve servers from repositories you trust.
- Use permission rules to allow or block single MCP tools instead of approving everything.
- Keep tokens in environment variables (${VAR}) rather than in a .mcp.json you commit.
- A local server runs on your computer with your access to files and the network. Add only servers whose source you trust.

## Questions

### Where does Claude Code store MCP servers?
Local and user servers are stored in ~/.claude.json. Project servers go in .mcp.json at the project root, which you can commit to share with your team. Choose with --scope local, project or user.

### Can Claude Code use my claude.ai connectors?
Yes. When you are logged in with a claude.ai account, connectors you added on claude.ai show up in /mcp automatically.

### Is there a limit on how many MCP tools Claude Code can use?
There is no fixed per-server tool cap. Tool search is on by default, so only tool names load at the start and full definitions load when needed.

### Can I import servers from Claude Desktop?
Yes, on macOS and WSL: run claude mcp add-from-claude-desktop and pick the servers to import.

### How do I use MCP resources and prompts?
Type @ to mention a resource (for example @server:protocol://path). Prompts appear as slash commands named /server:prompt.

### Can I use local MCP servers in Claude Code?
Yes. Claude Code starts a local server as a command on your computer (stdio).

### Does Claude Code support remote MCP servers?
Yes. Claude Code connects over Streamable HTTP and the older SSE transport. The URL goes in the "url" field.

### Can Claude Code sign in to MCP servers with OAuth?
Yes. Sign in from /mcp or with claude mcp login <name>. Fixed tokens go in --header.

## Sources

- [Claude Code docs: connect Claude Code to tools via MCP](https://code.claude.com/docs/en/mcp)
- [Claude Code docs: advanced setup](https://code.claude.com/docs/en/setup)