Model context protocol (MCP): The complete guide for 2026

App DevelopmentNov 20, 2025 · 12 min read

Model Context Protocol (MCP) is an open standard by Anthropic that lets AI models connect to external tools, data sources, and services through one universal interface. It cuts the integration problem from N x M custom connections down to N + M by having both sides implement one protocol once. RaftLabs uses MCP as the default integration pattern across all AI agent projects, cutting integration time by 60-70% compared to custom builds.

Key Takeaways

  • MCP cuts the AI tool integration problem from N x M custom integrations to N + M. Each AI app and each tool implements the protocol once, then interoperates automatically.
  • The architecture uses MCP servers (expose tools, resources, prompts) and MCP clients (Claude, Cursor, Windsurf) communicating via JSON-RPC 2.0 over stdio or Streamable HTTP.
  • MCP and function calling work together. The LLM uses function calling to express intent, the MCP client translates it into an MCP tool call, and the MCP server executes it.
  • MCP servers handle their own authentication. AI models never see credentials directly, which is a better security model than passing secrets through the LLM context window.
  • Google's A2A protocol complements MCP. MCP handles tool access (vertical integration). A2A handles agent-to-agent communication (horizontal coordination).

Model Context Protocol (MCP) is an open standard that defines how AI models connect to external tools, data sources, and services. Think of it as USB-C for AI: a universal interface that lets any MCP-compatible model talk to any MCP-compatible tool.

TL;DR

MCP standardizes the connection between AI models and external tools. It uses a client-server architecture where MCP servers expose capabilities (tools, resources, prompts) and MCP clients (AI applications) consume them. MCP solves the N x M integration problem -- instead of every AI app building custom integrations for every tool, both sides implement one protocol. The tooling already includes Claude, Cursor, Windsurf, and dozens of community-built servers. If you're building AI applications that need tool access, MCP is the integration pattern to adopt.

Why MCP was created

Before MCP, connecting an AI model to external tools required custom integration for every combination. If you had 5 AI applications and 10 tools, you needed 50 custom integrations. Each with its own format for describing tools, passing parameters, and returning results.

This N x M problem gets worse as the stack grows. Every new AI application needs to integrate with every existing tool. Every new tool needs to support every AI application. For teams building AI agents, this integration overhead was consuming 30-40% of development time before MCP.

Netguru's 2025 analysis found enterprise-level API integrations often cost over $50,000 to build, with annual maintenance exceeding $200,000 for complex systems. MCP turns that recurring cost into a one-time protocol implementation.

Key Insight

MCP reduces the integration problem from N x M to N + M. Each AI application implements the MCP client protocol once. Each tool implements the MCP server protocol once. They all interoperate automatically.

MCP reduces this to N+M. Each AI application implements the MCP client protocol once. Each tool implements the MCP server protocol once. They all interoperate automatically.

Anthropic created and open-sourced MCP in late 2024. By early 2026, it had become the de facto standard for AI tool integration -- now governed by the Linux Foundation with formal Working Groups. MCP adoption grew from roughly 100,000 monthly SDK downloads in November 2024 to over 8 million by April 2025, with 97 million cumulative downloads across Python and TypeScript. In March 2025, OpenAI adopted MCP across its Agents SDK, Responses API, and ChatGPT desktop app -- a signal that the standard had crossed the enterprise adoption threshold.

Integration complexity: before vs after MCP

Without MCP (N x M)With MCP (N + M)
5 AI apps + 10 tools50 custom integrations15 protocol connections
Adding 1 new AI app10 new integrations needed1 protocol implementation
Adding 1 new tool5 new integrations needed1 server implementation
Integration dev time30-40% of project time60-70% reduction

Architecture: clients, servers, and the protocol

MCP uses a client-server architecture with three core concepts:

MCP servers

An MCP server is a lightweight program that exposes capabilities to AI applications. A server might provide:

  • Tools: Functions the AI can call (e.g., search_database, send_email, create_ticket)

  • Resources: Data the AI can read (e.g., files, database records, API responses)

  • Prompts: Pre-built prompt templates for common tasks

A single MCP server typically wraps one service or domain. There's an MCP server for GitHub (exposes repo operations), one for Slack (exposes messaging), one for PostgreSQL (exposes database queries), and so on.

MCP clients

