【ClaudeCode】【Note】MCP 101
What Is MCP? #
Model Context Protocol (MCP) is an open protocol that standardizes how AI assistants connect to external systems — apps, data sources, APIs, and files.
Mental model: a USB-C port for AI — one standard connector instead of a custom integration per tool.
MCP was introduced by Anthropic in November 2024, then donated to the Agentic AI Foundation (AAIF) under the Linux Foundation in December 2025. It is now co-governed by Anthropic, Block, OpenAI, Google, Microsoft, AWS, Cloudflare, and Bloomberg — vendor-neutral by design. (as of 2025-12-09)
An MCP server exposes a capability in the standard format. The AI app that connects is the client. One client can plug into many servers simultaneously.
[[diagram: AI client → MCP protocol → Server A (files), Server B (tickets), Server C (database)]]
The Three Server Primitives #
| Primitive | What it is | Who controls it |
|---|---|---|
| Tools | Executable functions the AI can invoke (create an issue, search files, run a query) | Model-controlled |
| Resources | Structured data or content the AI can read (a file, a database record, a page) | Application-controlled |
| Prompts | Reusable prompt templates the server provides to guide interactions | User-controlled |
Two Connection Styles #
| Style | Transport | Data locality | When to use |
|---|---|---|---|
| Local | stdio | Stays on your machine | Dev tools, file access, local DBs |
| Remote | HTTP (Streamable) or SSE + OAuth | Hosted service | Cloud apps, SaaS, team-shared servers |
What You Can Do With MCP #
- Read and search your own content without pasting it into the prompt
- Take actions in other tools — create tickets, send messages, open pull requests
- Query live data from databases or APIs
- Chain servers into workflows: read from one, write to another
- Extend a coding agent to work against your real environment
Claude Code: MCP CLI Commands #
# Add a remote (HTTP) server — all flags must come BEFORE the server name
claude mcp add --transport http <name> <url>
# Add with scope (default: local)
claude mcp add --transport http --scope project <name> <url>
claude mcp add --transport http --scope user <name> <url>
# Add with auth header (e.g. PAT)
claude mcp add --transport http --header "Authorization: Bearer <token>" <name> <url>
# List all configured servers
claude mcp list
# Inspect one server
claude mcp get <name>
# Remove a server
claude mcp remove <name>
In-session commands:
| Command | What it does |
|---|---|
/mcp | Authenticate and manage servers in the current session |
Scope reference #
--scope value | Config file | Visible to |
|---|---|---|
local (default) | ~/.claude.json | Your machine only |
user | ~/.claude.json | All your projects |
project | .mcp.json in repo root | Everyone on the project |
Project-scoped servers (
.mcp.json) show as ⏸ Pending approval inclaude mcp listuntil explicitly approved — they are not auto-connected.
Bridging stdio Clients to Remote Servers #
Some MCP clients (e.g. older Claude Desktop versions) only support local stdio connections. Use mcp-remote as a bridge:
# mcp-remote: bridge a stdio client to a remote SSE endpoint
# Use the /sse URL, not the /mcp HTTP endpoint
npx mcp-remote@latest https://<host>/sse
Pass the SSE endpoint (
/sse), not the Streamable HTTP endpoint (/mcp) — mcp-remote speaks SSE. Pin to@latestto stay current.
One Habit: Least Privilege #
Grant only the access a task actually needs:
- Read-only when the AI only needs to read
- Narrow scope — share only the specific content it should see
- Smaller blast radius if anything goes wrong, including prompt-injection attacks (untrusted content trying to make the agent take unwanted actions)
One-Line Takeaway #
MCP turns “can my AI talk to this system?” into “which server do I plug in?”
Sources #
- MCP Specification (2025-11-25)
- MCP Server Features — MCP Spec
- MCP joins the Agentic AI Foundation — MCP Blog
- Connect to remote MCP servers — MCP Docs
- Connect Claude Code to tools via MCP — Anthropic Docs
- mcp-remote — npm
[[related: notion-mcp-server-integration]] [[related: claudecode-101]]