ENGINEERING / FIELD NOTES No. 002

MCP servers,
end to end.

What the Model Context Protocol actually standardises, how a tool call travels from model to server and back, and how to build and test one yourself.

Jump to the sequence diagrams
Read with AI Plain Markdown version for ChatGPT, Claude, Gemini or Perplexity View .md
One host. One client per server relationship. A deliberate boundary around every tool call. Checked against the 2026-07-28 specification

An MCP server gives an AI application a standard way to use tools, data and prompts: files, databases, business APIs and search. The Model Context Protocol (MCP) is the adapter boundary between them.

The host owns the conversation, model access, permissions and orchestration. It creates one MCP client for each server relationship. A server advertises callable tools, readable resources and reusable prompts, then translates approved requests into its backing files, databases or APIs.

MCP is not the model, not the agent loop and not an automatic security boundary. The model proposes a tool invocation; the host decides whether it is allowed; the client sends a JSON-RPC message; the host returns the result to the model. Local servers commonly use stdio. Network services use Streamable HTTP.

The handshake you learned
is now the legacy path.

The current revision, 2026-07-28, is stateless. The familiar initialize handshake and protocol sessions belong to 2025-11-25 and earlier. You still need to understand both: plenty of clients and servers in the wild speak the older revision, and a well-behaved implementation can talk to either.

VERSION CORRECTION

The initialize → initialized lifecycle is legacy. In 2026-07-28 there is no initialize handshake, no Mcp-Session-Id, no standalone HTTP GET stream and no independent server-to-client JSON-RPC requests. This article shows the legacy flow, labelled clearly, alongside its modern replacement.

Specification revisions worth remembering
RevisionWhat changed
2025-03-26Streamable HTTP replaces the older two-endpoint HTTP+SSE transport.
2025-06-18Structured tool output, elicitation, OAuth resource-server separation and resource indicators. JSON-RPC batching removed.
2025-11-25URL elicitation, sampling with tools, recommended Client ID Metadata Documents; experimental core tasks.
2026-07-28 · currentPer-request version and capabilities; server/discover; MRTR; subscriptions/listen; resultType; explicit state handles; tasks moved to an extension. Roots, sampling, logging and Dynamic Client Registration deprecated.
01 / THE MOVING PARTS

One host, many clients.
Each client, one server.

A client/server relationship is one-to-one; a host is not limited to one server. HTTP requests can reach different replicas without creating a modern protocol session. And a server need not contain an LLM at all: it can be a perfectly deterministic adapter.

01 / HOST, CLIENTS, SERVERS AND BACKING SYSTEMSReference architecture
USERPerson using the AI application
HOST APPLICATION · UI, PERMISSIONS, ORCHESTRATION, MODEL ADAPTER
LLM access / conversation

Talks to every client through the host

MCP client A
MCP client B
MCP client C
Local stdio · child-process pipes
Filesystem MCP server

Child process

Allowed files

OS permissions / sandbox

Remote Streamable HTTP · HTTPS POST
Business MCP server

Independent HTTPS service · validates tokens as a resource server

Business APIs / database

Separate downstream credentials

Remote Streamable HTTP · HTTPS POST
Search MCP server

Independent HTTPS service

Search index / upstream API

Its own access controls

OAuth authorization server → audience-bound token → client B · token validated at the business server
The host does not send every conversation, or every server’s data, to every server. Select and disclose context intentionally.
02 / FOLLOW ONE REQUEST

What is 2 + 3?
Ask a server.

The simplest useful example is a server with one add tool. Follow it through both protocol eras. Notice who does what: the model only proposes; the host checks policy and asks the user when required; the client speaks the protocol; the server executes.

