MCP: Extending Agents with Tools

How Model Context Protocol standardizes tool integration — servers, transports, and when it beats writing your own glue.

intermediate · Claude / GPT-5
#mcp#tools#integration

The integration problem it solves

Before MCP, every agent needed bespoke glue per data source: N agents × M tools connectors. Each integration re-invented discovery, auth, and result formatting.

MCP standardizes the last mile: servers expose tools, resources, and prompts over one protocol; clients consume them uniformly. Tool authors implement once.

Host (agent app) → MCP Client → MCP Server → your data/API

A server can be local (stdio) or remote (HTTP). The client does not care — same protocol either way.

Three things a server exposes

PrimitiveControlled byAnalogy
ToolsThe modelFunctions it can call
ResourcesThe applicationFiles/context it can read
PromptsThe userPre-written templates

The distinction matters: tools are model-invoked, prompts are user-invoked. Confusing them produces servers where the model triggers workflows the user intended to trigger manually.

Writing good tool definitions

Same discipline as any function-calling schema, with protocol-specific stakes — badly described tools get used across every client that connects.

Transports: stdio vs HTTP

stdio — server runs as a subprocess alongside the host. Simple, no network, inherits local permissions. Ideal for local file/system access and single-user dev tooling.

HTTP (streamable) — server is a shared remote service. Needed for multi-user, centralized credentials, and SaaS APIs. Requires real auth (OAuth), rate limiting, and per-user tenant isolation.

Choosing stdio for something that later needs shared credentials forces a rewrite. Decide early.

Security reality check

Connecting an MCP server grants it the permissions of whichever machine it runs on. Treat third-party servers as executable code you are choosing to run — because that is exactly what they are.

When MCP is overkill

If you have exactly one agent and one data source, just write the function. The protocol pays off with reuse across clients or many integrations. Adding MCP to a single-purpose script is ceremony with no return.

Adopt it when any of these hold: the tool should work across multiple agent apps; you maintain several integrations that keep drifting apart; you want others to consume your tool without custom docs.