MCP: the 11-Step Guide to the Protocol That Connects Agent to Everything

@0xRafy
0xRafy@0xRafy
42 views Aug 14, 2026 ~12 min read
Advertisement

Before USB, every device had its own cable. MCP is USB for AI agents. 400M+ monthly SDK downloads. 10,000+ servers. Adopted by every major AI lab.

Media image

Before USB, every device had its own cable. Printers, scanners, keyboards, cameras. A drawer full of proprietary connectors that worked with exactly one device.

Then USB arrived and one port handled everything. MCP is that moment for AI agents. One protocol to connect Claude to any tool, any database, any API.

Follow my Substack to get fresh AI alpha: movez.substack.com

No more custom wrappers per service.No more rebuilding integrations per project.No more hardcoding tool calls in every agent. Anthropic open-sourced it in November 2024. By 2026: OpenAI, Google, Microsoft, and AWS all adopted it. 10,000+ servers in production. This is the complete guide.

Before MCP, a company that wanted its internal database, its ticketing system, and its CI pipeline all reachable by an AI agent had to write separate glue code for every combination of model and tool.

Different API shapes, different auth flows, different error handling. Every integration was custom. Every migration was a rewrite.

MCP replaces that with a single open standard. Build one server, any MCP-compatible client uses it. Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Amazon Bedrock, custom agents.

Media image

One integration, every client. On July 28, 2026, the biggest spec revision in MCP's history shipped: stateless core, extensions system, enterprise-grade auth. This guide covers all of it.

Before MCP: one integration per model per tool. After MCP: one server, every client.


01. What MCP actually is

MCP (Model Context Protocol) is an open standard that lets AI models connect to external tools, files, and data sources through a single interface.

Instead of writing custom glue code for every combination of model and service, you build one MCP server and any MCP client can use it.

Media image

The analogy: USB standardized how devices talk to computers. MCP standardizes how AI agents talk to the world. Before USB, every printer needed its own driver and its own cable.

After USB, one port handles everything. Before MCP, every agent needed custom code for every integration. After MCP, one server handles every client.

Media image