03 / TOOL USE · LEGACY HANDSHAKE2025-11-25 and earlier
  1. LEGACY · 2025-11-25 and earlier only
  2. 1Host to MCP clientStart local process / configure HTTP endpoint
  3. 2MCP client to MCP serverinitialize(version, clientInfo, client capabilities)
  4. 3MCP server to MCP clientresult(version, serverInfo, server capabilities)
  5. 4MCP client to MCP servernotifications/initialized (no id; no response)
  6. 5MCP client to MCP servertools/list
  7. 6MCP server to MCP clientTool names, descriptions, input/output schemas
  8. 7User to HostWhat is 2 + 3?
  9. 8Host to LLMUser request + selected tool schemas
  10. 9LLM to HostPropose add(a=2, b=3)
  11. Host checks policy and obtains approval when required
  12. 10Host to UserApproval if required by host policy
  13. 11User to HostApprove or deny
  14. 12Host to MCP clientApproved invocation
  15. 13MCP client to MCP servertools/call(name=add, arguments)
  16. 14MCP server to MCP clientcontent + structuredContent / tool error
  17. 15MCP client to HostTool result
  18. 16Host to LLMTool result tied to the model tool-call id
  19. 17LLM to HostFinal answer
  20. 18Host to User5
The familiar startup flow: a version and capability handshake, then discovery, then a host-approved tool call. Still required for interoperability with older clients and servers.
04 / MODERN REPLACEMENT · PER-REQUEST CAPABILITIES2026-07-28 · current
  1. MODERN · 2026-07-28 · no initialize handshake, no protocol session
  2. OPTIONAL · discovery / dual-era stdio probe
  3. 1MCP client to MCP serverserver/discover + per-request _meta
  4. 2MCP server to MCP clientsupportedVersions + capabilities + identity metadata
  5. 3MCP client to MCP servertools/list + version + clientCapabilities in _meta
  6. 4MCP server to MCP clientresultType=complete, tools, ttlMs, cacheScope
  7. Host/model selects a tool and the host authorizes its invocation
  8. 5MCP client to MCP servertools/call(id=10) + per-request _meta
  9. OPTIONAL · more user input needed (MRTR)
  10. 6MCP server to MCP clientresultType=input_required; inputRequests; requestState
  11. 7MCP client to UserElicitation with accept / decline / cancel
  12. 8User to MCP clientReviewed answer
  13. 9MCP client to MCP serverRetry original tools/call(id=11), inputResponses, requestState
  14. 10MCP server to MCP clientresultType=complete; content; structuredContent
  15. Host sends the result back to its model
  16. OPTIONAL · change notifications requested
  17. 11MCP client to MCP serversubscriptions/listen (POST response stream on HTTP)
  18. 12MCP server to MCP clientAcknowledged + opted-in change notifications
Every request carries its own protocol version and client capabilities. What used to be a server-initiated request becomes data inside an interim result, answered by retrying the original operation with a new JSON-RPC id.

MRTR means multi round-trip requests. What used to be a server request becomes data inside an interim result. A client answers it by retrying the original operation with a new JSON-RPC id. Do not confuse this targeted continuation with blindly retrying a failed mutation.

03 / WHAT A SERVER OFFERS

Tools, resources, prompts.
And who chooses each.

A server exposes three primitives. The client side can provide others. The useful question for each is not just “what is it?” but “who decides when it is used, and who authorizes it?”

05 / PRIMITIVE MAP AND CONTROLWho selects · who authorizes
SERVER EXPOSES
Tools

Model-selected; host-authorized

Resources

Application-controlled

Prompts

User-controlled

CLIENT PROVIDES
Elicitation

User answers via the host

Roots / sampling

Client-controlled; deprecated

The control labels are design conventions, not mandatory UI rules or permission grants.
Mechanism and owner
PrimitiveMechanism and owner
Toolstools/list → tools/call. Model-controlled selection; host policy and user consent still govern execution.
Resourcesresources/list or templates/list → resources/read. The application chooses context; a resource URI need not be an HTTP URL.
Promptsprompts/list → prompts/get. The user chooses a named template; fetching a prompt does not itself call an LLM.
ElicitationUser-controlled form or URL interaction, mediated by the client. Modern: elicitation/create embedded in inputRequests.
Roots · deprecatedThe application supplies user/workspace scope. Advisory file:// directories, not an OS sandbox. Modern inputRequests may carry roots/list.
Sampling · deprecatedThe client/host controls access to its model, with user oversight of request and response. Modern inputRequests may carry sampling/createMessage.

