Search⌘ K
AI Features

MCP Configuration and Tool Distribution

Explore how to configure and distribute tools via MCP servers to multiple Claude agents or applications without duplicating definitions. Understand the MCP architecture including server, transport, and client roles. Learn to write a minimal MCP server in Python and configure it for Claude Code with a .mcp.json file. Discover the behavioral consistency between inline tools and MCP-registered tools and how to manage tool name conflicts through namespacing.

In the previous two lessons, we defined tools inline: a TOOLS list passed directly to client.messages.create(). That pattern works well for a single agent in a single codebase. The Model Context Protocol (MCP) solves a different problem: how do you expose the same set of tools to Claude across multiple agents, applications, or users without duplicating the tool definitions in every caller?

MCP defines a standard protocol for a server process to advertise tools and for a Claude-compatible client to discover and invoke them. From Claude's perspective, an MCP-registered tool behaves identically to an inline tool. The behavioral contract principles from the previous lessons apply without change. What changes is where the tool lives and how the client learns about it. By the end of this lesson, we will be able to:

  • Explain the relationship between an MCP server, a transport, and the Claude client

  • Write a minimal MCP server that exposes one tool

  • Configure an MCP server for Claude Code in a .mcp.json file

  • Identify what changes and what stays the same when moving from inline tools to MCP

The MCP architecture

An MCP setup has three parts: the server, the transport, and the client.

  • Server: The server is a process that owns the tool implementations. It exposes a list of available tools and handles call requests by running the underlying function and returning a result string.

  • Transport: The transport is the ...