Connecting Claude to External Tools With MCP
Explore how to connect Claude agents to external data and tools using the Model Context Protocol. Understand building MCP servers, testing them independently, and linking them with agents to enable scalable and secure integration across systems.
The data an agent needs rarely lives inside the agent. Supplier contracts sit in a contract system, orders in an ERP, and tickets in a service desk, each owned by a different team. Writing custom tool code for every system inside every agent does not scale, because each new agent repeats the same integration work.
The Model Context Protocol (MCP) is an open standard for connecting AI applications to external tools and data. A team wraps a system once as an MCP server, and any MCP-compatible application can use it, including Claude agents, Claude Code, and other clients. For FDEs, MCP servers are a common deliverable, the piece that connects Claude to a customer’s own systems.
The examples here put the procurement team’s supplier contracts behind an MCP server with two tools.
How MCP works
MCP connects three roles. A host is the AI application the user works with, such as an agent built on the Agent SDK. Inside the host, an MCP client holds a connection to one server. An MCP server is a separate program that exposes a system’s capabilities through the protocol.
A server can expose three kinds of capability, called primitives.
Tools: Functions the model can call, such as looking up a contract.
Resources: Data the application can read into context, such as a document identified by a URI.
Prompts: Reusable prompt templates the server offers to its users.
Messages between client and server use JSON-RPC, a simple format for requests and responses. Two transports carry them. stdio runs the server as a local subprocess and exchanges messages over standard input and output. Streamable HTTP runs the server as a web service that clients reach by URL. Local development and single-machine deployments use ...