Sampling, roots and elicitation do not share a neat three-label taxonomy. Distinguish who requests something (the server) from who authorizes and supplies it (the host, application and user).

04 / FROM TRANSPORT TO TEARDOWN

Two eras.
One place to finish.

06 / CONNECTION AND REQUEST LIFECYCLEState view
Transport ready
Which protocol era?
2025 and earlier
Legacy initialization

initialize → result → initialized

Legacy operational

Negotiated capabilities / optional HTTP session

Decline / stop ↓
2026-07-28
Modern ready

Logical state; no protocol session

Independent request

Per-request version + capabilities

MRTR ↻
Input required

Gather input; retry with a new id

Complete / cancel / stop ↓
Close transport / stop client
Modern HTTP has request and stream lifetimes, not a protocol connection lifecycle.

Closing a response SSE stream cancels that request; a broken stream loses the in-flight result. For stdio, close input and wait for the process to exit. There is no JSON-RPC shutdown method.

05 / UNDER THE HOOD

Seven steps between
a question and a result.

  1. Bind a server to a clientA local stdio client launches the configured executable and connects stdin/stdout. A remote client targets an MCP HTTP endpoint. Neither transport supplies your agent loop.
  2. Identify the protocol eraModern servers implement server/discover; clients may query it. A dual-era stdio client probes discovery and falls back to initialize on a legacy response. A recognised modern unsupported-version error means retry with a supported version, not fall back blindly.
  3. Declare optional capabilitiesLegacy: negotiate in initialize and use only the negotiated features. Modern: every request includes protocolVersion and clientCapabilities in params._meta; server capabilities are advertised by discovery. A missing feature is not permission to guess a method.
  4. Discover context and actionsList tools, resources and prompts as supported; follow nextCursor pagination. Modern list/read results carry cache hints. Scope caches by authorization; deterministic tool ordering helps model prompt caches.
  5. Adapt schemas into the model APIThe host converts selected MCP tool definitions into its provider’s tool format. The LLM proposes a name and arguments; it does not write directly to an MCP socket. Model call ids and JSON-RPC request ids are different correlation domains.
  6. Authorize, invoke and validateEnforce tool allowlists, schemas, least-privilege credentials and approval. The client sends tools/call; the server validates inputs and backing-system permissions. Client-side hiding is not server-side authorization.
  7. Continue the model loopSend the validated tool result back with the originating model call id. The model may answer or request more tools. A server’s content is untrusted data, not higher-priority instructions.

JSON-RPC 2.0 message types

TypeWire shape
Requestjsonrpc: 2.0, id, method, optional params. Requires a matching response; ids correlate concurrent calls.
Success responsejsonrpc: 2.0, same id, result. Modern ordinary results include resultType: complete.
Error responsejsonrpc: 2.0, same id, error: {code, message, optional data}. Never result and error together.
Notificationjsonrpc: 2.0, method, optional params; no id and no response. Example: legacy notifications/initialized or a subscribed tools/list_changed event.

MCP no longer supports JSON-RPC batch arrays. In stdio each message is one UTF-8 JSON line; embedded newlines inside strings are escaped. In modern MCP, servers send responses and scoped notifications, not independent JSON-RPC requests. Protocol errors differ from successful results containing isError: true, which signal tool execution failure.

