PTENES
Skip to content
MODULE 3.1

πŸ”Œ What MCP Servers Are

MCP is the protocol that turns Claude Code from a "file reader" into a "systems operator." Here you'll understand the architecture, the tools schema, and why MCP is the standard that connects agents to the real world. Each new term is explained as it comes up.

6
Topics
~40
Minutes
T1-T2
Prerequisite
Theory
Type
Progress: 0% 0 of 6

πŸ“– Living glossary

Key terms in this track. Come back here whenever you need to.

MCP (Model Context Protocol) β€” an open protocol that lets AI agents (such as Claude Code) discover and use external tools in a standardized way via JSON-RPC.
Tool β€” a function that the MCP server exposes to the agent. It has a name, description, and input schema. E.g.: read_file, query_db.
Schema (inputSchema) β€” the JSON Schema description of the parameters a tool accepts. The agent uses it to know what to send.
Protocol β€” a set of rules that defines how two programs communicate. MCP uses JSON-RPC over stdio or HTTP.
Server β€” the process that exposes tools via MCP. It can be a Node.js script, a binary, or a Docker container.
Client β€” whoever consumes the server's tools. In our case, Claude Code is the MCP client.
1

πŸ“‘ The MCP Protocol Explained

Imagine it this way: You hire an assistant who speaks 10 languages. But if every vendor invents its own language, the assistant has to learn 10 grammars. MCP is the "universal language" all vendors use to communicate with AI agents.

MCP means Model Context Protocol. It’s a protocol open, created by Anthropic and released to the entire community, which standardizes how AI agents discover and use external tools. Before MCP, each tool had its own integration. Now a single protocol connects the agent to any service that implements the pattern.

In practice, MCP uses JSON-RPC 2.0 about a communication channel (usually stdio for local processes, or HTTP with SSE for remote servers). The agent sends a JSON message saying "I want to call tool X with these parameters," and the server responds with the result, also in JSON. Simple, predictable, and extensible.

CLIENT (Claude Code) SERVER (MCP Server) tools/call { name, args } { content: [result] }

The client (Claude Code) sends a JSON-RPC request; the server executes it and returns the result.

In one sentence: MCP is the standardized JSON-RPC that lets the agent call any external tool with a single protocol.

2

πŸ—οΈ Client-Server Architecture

Imagine it this way: A restaurant. The waiter (client) takes the order and brings it to the kitchen (server). The kitchen prepares the dish and sends it back. The waiter doesn't need to know how to cook; the kitchen doesn't need to know how to serve. Each does its part.

In the MCP, the client and Claude Code. It knows how to talk to the user, plan tasks, and decide when it needs a tool. The server is a separate process that knows how to do something specific: read files, query a database, send an email. The client finds out what the server offers (via tools/list), and then calls the tool you need (via tools/call).

The channel between them can be stdio (the client starts the server as a child process and communicates via stdin/stdout) or HTTP + SSE (the server runs remotely and accepts connections). In day-to-day use with Claude Code, you almost always use stdio: the agent spawns the MCP process, communicates with it, and kills it when the session ends.

1. initialize 2. tools/list 3. tools/call 4. shutdown repeat N times Handshake ofcapabilities Client discoversavailable tools Client invokesthe required tool Terminates the processfrom the server

Who is the β€œclient” in Claude Code’s MCP ecosystem?

In one sentence: Claude Code (client) starts the MCP server, discovers the tools, calls what it needs, and shuts down.

3

πŸ“‹ Tool Discovery and Schemas

When the client connects to an MCP server, the first thing it does (after the handshake) is request the list of tools available via tools/list. Each tool comes with three things: a name (e.g., read_query), you description (text that explains what it does), and a inputSchema (JSON Schema saying which parameters it accepts).

The agent reads the schema and "understands" which parameters it needs to provide. It's as if each tool came with a built-in manual. The better the description and schema, the more often the agent gets it right the first time. A bad schema is like giving it a form without labels: the agent will guess.

exemplo-tool-schema.json
{
  "name": "read_query",
  "description": "Execute a SELECT query against the database",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": {
        "type": "string",
        "description": "The SQL SELECT query to execute"
      }
    },
    "required": ["query"]
  }
}

