mcp-lab-00-raw-protocol
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-lab-00-raw-protocolUse the add tool to sum 4 and 5 and show the raw JSON-RPC exchange"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-lab-00-raw-protocol
Nível 00 da trilha MCP Lab: implementação manual do protocolo MCP (Model Context Protocol) sobre stdio, sem usar o SDK oficial. O objetivo não é construir um servidor útil — é ver as mensagens JSON-RPC trocando de lado a lado com as próprias mãos, antes de deixar um SDK esconder isso de você.
Termos técnicos (Tool, Server, Client, Transport...) seguem o glossário em ../CONTEXT.md.
O que este Server faz
Um único Tool, de propósito — add, que soma dois números. É só o suficiente pra passar pelo ciclo completo: handshake → listar Tools → chamar um Tool.
sequenceDiagram
participant H as Host (Claude Code)
participant S as Server (este projeto)
H->>S: initialize (id: 1, protocolVersion)
S-->>H: result (protocolVersion, capabilities, serverInfo)
H->>S: notifications/initialized
Note over S: sem resposta — é uma Notification
H->>S: tools/list (id: 2)
S-->>H: result (lista de Tools: "add")
H->>S: tools/call (id: 3, name: "add", arguments: {a, b})
S-->>H: result (content: texto com a soma)Related MCP server: yifanli-mcp-add-demo
Como rodar
uv sync # instala as dependências
uv run pytest -q # roda os 15 testes
uv run ruff check . # lint
uv run mypy # checagem de tipos (modo strict)Pra ver o protocolo funcionando de verdade, sem o SDK, sem o Claude Code — só você mandando as mensagens na mão:
printf '%s\n' \
'{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18"}}' \
'{"jsonrpc": "2.0", "method": "notifications/initialized"}' \
'{"jsonrpc": "2.0", "id": 2, "method": "tools/list"}' \
'{"jsonrpc": "2.0", "id": 3, "method": "tools/call", "params": {"name": "add", "arguments": {"a": 4, "b": 5}}}' \
| uv run raw-mcp-protocolEstrutura do código
src/raw_mcp_protocol/
├── jsonrpc.py → camada de transporte: lê/escreve linhas JSON, não entende o conteúdo
├── server.py → camada de lógica: decide a resposta pra cada "method"
└── __init__.py → ponto de entrada: liga as duas camadas num loopCada camada tem seu próprio .md em docs/ explicando o pra-quê, o quê e como:
O que este nível deliberadamente NÃO faz
Não valida rigorosamente o ciclo de vida (chamar
tools/callantes doinitializenão é bloqueado) — fica como leitura, não como bloqueio ativo.Não implementa Resources, Prompts, Sampling, Roots nem Elicitation — isso é o Nível
02-resources-promptsem diante.Não roda sobre HTTP — isso é o Nível
04-remote-http-auth.
Referência oficial
modelcontextprotocol.io/specification — a fonte da verdade. As versões de protocolo hardcoded em server.py (SUPPORTED_PROTOCOL_VERSIONS) devem ser conferidas contra essa página se você estiver lendo isto muito tempo depois de escrito.
Available Tools
1 tooladdA
Soma dois números e devolve o resultado.
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| b | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description indicates a return value ('devolve o resultado') but does not explicitly state that the operation is side-effect free or pure. Since no annotations are present, the description carries the full burden and could be slightly more explicit.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no unnecessary words. It directly conveys the operation and result.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple addition tool, the description is complete: it states the inputs (two numbers), the operation (sum), and the output (result). No additional context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema provides names and types for the parameters, and the description mentions 'dois números', which loosely covers both. However, it does not add specific meaning beyond the schema, so it meets the baseline but does not exceed it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Soma dois números e devolve o resultado' clearly states the tool's function (addition) with a specific verb and resource. Even without siblings, the purpose is unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit usage guidance is provided, but the simple arithmetic nature makes the intended use obvious. There are no alternative tools to contrast with, so the absence of 'when to use' is acceptable but not fully informative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
1 tool update
v0.1.0- First observed
add
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of overlapping or ambiguous tool purposes. The single 'add' tool has a clear, singular function.
The tool name 'add' is clear, concise, and uses a lowercase verb style. With only one tool, there is no established pattern to fully evaluate, but the naming is appropriate and unambiguous.
A single tool feels minimal and thin for most practical use cases. It is not necessarily inappropriate for a very narrow addition-only server, but the count is at the borderline lower end.
The tool set only supports addition. If the intended domain is basic arithmetic, significant operations such as subtraction, multiplication, and division are missing, leaving substantial gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Host your MCP tool over streamable HTTP in one command.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseDqualityDmaintenanceA minimal Model Context Protocol server that provides a simple add(a, b) tool for computing the sum of two numbers.18MIT
- FlicenseBqualityNot gradedmaintenanceA minimal Model Context Protocol server that provides a simple tool for adding two integers. It serves as a demonstration of the official Python MCP SDK and is designed for local execution via stdio.1-
- FlicenseNot gradedqualityCmaintenanceA minimal MCP server that exposes tools for addition, echoing text, time lookup, and URL fetching, with support for HTTP and stdio transports.-
- FlicenseNot gradedqualityCmaintenanceA model-agnostic MCP server exposing example tools (add1, multiply2, greet) for learning purposes, working with any LLM through stdio transport.-