Raw messages · legacy initialization and call
// LEGACY ONLY: each object below is a separate message, not a batch.
// Client -> server
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{
  "protocolVersion":"2025-11-25",
  "capabilities":{"elicitation":{"form":{}}},
  "clientInfo":{"name":"ndorbit-example-client","version":"1.0.0"}
}}
// Server -> client
{"jsonrpc":"2.0","id":1,"result":{
  "protocolVersion":"2025-11-25",
  "capabilities":{"tools":{},"resources":{},"prompts":{}},
  "serverInfo":{"name":"ndorbit-example-server","version":"1.0.0"}
}}
// Client -> server; no response
{"jsonrpc":"2.0","method":"notifications/initialized"}
// Later, client -> server
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
  "name":"add","arguments":{"a":2,"b":3}
}}
// Server -> client
{"jsonrpc":"2.0","id":2,"result":{
  "content":[{"type":"text","text":"5"}],
  "structuredContent":{"result":5},"isError":false
}}
Raw messages · current discovery and call
// MODERN: optional discovery, followed by an independent tool call.
// Comments are explanatory JSONC; remove them for raw JSON.
{"jsonrpc":"2.0","id":"d1","method":"server/discover","params":{
  "_meta":{
    "io.modelcontextprotocol/protocolVersion":"2026-07-28",
    "io.modelcontextprotocol/clientCapabilities":{},
    "io.modelcontextprotocol/clientInfo":{"name":"ndorbit-example-client","version":"1.0.0"}
  }
}}
{"jsonrpc":"2.0","id":"d1","result":{
  "resultType":"complete","supportedVersions":["2026-07-28"],
  "capabilities":{"tools":{},"resources":{},"prompts":{}},
  "ttlMs":60000,"cacheScope":"public",
  "_meta":{"io.modelcontextprotocol/serverInfo":{"name":"ndorbit-example-server","version":"1.0.0"}}
}}
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{
  "name":"add","arguments":{"a":2,"b":3},
  "_meta":{
    "io.modelcontextprotocol/protocolVersion":"2026-07-28",
    "io.modelcontextprotocol/clientCapabilities":{},
    "io.modelcontextprotocol/clientInfo":{"name":"ndorbit-example-client","version":"1.0.0"}
  }
}}
{"jsonrpc":"2.0","id":3,"result":{
  "resultType":"complete",
  "content":[{"type":"text","text":"5"}],
  "structuredContent":{"result":5},"isError":false
}}

Required modern metadata goes in params._meta on every request, including tools/list. Client identity is SHOULD, not MUST; version and client capabilities are required. A modern server rejects an unsupported version with -32022 and its supported list.

Transport and session handling

Transport / eraMechanics
stdio · both erasThe host launches a subprocess; stdin/stdout carry newline-delimited JSON-RPC. stderr is for logs. No HTTP OAuth handshake. A process relationship is not an HTTP session.
HTTP+SSE · deprecated2024 transport: the client opens an SSE endpoint that announces a separate POST endpoint. Keep only for compatibility; do not adopt in new systems.
Streamable HTTP · legacy2025-03-26 through 2025-11-25: a single MCP endpoint, POST with JSON or SSE response; optional GET back-channel; optional Mcp-Session-Id echoed on later calls; DELETE termination if supported. An expired session 404 requires a new initialize. Optional event-id resumption.
Streamable HTTP · modern2026-07-28: one endpoint, POST per request; JSON or request-scoped SSE response. No session id, GET back-channel, DELETE session lifecycle or Last-Event-ID resumption. subscriptions/listen provides opted-in change notifications through a POST response stream.
A modern Streamable HTTP request
POST /mcp HTTP/1.1
Content-Type: application/json
Accept: application/json, text/event-stream
MCP-Protocol-Version: 2026-07-28
Mcp-Method: tools/call
Mcp-Name: add

[body: the modern tools/call JSON above]

# Protected servers additionally require:
Authorization: Bearer <audience-bound-access-token>

Modern headers mirror the body: version, method and name (for tools/call, resources/read and prompts/get). Servers must reject mismatches. Optional x-mcp-header schema annotations mirror approved primitive arguments into Mcp-Param-* headers; never put secrets or personal information there. Structured output uses structuredContent and an optional outputSchema; ordinary output should also include serialised text for older consumers.