The schema is the contract

The inputSchema works exactly like an OpenAPI JSON Schema. If you've worked with REST APIs documented using Swagger/OpenAPI, the mechanism is identical: the schema describes types, required fields, and descriptions. The difference is that the one reading the schema isn't a human developer, but the AI agent itself.

In one sentence: each tool has a JSON schema that the agent reads to know exactly what to send.

4

πŸ’‘ Why MCP Matters

Imagine it this way: before USB, every device had a different connector. USB standardized the connection, and the peripheral ecosystem exploded. MCP is the "USB for AI agents."

Without MCP, Claude Code only has its built-in tools: reading/writing files, running bash, and searching the web. It works, but it’s like a computer without USB ports: it handles the basics and stops there. With MCP, you can plug in as many β€œperipherals” as you want: a database, Slack, email, calendar, any API.

The practical impact is huge. Instead of writing glue scripts for each integration, you configure an MCP server and the agent figures it out on its own what it can do. Standardization means any MCP server built by anyone works with any MCP client. Unlimited composition.

Without MCP

  • * Built-in tools only (file, bash, web)
  • * Each integration = custom script
  • * Doesn’t scale: 5 integrations = 5 scripts
  • * Agent limited to the filesystem

With MCP

  • * Hundreds of tools via a standard protocol
  • * Single config in settings.json
  • * Scales: 50 tools = same pattern
  • * Agent operates DBs, APIs, SaaS, everything

In one sentence: MCP turns Claude Code from a "file editor" into a "systems operator connected to everything."

5

🌍 Current Ecosystem

The MCP ecosystem is already vast. There are more than 200 open source servers covering categories such as: DevOps (Git, Docker, Kubernetes), Database (Postgres, SQLite, Redis, MongoDB), SaaS (Slack, Notion, Linear, Gmail, Calendar), Cloud (AWS, GCP, Cloudflare), and Utilities (browser automation, web search, file conversion).

Anthropic's official servers cover the basics: filesystem, git, SQLite, Postgres, puppeteer, brave-search. The community contributes the rest. Repositories such as awesome-mcp-servers on GitHub is the marketplace Smithery.ai are the best starting points for discovering what's available.

Main ecosystem categories

πŸ“
DevOps

Git, Docker, K8s, CI/CD

πŸ—„οΈ
Database

Postgres, SQLite, Redis, Mongo

πŸ’¬
SaaS

Slack, Notion, Linear, Gmail

☁️
Cloud

AWS, GCP, Cloudflare

🌐
Web

Browser, search, scraping

πŸ› οΈ
Useful

PDF, image, email, calendar

In one sentence: 200+ open-source servers, from Git to Slack, ready to plug into Claude Code.

6

πŸ”„ Analogy with REST APIs

If you've worked with REST APIs, MCP will feel familiar. In REST, you have endpoints (GET /users, POST /orders). With MCP, you have tools (list_users, create_order). With REST, the documentation comes in an OpenAPI spec. With MCP, it comes in the inputSchema.

The fundamental difference: REST was made for human developers to call via code. MCP was made for AI agents call automatically. That's why the schema is more descriptive (the agent needs to "understand" what the tool does just by reading its description) and discovery is automatic (the agent lists the tools at runtime, without reading documentation).

AspectREST APIMCP
UnitEndpoint (URL + method)Tool (name + schema)
DocumentationOpenAPI / SwaggerinputSchema (JSON Schema)
DiscoveryManual (read the docs)Automatic (tools/list)
ConsumerHuman-written codeAI Agent (automatic)
TransportHTTPstdio or HTTP+SSE

In one sentence: MCP is like a REST API, but with automatic discovery and optimized for agents (not humans).

🧾 Module Summary

βœ“
MCP = standard protocol β€” JSON-RPC that connects agents to external tools.
βœ“
Client-Server β€” Claude Code (client) discovers and calls tools from each server.
βœ“
Schema = contract β€” each tool declares what it accepts via JSON Schema.
βœ“
Vast ecosystem β€” 200+ open-source servers, from Git to Slack.

Next module:

3.2 β€” Your First MCPs: hands-on with Filesystem, Git, and SQLite.