Kit (Phuc) Nguyen

What the Hell Is MCP?

Dec 4, 2026 · mcp

You’ve probably seen it everywhere by now. “Just add an MCP server.” “We shipped MCP support.” “Is there an MCP for that?”

If you’ve ever had Claude pull a file from your Google Drive or update a page in Notion, you’ve probably already used it without knowing.

So what the hell is an MCP?

We’ll follow one example throughout: getting an AI to log bugs in Jira.

The problem: everyone was writing the same glue

An LLM on its own can only talk. Being useful at work means doing things: reading tickets, querying a database, opening a pull request.

Before MCP, every AI assistant had its own way of connecting an LLM to tools. Claude had one plugin format, ChatGPT had another, and every IDE assistant had its own. So if you wanted LLMs to be able to use Jira, you’d build a separate integration for each assistant. Then a model update would land and break half of them.

This is the N × M problem: N AI assistants and M tools means N × M custom integrations. Three assistants and three tools? That’s nine bits of glue code, each one maintained separately.

MCP turns that into N + M. Each assistant learns MCP once, and each tool exposes MCP once. After that, any assistant can use any tool.

Without MCP, Claude, ChatGPT and Cursor each connect directly to GitHub, Postgres and your API: 3 × 3 = 9 custom integrations. With MCP, each assistant and each tool connects once to MCP in the middle: 3 + 3 = 6, each built once. Simplified, but you get the idea. Add a fourth assistant on the left and that’s three more integrations. On the right, it’s one.

That’s why people call MCP “USB-C for AI”. If you write code, there’s a better comparison. Programming languages hit the same wall years ago: every chip architecture speaks its own machine code, so a language needed a separate compiler for each one. VM languages like Java got around that. Compile once to bytecode, and it runs on any machine that has the VM. MCP is that middle layer for AI.

What MCP actually is

The Model Context Protocol is an open standard for how AI assistants talk to the outside world. Anthropic introduced it in late 2024, then handed it to the Agentic AI Foundation under the Linux Foundation in December 2025, so no single company owns it any more. Claude, ChatGPT, Gemini, Copilot and Cursor all speak it.

There are three roles to keep straight:

A host (Claude, an IDE or your agent) holds the model, which picks the tool, and three clients. Each client talks MCP to one server: a GitHub server, a Postgres server and a Jira server. Each server wraps one system: the GitHub API, a Postgres database and the Jira API. Simplified: a host can connect to as many servers as you like.

A server can offer three kinds of things:

Primitive What it is Example
Tools Functions that do something create_ticket(title, priority)
Resources Read-only data A file, a DB row, a log
Prompts Reusable prompt templates “Review this PR using our checklist”

But isn’t this just my API endpoints?

Fair question. You’ve already got an API, so why not just let the AI call it?

Short answer: you kind of are. MCP basically wraps your endpoints so an LLM can discover them and learn how to use them. What changes is who the interface is designed for.

A REST API is designed for developers. You pick your own routes, like GET /tickets/{id} or POST /tickets. Someone reads your docs, writes client code, and hard-codes which endpoint gets called when.

MCP is designed for a model working things out at runtime. It doesn’t care what your routes look like. Every server speaks the same small set of methods, sent as simple JSON messages:

For each tool, the server sends back a name, a plain-English description and a JSON Schema for its inputs. That tool list is the documentation, and it’s read by an LLM, not a person.

In practice, each tool often maps straight onto an existing endpoint. A Jira server’s create_ticket tool might just call Jira’s create-issue endpoint behind the scenes. The API still does the real work. MCP just tells the LLM what’s there and when to use it.

Some libraries will auto-generate one tool per endpoint for you. It’s quick, but your 40 endpoints become 40 tools, described for developers rather than an LLM. Hand-picking a few task-shaped tools like create_ticket usually works much better.

What about just giving the LLM a CLI?

Next obvious question. Coding agents like Claude Code already have a terminal. Ask one to check your open PRs and it’ll happily run gh pr list (the GitHub CLI) and read the output. No MCP server required. So why bother?

Quick refresher if you haven’t used one: a CLI (command-line interface) is a program you drive by typing commands instead of clicking. You install it with a package manager, like brew install gh on a Mac or winget install GitHub.cli on Windows. It bundles everything needed to talk to that service, from the API calls to the login and error handling. You type gh pr list, and it does the rest.

So sometimes you don’t need MCP at all. A coding agent can drive a CLI just like you would.

A big reason CLIs work so well is progressive disclosure: showing the LLM only what it needs, when it needs it. The LLM runs gh --help and sees the top-level commands, then gh pr --help for the PR ones, then runs the one it wants. It only ever reads the bit of the manual it needs.

MCP, by default, does the opposite and loads the whole manual up front. When the assistant connects, tools/list hands over every tool’s name, description and schema, and all of it sits in the context window on every turn, whether you use those tools or not. A big server like GitHub’s has dozens of tools. Connect a few servers like that and a big chunk of your context is gone before you’ve typed anything.

Why does that matter? Context is the LLM’s working memory. Fill it with tool descriptions and there’s less room for your actual conversation, every request costs more, and the LLM gets worse at picking the right tool.

That’s only the default, though. Newer assistants and gateways use tool search: the LLM only sees short tool names and descriptions, and a tool’s full details get loaded once it actually needs that tool. Same idea as --help, just for MCP. So the real question isn’t CLI vs MCP. It’s whether tools get loaded all up front, or only when needed.

Context aside, MCP earns its keep once you step outside the “developer with a terminal” setup:

CLI (gh, jira) MCP server
Needs a shell Yes No. A remote MCP call is just an HTTP request, so it works in chat apps, web and mobile without touching your computer
How the LLM learns it Training data, or reading --help tools/list, with descriptions and schemas
Auth Whoever’s logged in on that machine OAuth, per user
Output Text to parse (unless there’s a --json flag) Structured results
Permissions Anything the shell allows Per tool, e.g. auto-allow reads, confirm writes
Sharing with a team Everyone installs and logs in Host it once, everyone connects

Rule of thumb: a CLI only works when the agent runs on the same machine as the CLI. If that’s your setup and the tool is well known, a CLI is fine, and it gets to use the logins, API keys and config you’ve already set up. Reach for MCP when the AI lives somewhere else (a cloud agent, or Claude on your phone), or when you’ve built your own tool and want to teach any AI assistant how and when to use it.

Plenty of setups use both. Jira’s a good example: there are community CLIs for it, and Atlassian also runs an official MCP server. A coding agent on your laptop could use either, but Claude on your phone needs the MCP one.

What actually happens when you ask

Back to Jira. You’ve connected a Jira MCP server to Claude, and you type: “Log a bug: the checkout button is broken on mobile.” Here’s what happens next.

  1. Discovery. The client asks the server tools/list. The server replies with its tools, including create_ticket, its description and its input schema.

  2. The model reads the menu. The host puts those tool descriptions in front of the model, right next to your message.

  3. The model decides. It spots that create_ticket matches what you asked for and works out the arguments.

  4. The call. The client sends a tools/call request, which looks something like this:

    {
      "jsonrpc": "2.0",
      "id": 7,
      "method": "tools/call",
      "params": {
        "name": "create_ticket",
        "arguments": {
          "title": "Checkout button broken on mobile",
          "priority": "high"
        }
      }
    }
  5. The result. The server creates the ticket in Jira and sends back the result. The model reads it and replies: “Done, logged as BUG-123.”

Sequence diagram between You, Host + client, Model and MCP server: 1 the host sends tools/list to the server, 2 the server returns the tool list and schemas, 3 you type “Log a bug…”, 4 the host sends your request and the tool menu to the model, 5 the model asks the host to call create_ticket, 6 the host sends tools/call to the server, 7 the server returns BUG-123, 8 the host passes the tool result to the model, 9 the model replies “Logged as BUG-123”. Simplified: steps 1 and 2 usually happen once, before you’ve typed anything, and the list gets cached.

Here’s the bit people tend to miss: the model never touches your server. It only asks. The host’s client makes the actual call, which is also where you get that “Allow this tool?” prompt before anything runs.

Build one in about ten lines

First, what you’re actually building. An MCP server is usually its own small program that sits between the assistant and the app it connects to, Jira in our case. It takes requests from the assistant, calls the app, and passes the results back. (You can also serve it from inside an existing app.)

You can run it locally on your computer, where the assistant starts it and talks to it through stdio (the program’s input and output, like a terminal). Or you can host it remotely, where the assistant talks to it over HTTP at a URL. Local is simplest for your own stuff. Remote is for a server your whole team shares, with sign-in handled by standard OAuth, the same “Sign in with Google” style flow you already know. Either way, the JSON messages are exactly the same. One gotcha if you go local: never print() to stdout, because that’s the channel the assistant is reading.

The code itself is a bit anticlimactic. Install the official Python SDK with uv add "mcp[cli]", then:

from mcp.server import MCPServer

mcp = MCPServer("jira")

@mcp.tool()
def create_ticket(title: str, priority: str = "normal") -> dict:
    """Create a Jira ticket. Use when the user reports a bug or asks for a feature."""
    # call Jira's API here
    return {"id": "BUG-123", "title": title, "priority": priority}

if __name__ == "__main__":
    mcp.run()  # stdio by default

That’s it. That’s a working MCP server. The @mcp.tool() line is a decorator: Python’s way of wrapping a function with extra behaviour without changing the function itself. Here it registers create_ticket as a tool, and the SDK handles the boring bits:

Resources and prompts are just two more decorators:

@mcp.resource("ticket://{ticket_id}")
def get_ticket(ticket_id: str) -> str:
    """The full details of one ticket."""
    return f"Ticket {ticket_id}: checkout button broken on mobile"

@mcp.prompt()
def triage(ticket_id: str) -> str:
    """Triage a ticket using our checklist."""
    return f"Read ticket {ticket_id}, set a priority and suggest an owner."

The resource gets a URI like ticket://123 that the assistant can fetch, and the prompt shows up as a slash command like /triage 123.

Done. You can now connect it to your Codex app and start using it.

Things nobody tells you until you ship

Your descriptions are prompts. The model picks tools almost entirely from their names and descriptions. “Gets data” tells it nothing. “Look up a customer by email or account ID. Use before issuing refunds.” tells it exactly when to reach for it. If the model keeps grabbing the wrong tool, fix the description before you touch any code.

More tools isn’t better. Remember progressive disclosure: every tool costs context and makes wrong picks more likely. Expose the handful of actions that actually matter.

Return what a model can use. A 2 MB JSON dump wastes context and buries the answer. Send back the fields that matter, plus a clear error message when something fails, so the model can recover.

Treat tool output as untrusted. If a tool returns a web page or an email, that text goes straight into the model. Someone can hide instructions in it (“ignore previous instructions and…”). That’s prompt injection, and it’s why anything destructive should sit behind a confirmation step.

Only install servers you trust. A local MCP server is code running on your machine with your permissions. Vet it like any package you’d pip install.

So that’s MCP: a standard way for an AI to ask your code “what can you do?” and then “do this one.” Build the integration once, and every AI assistant that speaks MCP can use it.

No magic, and not just REST with a new name. It’s a small, boring, well-defined protocol, and that’s exactly why it caught on.

Back to all writing