STATELESS PROTOCOL, STATEFUL APPLICATION

Return explicit opaque handles, such as a workflow id, and accept them as later tool arguments. Authorize each handle against the verified caller on every request. Design mutation tools with idempotency controls: neither a JSON-RPC id nor an HTTP retry guarantees exactly-once execution.

Where authorization fits

  1. MCP HTTP authorization is optional overall. A protected MCP server is an OAuth resource server, not necessarily the authorization server. Authorization happens at the transport boundary, before executing the RPC.
  2. The client discovers protected-resource metadata (RFC 9728), then the authorization server’s metadata. It obtains a client id through Client ID Metadata Documents, pre-registration or legacy Dynamic Client Registration.
  3. For a user flow, open the authorization server’s consent UI with PKCE and the MCP resource indicator, then exchange the code with its verifier. Validate the expected issuer, including a returned iss, before redeeming the code.
  4. Send the audience-bound token in Authorization: Bearer on every HTTP request, never in a query string. Validate audience, expiry, issuer and required permissions at the server.
  5. Keep MCP access separate from server-to-upstream access. Acquire distinct downstream credentials; never blindly relay a client’s token to another API. Local stdio servers typically receive credentials through a controlled environment, not the HTTP OAuth flow.

The current authorization specification references OAuth 2.1 as an IETF draft, not a final RFC. Dynamic Client Registration remains available for compatibility but is deprecated in 2026-07-28; do not treat it as mandatory.

06 / BUILD A SMALL ONE FIRST

One tool, one resource,
one prompt.

TESTED

Run with Python 3.13.5 and the official mcp 2.3.0 package. The same subprocess passed tools/list, tools/call, resources/list, resources/read, prompts/list and prompts/get in modern auto mode (2026-07-28) and legacy mode (2025-11-25). MCP Inspector CLI independently returned add(2, 3) = 5. No hosted LLM or cloud account was needed.

The official Python SDK v2 renamed FastMCP to MCPServer: from mcp.server import MCPServer. It keeps the decorator style. Do not mix it with v1’s from mcp.server.fastmcp import FastMCP, or confuse the official mcp distribution with the separate fastmcp package. The official TypeScript SDK is also on v2, split into @modelcontextprotocol/server and @modelcontextprotocol/client.

Set up a reproducible environment

Linux / macOS · Python 3.11+ required by SDK v2
mkdir mcp-example && cd mcp-example
python3 -m venv .venv
.venv/bin/python -m pip install "mcp[cli]==2.3.0"

# Save the next two blocks as server.py and smoke.py.
# Optional uv equivalent, if uv is installed:
# uv init --python 3.13
# uv add "mcp[cli]==2.3.0"
# uv run python smoke.py
server.py
from mcp.server import MCPServer

mcp = MCPServer("ND Orbit MCP example")

@mcp.tool()
def add(a: int, b: int) -> int:
    """Add two integers without side effects."""
    return a + b

@mcp.resource("lesson://intro")
def intro() -> str:
    """Read a short lesson note."""
    return "MCP connects a host's clients to tools, resources, and prompts."

@mcp.prompt()
def explain(topic: str) -> str:
    """Prepare a user-selected explanation request."""
    return f"Explain {topic} to an engineer, with one concrete example."

if __name__ == "__main__":
    mcp.run(transport="stdio")

The type annotations build the tool’s input schema; the int result is exposed as structuredContent with result equal to 5. The resource is read-only data. The prompt returns a reusable user request, not an already-generated answer. The server writes nothing to stdout itself: in stdio, stdout is the protocol pipe.

smoke.py · a real stdio subprocess client
import asyncio
import sys
from pathlib import Path
from importlib.metadata import version
from mcp import Client, StdioServerParameters

