MCP — Connecting AI to Your Tools

How MCP Works

How a Connection Actually Happens

When an AI app connects to an MCP server, there's a simple handshake before any real work happens.

First, the client and server perform capability negotiation: they exchange information about what the server offers (which tools, resources, and prompts) and which features the client understands. This is how the AI discovers what's available without anyone hardcoding it. All of this communication uses a standard message format called JSON-RPC — you don't need to know the details, just that it's a shared language both sides speak.

There are two common ways servers run. Local servers run right on your machine (great for personal setups — like a database server running alongside your AI desktop app). Remote servers run as an online service over HTTPS, which supports many users at once and works with proper enterprise logins.

A Concrete Example

You connect your AI app to a new calendar server. On connection, the server announces: "I offer a tool to create events, a tool to list events, and a resource to read your schedule." The AI now knows those capabilities exist and can use them when you ask "what's on my calendar tomorrow?" — no manual configuration of each function required.

Connect, discover what's on offer, then use it — the handshake makes tools self-describing.

How a Connection Actually Happens — MCP —… | hivework