02. The timeline

  • November 2024: Anthropic open-sources MCP. Quiet launch. Mostly used on personal laptops for local development.
  • March 2025: OpenAI, Google, and Microsoft announce adoption. MCP goes from Anthropic side project to industry standard overnight.
  • July 2025: Every major IDE supports it. Cursor, Windsurf, VS Code. Claude Code ships with MCP built in. SDK downloads cross 97 million/month.
  • 2026: 10,000+ public servers in production. 400M+ monthly SDK downloads, 4x increase year-over-year. SDKs in 11 languages. Now governed by the Agentic AI Foundation under the Linux Foundation.
  • July 28, 2026: Biggest spec revision in MCP history ships. Stateless core replaces the session-dependent model. Extensions system. Enterprise Managed Authorization. The protocol grows up.

  • 03. The architecture

    MCP has three roles: host, client, and server.

    Media image
  • The host is the application the user interacts with. Claude Desktop, Claude Code, Cursor, a custom app. One host can manage multiple clients.
  • The client lives inside the host. Each client maintains a 1:1 connection with a single MCP server. The client translates between the host's internal protocol and MCP.
  • The server exposes capabilities: tools, resources, and prompts.
  • A Postgres MCP server exposes run_query as a tool and database tables as resources. A GitHub MCP server exposes create_pr, list_issues, read_file as tools.

    Media image

    04. Three primitives

    MCP servers expose three types of capabilities:

    Media image
  • Tools are functions the model can call. run_query, create_pr, send_email. The model decides when to call them. You execute them and return the result. This is the most used primitive.
  • Resources are data the model can read. Files, database schemas, API docs, configuration. Resources provide context without requiring a function call. Think of them as files the model can access on demand.
  • Prompts are reusable templates the server can offer. Pre-built instructions for common tasks. The model or user can invoke them. Less used than tools and resources, but useful for standardizing workflows across teams.
  • # A minimal MCP server exposes tools, resources, or both
    
    # Tool: a function the model can call
    {
        "name": "run_query",
        "description": "Execute a read-only SQL query",
        "inputSchema": {
            "type": "object",
            "properties": {"query": {"type": "string"}},
            "required": ["query"]
        }
    }
    
    # Resource: data the model can read
    {
        "uri": "postgres://mydb/schema",
        "name": "Database Schema",
        "mimeType": "application/json"
    }

    05. Build your first server

    An MCP server is a program that exposes tools, resources, or both over a standard protocol. You can build one in TypeScript or Python using Anthropic's official SDKs.

    The server below exposes one tool (run a SQL query) and one resource (the database schema).

    import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
    
    const server = new McpServer({
      name: "postgres-mcp",
      version: "1.0.0"
    });
    
    // Tool: run a read-only query
    server.tool(
      "run_query",
      "Execute a read-only SQL SELECT query",
      { query: { type: "string", description: "SQL SELECT query" } },
      async ({ query }) => {
        const rows = await db.query(query);
        return { content: [{ type: "text", text: JSON.stringify(rows) }] };
      }
    );
    
    // Resource: database schema
    server.resource(
      "schema",
      "postgres://mydb/schema",
      async () => ({
        contents: [{ uri: "postgres://mydb/schema",
                     text: await getSchemaJSON() }]
      })
    );
    
    server.listen();

    That is a working MCP server. Claude Code, Claude Desktop, Cursor, or any MCP client can connect to it and use both the tool and the resource. One server, every client.


    06. Connect to Claude

    Three ways to connect your server to Claude:

    Media image
  • Claude Desktop: add the server to your claude_desktop_config.json. Claude Desktop starts the server automatically and makes its tools available in Cowork and Chat.
  • {
      "mcpServers": {
        "postgres": {
          "command": "npx",
          "args": ["tsx", "server.ts"],
          "env": {"DATABASE_URL": "postgres://..."}
        }
      }
    }
  • Claude Code: use the claude mcp add command. The server is available immediately in your coding session.
  • Claude API: pass an mcp_servers parameter in your API call. The server runs remotely and Claude calls its tools as needed during the conversation.

  • 07. The 2026-07-28 spec

    On July 28, 2026, MCP shipped its biggest revision since launch. The core change: MCP went stateless. The old spec required a persistent bidirectional connection with session management.

    Media image

    The new spec uses a lightweight request/response model. No sessions, no handshakes, no persistent connections.

    Why this matters: stateless servers can run behind load balancers, scale horizontally, cache responses, and deploy on standard cloud infrastructure. The old spec worked on laptops. The new spec works at enterprise scale.

    Extensions replace what used to be baked into the core spec. Tasks (for long-running operations), Enterprise Managed Authorization, and other capabilities are now opt-in extensions. Your server includes what it needs and nothing more.

    Enterprise Managed Authorization (EMA) is now stable. Organizations can centrally manage auth for all their MCP servers. End users log in once and access every connected server. Adopted by Anthropic, Microsoft, and Okta.

    If you built MCP servers before July 2026, they will still work for at least 12 months (deprecation guarantee).
    But new servers should target the 2026-07-28 spec. The stateless core is simpler to implement and deploy.

    08. Security

    MCP's rapid growth came with security problems. Independent scans found exploitable flaws in a large share of public servers. NSA and CISA issued formal guidance. Security is not optional.

    Media image
  • Auth. Every production MCP server needs authentication. The 2026-07-28 spec adds the iss (issuer) parameter for token validation. Use OAuth 2.1 for remote servers. Never ship a server without auth to production.
  • Input validation. The model generates the tool inputs. That means the inputs can be anything. SQL injection, path traversal, command injection are all possible if you pass model-generated inputs directly to your system without validation. Treat every tool input like untrusted user input.
  • Least privilege. A database MCP server should expose read-only queries, not full database access. A GitHub MCP server for code review should not have permission to delete repositories. Give each server the minimum permissions it needs.
  • # MCP Server Security Checklist
    
    1. Auth on every endpoint (OAuth 2.1 for remote)
    2. Validate all tool inputs (SQL injection, path traversal)
    3. Read-only by default. Write access only when needed.
    4. Rate limiting on tool calls
    5. Log every tool invocation for audit
    6. Pin SDK versions. Check changelogs before upgrading.
    7. Never expose secrets in tool descriptions or error messages

    09. Finding existing servers

    Before you build a server, check if one already exists. 10,000+ public MCP servers are available. Most common services already have community or official servers.

    Media image
  • Official Anthropic servers: GitHub, Slack, Google Drive, Google Maps, Postgres, Puppeteer, filesystem, memory. These are maintained by Anthropic and follow the latest spec.
  • Community servers: search GitHub for "mcp-server-[service]". Notion, Linear, Jira, Stripe, Supabase, MongoDB, Elasticsearch, and hundreds more. Quality varies. Check stars, recent commits, and whether auth is properly implemented before connecting to production data.
  • Directories: mcp.so, Smithery, Glama all index public MCP servers with descriptions, install commands, and ratings.
  • Evaluation checklist for community servers: Does it implement auth? Does it validate inputs? Is it actively maintained (commits in last 30 days)?
    Does it target the 2026-07-28 spec or an older revision? Does it follow least-privilege (read-only where appropriate)?

    10. MCP in production

    Running MCP locally on your laptop is step one. Running it in production with real users, real data, and real security requirements is step two.

    Media image
  • Deployment. With the 2026-07-28 stateless spec, MCP servers deploy like any other HTTP service. Docker, Kubernetes, AWS Lambda, Cloudflare Workers. No special infrastructure. Cloudflare's Agents SDK supports the new spec from day zero, so you can run MCP servers directly in Workers.
  • Monitoring. Log every tool invocation: what was called, what inputs were sent, what was returned, how long it took. When something breaks at 3am, the logs are the only thing that tells you why.
  • Scaling. Stateless servers scale horizontally behind a load balancer. No sticky sessions, no shared state between instances. This is the entire point of the 2026-07-28 revision. The old spec required persistent connections that made scaling painful.

  • 11. What comes next

    MCP started as a way to connect AI to tools. It is becoming the infrastructure layer for the entire agentic ecosystem.

  • Agent-to-Agent (A2A). Google's protocol for agents talking to other agents. MCP handles agent-to-tool. A2A handles agent-to-agent. They are complementary, not competing. An agent uses MCP to call a tool and A2A to coordinate with another agent.
  • Agentic AI Foundation. MCP is now governed by the Linux Foundation's Agentic AI Foundation. Anthropic still maintains the spec, but governance is shared with AWS, Microsoft, Google, and the community. This means the protocol will outlive any single company's interest in it.
  • Extensions ecosystem. The 2026-07-28 spec introduced a formal extensions system. Official extensions (like Tasks and EMA) come from the spec team. Custom extensions can be built by anyone. This is how MCP grows without bloating the core protocol.
  • MCP's position in 2026 is similar to HTTP's position in 1995. The protocol is young, fast-growing, and not fully standardized.
    But the adoption curve is steep enough that betting against it is harder than betting on it. Every major AI lab is building on it. The question is not whether MCP wins. The question is how fast.

    #

    6 MCP servers to build or connect this week

  • Postgres MCP: Connect Claude to your database. Read-only queries, schema inspection, sample data. Claude writes SQL against your actual schema instead of guessing.
  • GitHub MCP: Create PRs, read issues, list files, search code. Claude Code uses this to interact with your repos beyond the local filesystem.
  • Slack MCP: Read channels, post messages, search history. Your agent can report status, ask questions, and share results in the channels your team already uses.
  • Notion MCP: Read pages, search content, create entries. Claude accesses your company knowledge base instead of relying on its training data.
  • Filesystem MCP: Read, write, search, and organize files on disk. The basic building block for any local agent. Ships with the official MCP server collection.
  • Your internal API: Wrap your company's internal tools as an MCP server. One server, every AI tool in your org gets access. The highest-leverage MCP server you can build.

  • Five MCP mistakes

  • xNo auth on production servers. A public MCP server without authentication is an open door to your database. Every production server needs OAuth 2.1 or equivalent.
  • xTrusting model-generated inputs. The model generates tool arguments. Those arguments can contain SQL injection, path traversal, or command injection. Validate everything.
  • xBuilding before searching. 10,000+ servers exist. Check GitHub, mcp.so, and Smithery before writing your own. The Postgres, GitHub, and Slack servers are already production-grade.
  • xVague tool descriptions. Claude reads tool descriptions to decide when and how to call them. "Run a query" is vague. "Execute a read-only SQL SELECT query against the PostgreSQL database, max 1000 rows" is precise. Precision prevents wrong calls.
  • xTargeting the old spec. The 2026-07-28 stateless core is simpler to implement and deploy than the old session-based model. New servers should target the new spec.

  • Conclusion:

    Before USB, a drawer full of cables. Before MCP, a codebase full of wrappers.

    Every time you hardcode a tool call, you are writing a proprietary cable. It works for one model, one service, one project. When the model changes, the cable breaks. When the service updates its API, the cable breaks. When you move to a new project, you write the cable again.

    MCP replaces the drawer with one port. Build the server once. Every client gets it. Add a new model? Zero new integrations. Add a new tool? One new server. N+M instead of NxM.

    The protocol is 18 months old. It already has 400 million monthly downloads, 10,000+ servers, and adoption from every major AI lab. The question is not whether to learn MCP. The question is how long you wait.

    One server. Every client. That is the entire pitch. That is why it won.

    Actions
    What You Can Do
    • Export as PDF or Markdown
    • Batch Export to Notion
    • Bookmark & Highlight
    • LinkedIn & Instagram Carousel Maker
    Create Free Account

    Includes 7-day Premium trial

    Advertisement