async def check(mode: str) -> None:
    params = StdioServerParameters(
        command=sys.executable,
        args=[str(Path(__file__).with_name("server.py"))],
    )
    async with Client(params, mode=mode) as client:
        tools = await client.list_tools()
        assert [t.name for t in tools.tools] == ["add"]
        result = await client.call_tool("add", {"a": 2, "b": 3})
        assert not result.is_error
        assert result.structured_content == {"result": 5}
        resources = await client.list_resources()
        assert len(resources.resources) == 1
        note = await client.read_resource("lesson://intro")
        assert "MCP connects" in note.contents[0].text
        prompts = await client.list_prompts()
        assert [p.name for p in prompts.prompts] == ["explain"]
        prompt = await client.get_prompt("explain", {"topic": "MCP"})
        assert "Explain MCP" in prompt.messages[0].content.text
        print(f"PASS mode={mode} protocol={client.protocol_version} "
              f"mcp={version('mcp')} add={result.structured_content}")

async def main() -> None:
    await check("auto")
    await check("legacy")

if __name__ == "__main__":
    asyncio.run(main())
Run it
.venv/bin/python smoke.py

# Observed output:
PASS mode=auto protocol=2026-07-28 mcp=2.3.0 add={'result': 5}
PASS mode=legacy protocol=2025-11-25 mcp=2.3.0 add={'result': 5}

The SDK v2 Client manages era detection and transport teardown; unlike older ClientSession examples, it does not call initialize explicitly. Python attributes are snake_case (is_error, structured_content); the wire JSON stays camelCase.

Inspect interactively and from the CLI

MCP Inspector · requires Node 22.19.0 or later
# Launch the browser Inspector with no target, or pass the server command:
npx @modelcontextprotocol/inspector
npx @modelcontextprotocol/inspector "$PWD/.venv/bin/python" "$PWD/server.py"

# CLI: list, then call
npx -y @modelcontextprotocol/inspector --cli "$PWD/.venv/bin/python" "$PWD/server.py" \
  --method tools/list
npx -y @modelcontextprotocol/inspector --cli "$PWD/.venv/bin/python" "$PWD/server.py" \
  --method tools/call --tool-name add --tool-arg a=2 --tool-arg b=3
  1. ConnectChoose stdio and the absolute .venv Python executable plus the server.py argument. Inspector spawns the server; do not separately run a stdio server expecting an HTTP port.
  2. Inspect the three server primitivesList tools and call add with a=2, b=3; list resources and read lesson://intro; list prompts and get explain with topic=MCP. Inspect the schemas and the JSON-RPC traffic.
  3. Check errors and capability differencesTry a non-integer argument and inspect the failure. Compare the modern discovery flow with legacy initialize. Host UIs may expose only a subset of server primitives.

Use the private launch URL that Inspector prints. Do not publish its per-launch proxy token or disable proxy authentication.

Register it in a host

claude_desktop_config.json · merge into mcpServers
{
  "mcpServers": {
    "ndorbit-mcp-example": {
      "command": "/absolute/path/mcp-example/.venv/bin/python",
      "args": ["/absolute/path/mcp-example/server.py"]
    }
  }
}

In Claude Desktop, Settings → Developer → Edit Config opens claude_desktop_config.json. Merge the entry into mcpServers rather than overwriting other servers, replace both illustrative paths with real ones, then fully restart the host. Ask it to use add for 2 + 3, review any approval and verify the answer is 5. Resources and prompts may appear in different parts of the UI, or not at all: tool support alone does not imply full MCP support.

07 / WHERE IT GOES WRONG

A standard pipe
is not a trusted one.

