Skip to main content
MCP

MCP for Claude Code: Model Context Protocol explained in 5 min

  • Guide
  • Architecture

Model Context Protocol (MCP) for Claude Code in 5 minutes: architecture, real examples, and how MCPs differ from plugins and skills. Fast start guide.

What exactly is MCP?

The Model Context Protocol (MCP) is an open protocol created by Anthropic that lets Claude Code communicate with external services. It's the standard that transforms Claude Code from an isolated assistant into one that's connected to your real environment.

Without MCP, Claude Code can only read and write local files and run shell commands. That's already powerful, but limited to your machine. With MCPs, it can:

  • Send a Slack message to your team
  • Create a pull request on GitHub
  • Run a SQL query on your database
  • Take a screenshot of a web page
  • Read your emails in Gmail
  • Look up documentation for a library

All from your terminal, in plain language.

Architecture: how it works under the hood

MCP relies on a simple and elegant client-server architecture.

1

You make a request

You write in plain language in Claude Code: "Show me the open GitHub issues on my project".

2

Claude Code identifies the right tool

Claude Code analyzes your request and determines it needs the GitHub MCP. It knows which tools each MCP exposes thanks to the discovery phase at startup.

3

The MCP Server translates the request

Claude Code sends a JSON-RPC message to the GitHub MCP Server via stdin/stdout. The MCP server translates this request into actual GitHub API calls.

4

The result comes back to you

The MCP Server receives the GitHub API response, reformats it, and sends it back to Claude Code. Claude Code presents the result in a readable format and can chain additional actions.

The protocol in detail

MCP uses JSON-RPC 2.0 as its communication format. It's a well-established standard that's lightweight and easy to implement. Communication between Claude Code (the client) and each MCP Server happens via stdin/stdout, using the operating system's standard streams.

Each MCP Server exposes a set of tools that Claude Code can call. For example, the GitHub MCP exposes tools like list_issues, create_pull_request, search_code, etc. At startup, Claude Code queries each configured MCP to discover its available tools.

MCP vs Plugins vs Skills: what's the difference?

These three concepts complement each other but serve different roles.

MCPSkillsPlugins
RoleConnect Claude Code to an external serviceTeach a reusable behavior or workflowExtend Claude Code's internal capabilities
AnalogyA USB port to the outside worldA memorized tutorial or recipeA built-in add-on module
ExampleGitHub MCP to access repos, PRs, issues"review-pr" skill for a review processFormatting, analysis plugins, etc.
Configuration.mcp.json file or settings.jsonMarkdown file in .claude/commands/Via Claude's configuration system
ExecutionExternal server (separate process)Instructions interpreted by Claude CodeCode integrated into Claude Code

In summary

MCPs give Claude Code hands to interact with the outside world. Skills give it recipes to know what to do. Plugins give it additional internal capabilities. All three combine to create a custom-built assistant.

Key MCP protocol concepts

Tools

Each MCP Server exposes a list of tools. A tool is a function that Claude Code can call. For example:

  • mcp__github__list_issues: list issues in a repo
  • mcp__slack__send_message: send a Slack message
  • mcp__filesystem__read_file: read a file

Claude Code knows the signature of each tool (its parameters and types) and can call them automatically based on your request.

Resources

Some MCPs also expose resources: data that Claude Code can read but not modify. This is useful for providing additional context (documentation, database schemas, etc.).

Prompts

An MCP can also provide predefined prompts: interaction templates optimized for specific use cases.

Security and permissions

Here are MCP security best practices:

  • Principle of least privilege: grant each MCP only the strictly necessary permissions
  • Tokens with restricted scopes: use access tokens with minimum rights
  • Global configuration for secrets: store your tokens in ~/.claude/settings.json (never in the repo)
  • Regular review: periodically check which MCPs are configured and what access they have

Next steps

Now that you understand what an MCP is and how it works, let's get hands-on.