How to use mcp servers with Claude Code?

Updated 2026-07-15Asked across Reddit, Quora & Google· Claude Code
Short answer

MCP (Model Context Protocol) servers connect Claude Code to external tools like Jira, Slack, GitHub, or your own scripts. Add one with `claude mcp add <name> -- <command>`, then run `/mcp` to see and manage connected servers. Tool definitions are deferred by default, so only tool names enter context until Claude actually uses one—keeping token cost low.

Why — the first-principles explanation

A language model can only reason over text you give it. MCP is the standard plug that lets Claude Code reach beyond that—into your ticketing system, your database, your design docs—by talking to small helper programs called servers. Each server exposes a set of tools (like 'create Jira ticket' or 'query database'), and Claude calls them as needed. Because MCP is an open standard, one integration format works across many tools instead of a custom hookup for each.

The practical worry with adding lots of tools is context bloat: every tool description costs tokens. Claude Code solves this by deferring tool definitions—only the tool names load into context up front, and the full schema is fetched only when Claude decides to use that tool. That's why you can connect many servers without drowning your context window.

There's a hierarchy worth knowing. MCP servers can be added at user, project, or local scope, so a team can share a project's servers via config while you keep personal ones private. And when a plain CLI tool already exists (like `gh` for GitHub or `aws`), the docs suggest preferring it—Claude can just run the command, which is even more context-efficient than an MCP server. So MCP is for connecting systems that don't have a handy CLI, or where a structured tool interface is cleaner.

An example that makes it click

Think of Claude Code as a smart office worker who can only act on what's on their desk. MCP servers are like giving them phone lines to other departments: one line to the ticketing office (Jira), one to the mailroom (Slack), one to records (your database). They don't memorize every department's full manual—they just keep a list of phone numbers (tool names) and dial the right one only when a task needs it (deferred loading). That's how they can have dozens of lines without a cluttered desk.

How to do it

  1. Find the MCP server you want (official ones exist for GitHub, Slack, Google Drive, and many tools) and its launch command.
  2. Add it: run `claude mcp add <name> -- <command to start the server>` (add `--scope project` to share it with your team).
  3. For remote servers, use the URL/transport form your server documents (e.g. an HTTP or SSE endpoint).
  4. Run `/mcp` inside Claude Code to list connected servers, check status, and enable or disable them.
  5. Ask Claude to use the tool in plain English (e.g. "create a Jira ticket for this bug"); it fetches the tool's schema on demand.
  6. Run `/context` to see what's consuming context, and disable servers you're not using to keep it lean.

Key facts

Infographic: How to use mcp servers with Claude Code — short answer and key facts
Visual summary — How to use mcp servers with Claude Code?
CC
Try Claude Code by Anthropic

Anthropic's agentic coding tool that works in your terminal.

Affiliate link — we may earn a commission at no cost to you.
Visit Claude Code ↗
▶ The 60-second explainer (script)

How do you use MCP servers with Claude Code? First, what they are: MCP—Model Context Protocol—is an open standard that lets Claude reach beyond your codebase into other systems, like Jira, Slack, GitHub, or your own database. Each MCP server exposes a set of tools, and Claude calls them when a task needs one. To add a server, run claude mcp add, a name, two dashes, then the command that starts the server. Add scope project if you want your whole team to share it. Then run slash-mcp inside Claude Code to see your connected servers and turn them on or off. Here's the clever part: tool definitions are deferred by default. Only the tool names load up front, and the full details get fetched only when Claude actually uses that tool—so you can connect lots of servers without bloating your context. One tip from the docs: if a plain CLI tool already exists, like gh for GitHub, prefer it—Claude can just run the command, which is even leaner. After that, just ask in plain English: 'create a Jira ticket for this bug,' and Claude handles the rest.

What authoritative sources say

Claude Code Docs — Overviewofficial — MCP is an open standard for connecting AI tools to external data sources like Google Drive, Jira, and Slack. source ↗
Claude Code Docs — Manage costsofficial — MCP tool definitions are deferred by default, so only tool names enter context until Claude uses a specific tool; prefer CLI tools when available. source ↗

People also ask

How do I add an MCP server to Claude Code?

Run `claude mcp add <name> -- <command>` to add it, then use `/mcp` to view, enable, or disable connected servers.

Will lots of MCP servers slow down or bloat my context?

Not much. Tool definitions are deferred—only names load up front, and full schemas are fetched only when a tool is used.

Can my whole team share MCP servers?

Yes. Add a server at project scope so it's shared via config, while user- and local-scope servers stay personal.

When should I use a CLI tool instead of MCP?

When a CLI already exists (like `gh`, `aws`, `gcloud`). Claude can run it directly, which is more context-efficient than an MCP server.

Related questions