Failure modes and engineering responses
Failure modeEngineering response
stdio stdout pollutionNo print or debug banners on server stdout: it is the protocol pipe. Log to stderr.
Tool poisoning / prompt injectionDescriptions, instructions, annotations and results can contain adversarial text. Treat them as untrusted data; a readOnlyHint or friendly description is not proof. Enforce allowlists and permissions outside the model.
Confused deputyAn OAuth proxy must bind consent to the actual requesting client and user; do not reuse another client’s prior third-party consent. Validate redirect URIs, state and PKCE; store tokens per verified identity.
Token passthrough · forbiddenOnly accept tokens issued for this MCP resource. Never accept arbitrary upstream tokens and forward them unchanged. Separate client→MCP and MCP→upstream authorization.
Over-broad scopesStart with minimal scopes; use explicit scope challenges for elevation. Validate permissions for each operation and object. A tool filter does not replace backend authorization.
DNS rebinding / local HTTPValidate Origin on incoming HTTP connections; invalid present origins require 403. Bind local development servers to 127.0.0.1, validate Host as appropriate, and authenticate. CORS alone is not authentication.
Rug-pull tool changesA previously approved name can gain a new schema, description or effect. Pin package versions, review tool-definition diffs, refresh discovery on changes and re-approve material changes.
Unsafe execution / exfiltrationRequire human review of sensitive tool name, arguments, destination and effect. Read operations can exfiltrate data too. Sandbox local servers; minimise files, network access and environment variables.
SSRF during OAuth discoveryValidate metadata and redirect URLs; restrict egress to private and cloud-metadata destinations. A remote server’s OAuth URLs are untrusted input.
State and retriesBind workflow handles and MRTR continuation state to caller and operation. Limit lifetimes; audit without secrets. Add timeouts, rate limits and idempotency; avoid double mutations after uncertain failures.

Human-in-the-loop means a real ability to deny the actual operation, not an automatically accepted, model-generated confirmation. Elicitation is not a substitute for authorization. Form elicitation must never ask for passwords, API keys, access tokens or payment credentials.

MCP standardises the conversation.
It does not certify the server.

Even a perfectly implemented MCP server inherits its process privileges unless OS or container controls restrict it. Roots are not a sandbox. For running untrusted code safely, see the earlier field note, Give the agent a workbench .

08 / THE WIDER LANDSCAPE

Same idea,
different names.

Documentation checked 8 November 2026. Names identify architectural roles, not identical APIs or feature matrices. A platform advertising MCP does not necessarily support every primitive, auth mode, extension or protocol revision.

How other platforms do the same thing
PlatformEquivalent / MCP support
OpenAI functions + Agents SDKFunction calling: your app registers schemas, executes calls and returns output. The Agents SDK adds the loop and MCP clients for stdio, Streamable HTTP and legacy SSE; a hosted MCP tool delegates a remote connection to the Responses API.
AWS Bedrock Agents ClassicAction groups define OpenAPI or function schemas and invoke Lambda or return control to the app. Not itself an MCP endpoint. Classic entered maintenance and closed to new customers on 30 July 2026; prefer AgentCore for new work.
AWS AgentCore GatewayA managed MCP façade and aggregator over OpenAPI, Lambda, Smithy and remote MCP targets, with separate inbound and outbound auth.
Microsoft Foundry Agent ServiceBuilt-in, function and OpenAPI tools plus a remote MCP tool with server URL, label, project connections, allowlists and approval. Consumes remote endpoints, not local stdio subprocesses.
Open WebUIIn-process Python tools and external OpenAPI servers. Native MCP over Streamable HTTP; stdio and legacy SSE can be bridged into OpenAPI with mcpo. MCP server registration is admin-only.
Google ADK / Agent PlatformADK function tools are direct functions; McpToolset imports external MCP tools over stdio or HTTP, and ADK can expose MCP. Check each managed service’s protocol support individually.
A2AA complementary protocol for independent agents: discover an Agent Card, delegate tasks and exchange messages and artifacts while the remote agent keeps its own loop. Not a tool-invocation replacement. MCP can equip either agent.

Roots, sampling, logging and Dynamic Client Registration are deprecated, not removed: they become eligible for removal no earlier than a revision on or after 28 July 2027.

09 / QUESTIONS PEOPLE ASK

MCP server FAQ.

What is an MCP server?

