Skip to main content

【ClaudeCode】【Note】MCP 101

·3 mins

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 #

PrimitiveWhat it isWho controls it
ToolsExecutable functions the AI can invoke (create an issue, search files, run a query)Model-controlled
ResourcesStructured data or content the AI can read (a file, a database record, a page)Application-controlled
PromptsReusable prompt templates the server provides to guide interactionsUser-controlled

Two Connection Styles #

StyleTransportData localityWhen to use
LocalstdioStays on your machineDev tools, file access, local DBs
RemoteHTTP (Streamable) or SSE + OAuthHosted serviceCloud 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:

CommandWhat it does
/mcpAuthenticate and manage servers in the current session

Scope reference #

--scope valueConfig fileVisible to
local (default)~/.claude.jsonYour machine only
user~/.claude.jsonAll your projects
project.mcp.json in repo rootEveryone on the project

Project-scoped servers (.mcp.json) show as ⏸ Pending approval in claude mcp list until 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 @latest to 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 #

[[related: notion-mcp-server-integration]] [[related: claudecode-101]]