Model Context Protocol (MCP)

Open standard protocol that enables AI models to securely access external tools, data sources, and services through a unified interface.

What is Model Context Protocol?

MCP is a standardized interface developed to allow language models and AI systems to connect with external resources. It defines how models can request data, invoke tools, and interact with services in a safe, scalable way. MCP enables interoperability between different AI frameworks and external systems.

Core Concepts

Typical Use Cases

Mental Model

Think of MCP as a universal adapter for AI models. It's a standardized way for models to say "I need data" or "I want to call this function" and have any system understand. Once your tool speaks MCP, any model can use it—eliminating custom integration work.

Architecture Overview


[AI Model / Client]
         |
      MCP Protocol (JSON-RPC)
         |
    [MCP Server]
    ├─ Resources (Data/Files)
    ├─ Tools (Callable Functions)
    ├─ Prompts (Templates)
    └─ Sampling (Model Capabilities)
         |
[External Services / Databases]
      

MCP defines a standardized bidirectional protocol. Models request resources or invoke tools through MCP servers, which abstract the complexity of connecting to diverse backend systems. Security and schema validation are built-in.

Key Concepts Glossary

When to Use MCP

Choose MCP if you need:

Consider alternatives if:

Getting Started

Install MCP SDK and create your first server:

pip install mcp
mcp create-server my-server

→ MCP Documentation

Resources for Further Learning