A program that exposes tools, resources and prompts to AI applications over the Model Context Protocol. It translates approved requests into calls to its own files, databases or APIs. It does not need an LLM of its own.

What is the difference between MCP and function calling?

Function calling is how one model API describes and requests a tool; your application executes it. MCP standardises how any host discovers and calls tools that live in separate servers, so one server works with many AI applications.

Is the initialize handshake still required?

Not in the current 2026-07-28 revision. Clients send the protocol version and capabilities with every request and may call server/discover. The initialize → notifications/initialized flow is the legacy path for 2025-11-25 and earlier.

Should my MCP server use stdio or Streamable HTTP?

Use stdio for a local server the host launches as a child process. Use Streamable HTTP for a remote, shared service; protect it as an OAuth resource server and validate the token audience on every request.

Who decides when a tool runs?

The model proposes a tool call, but the host decides: it checks policy, asks the user when required, and only then sends tools/call. The server must still validate inputs and permissions itself.

Is MCP the same as A2A?

No. MCP connects an agent to tools and data. A2A lets independent agents delegate tasks to each other while each keeps its own loop. They are complementary: an A2A agent may use MCP tools.

Try it: a bounded read-only file tool

Add read_note(relative_path: str) to server.py, before mcp.run. Use a fixed, server-configured notes directory, not a dependency on deprecated roots. Create a harmless hello.txt fixture. Resolve the base and candidate paths, reject absolute paths and candidates outside the base (including symlink escapes), allow only regular UTF-8 text files, and cap the read at 64 KiB before decoding. Return text or a clear tool error, never secrets or arbitrary system files.

  1. Test the happy pathRestart Inspector, refresh tools/list, inspect the schema and read hello.txt. Add a smoke-client call that asserts the fixture content.
  2. Test the boundaryVerify rejection of ../outside.txt, an absolute path, a symlink into an outside directory, a missing file and a file larger than 64 KiB. Confirm errors do not disclose unrelated paths or data.
  3. Explain the security modelA resolve-and-contain check is useful for a trusted fixture, not a complete defence against adversarial filesystem races. In production, combine race-resistant file opening with an OS sandbox or read-only mount and restricted process privileges.

Read the source.

Primary documentation behind this article. Dated specification revisions distinguish current rules from historical examples; platform behaviour is documentation-verified, not deployed in each cloud.

  1. Model Context Protocol · Specification

    Current and dated revisions, lifecycle, transports and authorization.

  2. Model Context Protocol · Documentation

    Concepts, architecture, local host configuration and security guidance.

  3. Official Python SDK

    MCPServer, Client and the v2 migration notes.

  4. Official TypeScript SDK

    Server and client packages.

  5. MCP Inspector

    Browser UI and CLI for testing servers.

  6. RFC 9728 · OAuth Protected Resource Metadata

    How clients discover a protected MCP server’s authorization requirements.

  7. OpenAI · Function calling

    Application-executed tool schemas.

  8. OpenAI Agents SDK · MCP

    stdio, Streamable HTTP and hosted MCP tools.

  9. AWS · AgentCore Gateway

    Managed MCP façade over APIs, Lambda and MCP targets.

  10. Microsoft Foundry · MCP tool

    Connecting agents to remote MCP servers.

  11. Open WebUI · Documentation

    Native MCP and OpenAPI tool servers.

  12. Google ADK · MCP tools

    McpToolset and exposing ADK tools over MCP.

  13. A2A protocol

    Agent-to-agent delegation and its relationship to MCP.

Tell us where
the work
gets held up.

Describe the process you want to improve and the systems involved. We can discuss whether discovery, automation or a focused AI pilot is the right next step.

[email protected]
✳ New Zealand · Working globally

Tell us about your project

Which task takes time, and what would a useful result look like?

This opens WhatsApp with your message ready to send. Opening the draft shares its contents with WhatsApp; tap Send there to deliver it. Do not include confidential information. Website privacy.