An MCP client is the AI application that connects to MCP servers. Claude Desktop, Cursor, Windsurf, and custom AI applications all act as MCP clients. The client discovers available tools from connected servers and makes them available to the AI model.

The protocol

MCP uses JSON-RPC 2.0 over stdio (for local servers) or Streamable HTTP (for remote servers -- the production-ready transport that replaced the earlier HTTP+SSE approach). The protocol defines:

  • Initialization: client and server negotiate capabilities

  • Tool discovery: client asks the server what tools are available

  • Tool execution: client sends a tool call, server executes and returns results

  • Resource access: client requests data from the server

  • Notifications: server sends updates to the client

The protocol is stateful -- a connection persists across multiple interactions, letting servers maintain context between calls. This is different from a one-off HTTP call. The server stays running, knows who you are, and can carry state forward. That statefulness is why MCP suits multi-step agentic workflows better than a raw API call does.

MCP protocol flow

  1. 01
    JSON-RPC 2.0

    Initialization

    Client and server negotiate capabilities and establish a persistent connection.

  2. 02
    Dynamic discovery

    Tool discovery

    Client asks the server what tools are available. Server returns names, descriptions, and input schemas.

  3. 03
    Server-side execution

    Tool execution

    Client sends a tool call with parameters. Server validates, executes, and returns structured results.

  4. 04
    Read-only data

    Resource access

    Client requests data from the server - files, database records, API responses.

  5. 05
    Async updates

    Notifications

    Server sends updates to the client for long-running operations or state changes.

MCP vs function calling: the difference most articles miss

Function calling and MCP solve related but different problems -- and most articles blur them together.

Function calling defines how an LLM outputs structured requests. The LLM says "I want to call function X with parameters Y." Your application code handles the actual execution. Function calling is a per-call output format. It's stateless. Each call is independent.

MCP standardizes the entire tool integration lifecycle: discovery, description, execution, and result handling. It's a persistent, session-level connection. The server stays alive across multiple tool calls. That matters in an agentic workflow where the same agent calls the same GitHub server a dozen times in one run -- the connection doesn't need to be re-established each time.

The practical difference: use function calling when you're calling a single API once and writing the execution code yourself. Use MCP when you need a reusable, persistent tool that multiple agents or sessions call repeatedly. If you're only hitting one endpoint in one script, HTTP function calling is simpler. MCP earns its weight when the same tool needs to work across Claude Desktop, a custom agent, a CI job, and a Slack bot -- all without rewriting the integration.

AspectFunction callingMCP
ScopeLLM output formatFull tool integration protocol
DiscoveryTools defined in the promptDynamic discovery from servers
ExecutionYour code executesServer executes
Session modelStateless, per-callStateful, persistent connection
PortabilityTied to one LLM providerWorks across LLM providers
CommunityCustom per applicationShared servers across applications

In practice, MCP and function calling work together. The LLM uses function calling to express its intent. The MCP client translates that intent into an MCP tool call. The MCP server executes it and returns the result.

Which MCP servers actually matter

The community registry lists thousands of servers, but most developer use cases fall into four categories.

Filesystem -- read and write local files. This is the single most common use case for AI coding tools. Claude Desktop ships with filesystem MCP support built in.

GitHub -- search repos, read files, open issues, create PRs. Any developer workflow that touches code benefits from this one.

Slack -- read channels, post messages, search history. Most internal AI agents need some form of team communication access.

Databases (PostgreSQL, SQLite, MongoDB) -- run queries, read schemas, fetch records. Essential for any agent that needs to check or update data.

Those four cover roughly 80% of what developer teams actually build. The rest -- cloud services, search, project management tools, external APIs -- are useful but long-tail. Start with the four above. Add others only when a specific workflow demands them.

If you're scoping an MCP project and your list of required servers is already 15 items long, that's a sign to slow down. Build one server well, ship it, and see what actually gets used.

Security: the one thing teams underestimate

MCP servers run on the local machine by default. That gives them the same filesystem access as any other local process.

A malicious or poorly written MCP server can read your SSH keys, browse your code, or exfiltrate files. This isn't theoretical -- it's the standard operating model for stdio transport. The server process runs as you.

For developers using MCP on their own machines, this is a manageable risk. Review the server code before installing it. Stick to official servers from the MCP registry or well-known maintainers.

