Anthropic renamed the Claude Code SDK to the Claude Agent SDK in 2026, and MCP is how you give its agents tools beyond the built-ins. You declare servers in an mcpServers block, the SDK connects them, and the agent discovers every tool automatically. Here's the configuration, the three transports, and when to reach for each.
The mcpServers block
Servers are declared as a map. A local server needs a command and args; a remote one needs a type and url. This wires GitHub in as a local subprocess:
const options = {
mcpServers: {
github: {
command: "npx",
args: ["-y", "@modelcontextprotocol/server-github"],
env: { GITHUB_TOKEN: process.env.GITHUB_TOKEN },
},
},
};
Pick a transport
Three exist. stdio runs a local subprocess and is fastest for tools on the same machine. HTTP reaches a remote server with OAuth or a bearer token — the choice for cloud-hosted services. SSE is legacy and deprecated, so don't build new work on it. For a hosted API, pass the token in a header:
"oauth-api": { type: "http", url: "https://api.example.com/mcp", headers: { Authorization: `Bearer ${token}` } }
In-process servers
The Agent SDK can also run an MCP server inside your application, so a tool you define in code is exposed over the same protocol the agent uses for everything else. That's handy for project-specific tools you don't want to publish separately — the agent can't tell the difference between an in-process tool and a remote one, which keeps your code uniform. It also skips the subprocess and network round-trip entirely, so an in-process tool is the fastest option when the logic already lives in your app and doesn't need to be shared with other clients.
Which servers to start with
A build agent wants GitHub and filesystem; a docs agent wants Notion. Because the SDK speaks standard MCP, the whole directory is compatible — curated, categorised and vetted.
Going further
Wiring the same servers into the app? See the Claude Code MCP setup guide and best MCP servers for Claude Code. Secure remote servers with the OAuth 2.1 guide, and clarify where Skills fit vs MCP.