Claude Code に MCP server を追加する方法
Claude Code is Anthropic's coding agent for the terminal, also available in a desktop app and a VS Code extension. MCP servers are added with claude mcp add and can be shared with a team through a project .mcp.json.
Claude CodeにMCPサーバーを追加する
- 1Copy the
claude mcp addcommand from the server page. - 2Run it in your terminal. Add
--scope projectto share the server with your team through.mcp.json, or--scope userto use it in every project. - 3Pass secrets with
--env KEY=value; remote servers take--transport httpand the URL. - 4Start
claudeand run/mcpto see the server and its status.
例: Codebase Memory
claude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcpScopes and team sharing
- Every server has a scope. Local, the default, is only for you in the current project;
--scope usermakes it available in every project;--scope projectwrites it to.mcp.jsonso the whole team gets it. claude mcp add-json <name> '<json>'takes a full server entry when the plainaddflags are not enough.- Project servers from
.mcp.jsonask for approval the first time;claude mcp reset-project-choicesasks again. - Servers already set up in Claude Desktop can be imported on macOS and WSL.
Claude Code が MCP server を保存する場所
~/.claude.jsonuser and local scope.mcp.jsonproject scope
読み込みの確認: claude mcp list
制限と設定
- SSE is deprecated in Claude Code; use HTTP for remote servers.
- Tools whose full name is longer than 128 characters are left out.
- Server startup time is controlled by the
MCP_TIMEOUTenvironment variable. - Large tool output is capped;
MAX_MCP_OUTPUT_TOKENSraises the cap. ${VAR}and${VAR:-default}are expanded in command, args, env, url and headers.
Claude Code でサーバーが動かないとき
- Run
/mcpinside a session to see each server's status and sign in to OAuth servers. - Use
claude mcp get <name>to check what was saved for one server. - Start with
--debugto see connection errors in the log. - If a project server was declined earlier,
claude mcp reset-project-choicesasks again.
Claude CodeのMCPに関する質問
How do I add an MCP server to Claude Code?
Run claude mcp add <name> -- <command> for a local server, or claude mcp add --transport http <name> <url> for a remote one. Every server page on HostedMCP has the exact command.
Where does Claude Code store MCP servers?
Local and user scope servers go in ~/.claude.json. Project scope servers go in .mcp.json at the project root, which you can commit for your team.
Does Claude Code support remote MCP servers with OAuth?
Yes. Add the server with --transport http and sign in from /mcp when Claude Code asks.
How do I check that a server loaded?
Run claude mcp list, or open /mcp in a session; a connected server shows a check mark.
Claude Code向けの人気MCPサーバー
- 1
Provides a local knowledge graph that connects source code, documentation, and infrastructure to give AI agents structural context.
Claude Codeの設定
terminalclaude mcp add codebase-memory-mcp -- npx -y codebase-memory-mcp - 2
Securely execute LLM-generated code in isolated containers or local Linux and Windows sandboxes across multiple programming languages.
Claude Codeの設定
terminalclaude mcp add llm-sandbox -- uvx llm-sandbox - 3
Lets an AI client create, inspect, validate, and save editable 3D building scenes, including walls, rooms, doors, and furnishings.
Claude Codeの設定
terminalclaude mcp add editor -- npx -y @pascal-app/mcp - 4
Lets AI agents search, run, and read results from thousands of web scraping and automation Actors on Apify Store.
Claude Codeの設定
terminalclaude mcp add --transport http apify-mcp-server https://mcp.apify.com/ - 5
Provides AST-based semantic code search for local repositories using incremental re-indexing and natural language queries.
Claude Codeの設定
terminalclaude mcp add cocoindex-code -- uvx cocoindex-code - 6
Lets an AI client read and change Google Ads, Reddit Ads and GA4 campaigns, with a preview shown before every change.
Claude Codeの設定
terminalclaude mcp add adloop -- uvx adloop - 7
An agent meta-harness that provides Claude Code and Codex with specialized agent swarms, self-learning memory, and enterprise security guardrails.
Claude Codeの設定
terminalclaude mcp add claude-flow -- npx -y claude-flow - 8
Enables LLMs to interact with web pages through structured accessibility snapshots using Playwright browser automation.
Claude Codeの設定
terminalclaude mcp add playwright-mcp -- npx -y @playwright/mcp - 9
Allows an AI client to interact with Bitbucket Data Center repositories and code through the Model Context Protocol.
Claude Codeの設定
terminalclaude mcp add atlassian-dc-mcp -- npx -y @atlassian-dc-mcp/bitbucket - 10
Lets an AI agent draw and edit draw.io diagrams on a live browser canvas that you can also edit by hand.
Claude Codeの設定
terminalclaude mcp add next-ai-drawio -- npx -y @next-ai-drawio/mcp-server - 11
Packs a local or remote codebase into a single AI-friendly file with token counts so LLMs and coding agents can read or search it.
Claude Codeの設定
terminalclaude mcp add repomix -- npx -y repomix - 12
Connects AI agents and IDEs to enterprise databases using prebuilt tools or a custom framework for secure, structured queries.
Claude Codeの設定
terminalclaude mcp add mcp-toolbox -- docker run -i --rm us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:1.17.0