For teams deploying MCP to non-technical staff, the risk profile is different. A finance analyst who installs an unofficial "Excel helper" MCP server doesn't know to audit the source code. In those environments, run MCP servers inside sandboxed containers with explicit filesystem and network permissions. Use remote Streamable HTTP transport instead of stdio -- that way the server runs on infrastructure you control, not on the user's laptop.

The 2026 MCP roadmap is adding enterprise security patterns -- SSO integration, audit trails, gateway-based authorization. Until those ship broadly, the practical answer is: treat every MCP server like a binary you're running as your own user, because that's exactly what it is.

How to build MCP servers for AI agent integration

Building an MCP server is straightforward. The official SDKs (TypeScript and Python) handle protocol details. You focus on defining your tools and implementing their logic.

An MCP server implementation has three parts:

1. Define tools. Each tool has a name, description, and input schema (JSON Schema format). The description is critical -- it's what the LLM reads to decide when to use the tool.

2. Implement handlers. Each tool has a handler function that receives validated parameters and returns results. Handlers can call APIs, query databases, read files -- anything.

3. Configure transport. For local use, stdio transport is simplest -- the server communicates via standard input/output. For remote deployment, use Streamable HTTP transport.

Server design principles

One server per service. Don't cram everything into one server. A GitHub server, a Slack server, a database server -- each focused on one domain.

Descriptive tool names. The LLM uses tool names to understand capabilities. search_issues_by_label is better than search.

Rich descriptions. Include usage examples in tool descriptions. "Search for GitHub issues. Example: search for open bugs labeled 'critical' in the backend repo." The LLM uses these descriptions for reasoning.

Structured outputs. Return JSON objects, not free text. Let the LLM format the output for the user.

Error handling. Return error objects with clear messages. Don't let servers crash on bad input.

How MCP and function calling work together

  1. 01
    Input

    User asks a question

    The user sends a natural language request to the AI application.

  2. 02
    LLM output format

    LLM uses function calling

    The LLM outputs a structured request expressing its intent to call a specific tool with parameters.

  3. 03
    Protocol bridge

    MCP client translates

    The MCP client takes the function call and translates it into an MCP tool call to the appropriate server.

  4. 04
    Server-side

    MCP server executes

    The server validates parameters, runs the tool logic (API call, database query, etc.), and returns structured results.

  5. 05
    Output

    Result returns through the chain

    The result flows back through the MCP client to the LLM, which formats a natural language response for the user.

The MCP community and tooling

The MCP community has grown rapidly:

Major clients

  • Claude Desktop and Claude Code: Anthropic's own products support MCP natively

  • Cursor: the AI code editor uses MCP for tool integration

  • Windsurf: Codeium's editor with MCP support

  • Continue: open-source AI code assistant with MCP

  • Custom applications: any application using the MCP SDK

Community and official MCP servers exist for:

  • Development tools: GitHub, GitLab, Linear, Jira

  • Communication: Slack, Discord, email

  • Databases: PostgreSQL, SQLite, MongoDB

  • Cloud services: AWS, Google Cloud, Vercel

  • File systems: local file access, Google Drive, S3

  • Search: Brave Search, Google Search, web scraping

The MCP server registry tracks available servers. The community has grown from 100+ servers at launch to thousands, with 97 million cumulative SDK downloads across TypeScript and Python.

The 2026 MCP roadmap

MCP's 2026 roadmap focuses on four priority areas:

1. Transport scalability. Streamable HTTP is now the production-standard transport, replacing the earlier HTTP+SSE approach. It supports horizontal scaling, stateless operation, and enterprise-grade load balancing.

2. Server discovery. MCP Server Cards -- a .well-known URL pattern -- let clients automatically discover MCP servers and their capabilities. This enables a registry-free, decentralized discovery model.

3. Agent communication. The Tasks primitive supports long-running operations that can take minutes or hours, with progress reporting and cancellation. This is important for agentic workflows where a single tool call might trigger a complex multi-step process.

4. Enterprise readiness. Security, governance, and audit capabilities are the biggest focus. MCP wasn't originally designed with enterprise security in mind -- SSO integration, audit trails, and gateway-based authorization are being standardized.

MCP and A2A: complementary standards

