AIOps Peach

Agents · Module 06

Model Context Protocol (MCP)

One standard way to plug tools and data into any model: MCP hosts, clients and servers, what a server exposes, building one, and how it differs from function calling.

Học tương tác →

Học xong bạn làm được

Bài học

  1. Why MCP?

    MCP is an open standard, started by Anthropic in November 2024 and donated to the Linux Foundation's Agentic AI Foundation in December 2025, that gives LLM applications one interface to external tools, data and services - "USB-C for AI". Before it, every app-tool pair was a custom integration (N × M); with it, each app and each tool is integrated once (N + M).

  2. Architecture, primitives and adoption

    MCP has servers, clients (hosts) and a transport between them - stdio for local servers, Streamable HTTP for remote ones - carrying JSON-RPC messages. Servers expose three primitives - tools (callable functions with a JSON Schema), resources (read-only data by URI) and prompts (named templates). In under 18 months MCP went from Anthropic to OpenAI, Google, VS Code, Cursor and the Linux Foundation.

  3. Building an MCP server

    The official Python SDK (mcp) gives a high-level server class - FastMCP in version 1 - that handles the protocol. Tools are declared with @mcp.tool(), resources with @mcp.resource and a URI. The server runs over stdio by default or over Streamable HTTP for remote access, and a client registers it in its configuration with the command that starts it.

  4. The MCP Connector and code execution

    Anthropic's MCP Connector lets the Claude API call remote MCP servers itself - pass mcp_servers with a URL and name (and an authorization token if needed) and the API handles the handshake, discovery, calls and results. With large tool catalogs, letting the agent write a script that calls only the tools it needs, instead of loading every tool definition, cut token use by up to 98.7% in Anthropic's benchmarks.

  5. MCP vs function calling, security and summary

    MCP is a standard layer on top of function calling, not a replacement - universal, discovered dynamically, carried over stdio or Streamable HTTP, governed by the Linux Foundation and portable across clients. MCP servers need least privilege, input validation, authentication, audit logging and rate limiting, and all retrieved content must be treated as untrusted because of prompt injection.