zerotoclaude
Module 04/Advanced Usage/Lesson 03

MCP servers: extending capabilities

Give Claude access to your Notion, your database, your custom internal tools.

11 min read

Out of the box, Claude Code can read your files and run shell commands. That's a lot. But sooner or later you'll want it to do something that doesn't live in your filesystem — look up an issue in Linear, fetch a row from your database, post a message in Slack, query a private API. That's what MCP servers are for.

What MCP is

MCP stands for Model Context Protocol. It's a standard for how an AI agent can talk to an external tool or service. An MCP server is a small program (running on your machine, or remote) that exposes a set of capabilities the agent can use — "look up issue X," "run query Y," "post message Z."

From Claude Code's side, an MCP server's capabilities appear as additional tools — alongside Read, Edit, Bash, etc. Claude can choose to use them when relevant.

The integration model in one line
MCP = adapter between Claude and any tool or service you want it to use. Standardised so the same Claude can talk to Linear, Notion, your database, your custom CRM — all through the same protocol.

Why it matters

Without MCP, integrating with a service means writing custom code each time and gluing it together with shell commands. With MCP, you install or run an MCP server once and Claude can use it everywhere.

Concrete examples of what changes:

  • "Find the open Linear issues assigned to me about the payments module" — possible directly, no copy-paste from a browser.
  • "Read this Notion page and turn it into a checklist" — Claude opens the page, reads the actual content.
  • "Query the staging database for users created in the last 24 hours" — direct, with the result available for further analysis.
  • "Look up this customer's last three support tickets" — via your internal MCP server connected to Zendesk or your ticketing system.

Installing an MCP server

Most popular MCP servers are published as npm packages. To wire one up, add it to .claude/settings.json:

json
{
  "mcpServers": {
    "linear": {
      "command": "npx",
      "args": ["-y", "@linear/mcp-server"],
      "env": {
        "LINEAR_API_KEY": "lin_api_..."
      }
    }
  }
}

That tells Claude Code: when this project starts, also launch the Linear MCP server in the background, give it this API key via environment variable, and make its tools available to me.

On next session start, Claude Code launches the server, lists its tools, and they appear in Claude's available toolbox. You can verify with a quick "What MCP tools do you have?" in the session.

The security model

MCP servers run with the same trust as anything else you install. Two angles to think about:

The server itself.When you install an MCP server, you're running someone else's code. Stick to servers from publishers you trust — official ones from the company whose product you're integrating with, or popular community ones with active maintenance.

The credentials. Most MCP servers need credentials to access the underlying service (an API key, a token). These belong in environment variables, not committed config. The settings.json file should reference $LINEAR_API_KEY, with the actual key in your .env.

An MCP server can see what its tools return
If a tool returns sensitive data — say, a customer's email — that data goes into your Claude context, gets sent to Anthropic, gets used to generate the next response. For most cases this is fine. For regulated data (healthcare, financial, truly private), think before connecting an MCP server that has access to it.

Writing your own MCP server

When the public MCP servers don't cover your tool — because it's an internal system, or because you have specific quirks — you can write your own. The protocol is deliberately simple. There are official SDKs in TypeScript, Python, and a few other languages. A minimal MCP server with one or two tools is fifty lines of code.

This is where MCP gets really powerful. Your internal admin tool, your billing system, your customer DB — wrap them in a small MCP server, register it with Claude Code, and now your agent can use them like any built-in tool. No need to expose them publicly.

MCP vs. hooks vs. skills

These can blur together. A short way to keep them straight:

  • MCP — add new tools Claude can use. For talking to external services or systems.
  • Hooks — run automatic shell commands on Claude Code events. For enforcing rules and side effects.
  • Skills — package up instructionsfor reusable workflows. For codifying "how we do this kind of task."

They compose. A skill might use a custom MCP tool and have a hook attached. Each lives at a different layer.

When MCP isn't the right answer

If the integration you need is "run this shell command," you don't need MCP. Just let Claude run the command. MCP adds value when:

  • The interaction is too complex to express as a shell one-liner.
  • You want Claude to discover the right action (the MCP server can describe its tools, hooks can't).
  • You want clean structured outputs rather than parsing shell stdout.

For everything else, a hook or a slash command is simpler. Don't reach for MCP when a Bash command will do.

What to take with you
  • MCP is the standard protocol for plugging external tools and services into Claude Code.
  • Configure servers in .claude/settings.json. Their tools appear alongside Claude's built-in ones.
  • Watch trust: MCP servers run on your machine and see the data their tools return.
  • Writing your own MCP server for internal tools is a small project that pays off big.
  • MCP for tools, hooks for side effects, skills for workflows. They compose.