Google's Agent-to-Agent Protocol (A2A) complements MCP rather than competing with it. MCP handles how AI models connect to tools and data (vertical integration). A2A handles how AI agents communicate with each other (horizontal coordination). In practice, a multi-agent system uses MCP for tool access and A2A for inter-agent coordination. Both standards are converging on similar principles -- structured communication, capability discovery, and security-first design.

What model context protocol means for AI agent development

MCP changes how we think about building AI applications:

Composability

Instead of building monolithic AI applications with hardcoded integrations, you compose capabilities from MCP servers. Need GitHub access? Add the GitHub MCP server. Need database queries? Add the PostgreSQL server. Your AI application gains new capabilities without code changes.

Network effects

As more servers get built, every MCP-compatible application benefits. A new Salesforce MCP server instantly works with Claude, Cursor, and every other MCP client. This network effect speeds up the entire community.

Security model

MCP servers run with their own credentials and permissions. The AI model never sees your credentials directly -- the MCP server handles authentication. This is a better security model than passing credentials through the LLM's context window.

Local-first development

For development and testing, MCP servers run locally. No cloud infrastructure needed. This makes it practical to build and iterate on AI tool integrations without deploying anything.

Getting started with MCP

At RaftLabs, MCP is our default integration pattern for connecting AI agents to external services across all client projects. Here's our recommended approach:

For consuming MCP servers: Start with existing community servers. Connect your application to a few servers that cover your use case. Most common services already have MCP servers.

For building MCP servers: Use the official TypeScript or Python SDK. Start with a single tool, test it with Claude Desktop or Cursor, then expand. The MCP documentation has quickstart guides for both languages.

For production deployment: Run MCP servers as standalone processes alongside your application. Use Streamable HTTP transport for remote servers. Implement authentication, rate limiting, and logging at the server level. Consider an MCP Security Gateway for SSO integration and audit trails in enterprise environments.

MCP is maturing rapidly under Linux Foundation governance. The 2026 roadmap -- Streamable HTTP transport, Server Cards for discovery, Tasks primitive for long-running operations, and enterprise security patterns -- addresses the gaps that early adopters hit. The core protocol is stable and production-ready today. We've deployed MCP-based integrations in production across healthcare, fintech, and commerce at RaftLabs, and the pattern consistently cuts integration development time by 60-70% compared to custom integrations.

60-70%Less integration dev timeMCP-based integrations vs custom integrations, measured across RaftLabs production deployments.

Model Context Protocol cuts the AI tool integration problem from N x M custom connections to N + M by standardizing how AI models connect to external tools and data. The architecture uses MCP servers (expose tools, resources, prompts) and MCP clients (Claude, Cursor, custom applications) communicating via JSON-RPC 2.0. The community already includes 100+ servers covering most common services. MCP and function calling work together: the LLM expresses intent via function calling, the MCP client translates it, and the MCP server executes it. For teams building AI agents, MCP is the integration pattern to adopt today.

Ask an AI

Get an instant summary of this post from your preferred AI assistant.

Frequently asked questions

RaftLabs uses MCP as the default integration pattern across all AI agent projects, with 100+ products shipped. We have deployed MCP-based integrations in healthcare, fintech, and commerce, consistently reducing integration development time by 60-70%. Our MCP server development guide and production templates accelerate delivery from months to weeks.
MCP is an open standard created by Anthropic that defines how AI models connect to external tools, data sources, and services. It uses a client-server architecture where MCP servers expose tools and MCP clients (Claude, Cursor) consume them. MCP reduces the integration problem from N x M custom connections to N + M, with 100+ community servers already available.
Function calling defines how an LLM outputs structured requests. MCP standardizes the entire tool integration lifecycle: discovery, description, execution, and result handling. They work together: the LLM uses function calling to express intent, the MCP client translates that into an MCP tool call, and the MCP server executes it and returns results.
Major MCP clients include Claude Desktop and Claude Code (Anthropic), Cursor (AI code editor), Windsurf (Codeium), and Continue (open-source). Any application built with the MCP SDK can act as a client. The community includes 100+ servers for GitHub, Slack, PostgreSQL, AWS, Google Drive, and more.
Use the official TypeScript or Python SDK. Define tools with names, descriptions, and JSON Schema inputs. Implement handler functions for each tool. Start with stdio transport for local development and test with Claude Desktop. Move to HTTP+SSE transport for production. See our MCP server development guide for step-by-step instructions.