What MCP is
MCP (Model Context Protocol) is an open standard for connecting AI applications to external systems: tools the model can run, resources it can read and prompt templates. Anthropic released it in November 2024 and in December 2025 donated it to the Linux Foundation's Agentic AI Foundation. Claude, ChatGPT, Gemini, Copilot and many others use it.
There are three roles. The host is the application the person uses (here, the NOC assistant). Inside the host, an MCP client talks to each MCP server. The server publishes the tools and does the real work: in this lab, logging in to R1 over SSH. The model never touches the router: it only picks tools and arguments.
The messages in this lab
| Method | What it's for | Result |
|---|---|---|
| server/discover | Learn which versions and capabilities the server has | supportedVersions, capabilities, instructions |
| tools/list | Get the tool catalog | tools, with name, description, inputSchema and annotations |
| tools/call | Run a tool | content and structuredContent; isError if it failed |
| tools/call (retry) | Repeat the call with the person's answer | inputResponses and requestState → final result |
How it works: from server/discover to the final ping
Seven steps: discover the server, list the tools, an error the model fixes, the call that reaches R1, the confirmation request, the approval and the verification.
server/discover: what can you do?
After the TCP connection to port 8000, the assistant sends a POST with server/discover. Like every request in this revision, its _meta carries the protocol version, who the client is and what it can do; there is no initialize handshake and no session anymore. The server answers with the versions it supports (2026-07-28), its tools capability, some instructions for the model and how long the answer can be cached.
tools/list: the tool catalog
The server returns three tools: show_interfaces and ping, which only read (readOnlyHint), and set_interface_state, which changes the configuration (destructiveHint). Each one has a name, a natural-language description for the model and an inputSchema in JSON Schema that says which arguments it accepts. The device argument has x-mcp-header: the client will copy it into the Mcp-Param-Device header.
A tool error the model fixes
Ana asks why Toronto can't reach the intranet. The model decides to call show_interfaces with device "toronto", but there is no such device. The server doesn't answer with a protocol error: it returns a normal result with isError: true and a text listing the devices that do exist. That text goes back to the model, which can correct itself. This is the difference between a tool error (the model can fix it) and a JSON-RPC error (the request itself is malformed).
tools/call: from JSON to a Cisco command
With the device list, the model calls show_interfaces on r1, the Vancouver router with the WAN links. The MCP server keeps an SSH session open with R1 and types show ip interface brief into it; the capture only shows two encrypted SSH packets. Then it turns the output into a result with two forms: the raw text (content) and the same data in order (structuredContent). The cause shows up: GigabitEthernet0/0/3, the link to Toronto, is administratively down.
A change asks for human confirmation
The model proposes set_interface_state with enabled: true on Gi0/0/3. That tool changes the network, so the server doesn't run it yet: it answers with resultType input_required and an elicitation/create request that asks whether to apply no shutdown. It also returns requestState, an opaque value the client must send back. Since 2026-07-28 this is how servers ask questions (Multi Round-Trip Requests): inside the result, not as separate messages.
Ana approves and the client retries
The assistant shows the question to Ana and she accepts. The client repeats tools/call with a new id, the same arguments, inputResponses (action: accept, approve: true) and the requestState it received. Now the server enters R1's configuration over SSH and applies no shutdown. R1 logs the change under the noc-mcp account and, two seconds later, the link comes up.
Verification: ping to Toronto
To finish, the model calls ping from r1 to 10.0.13.2, the Toronto router. The server runs the ping over SSH and returns the IOS output and the numbers in order: 5 out of 5, 1 ms on average. The assistant answers Ana with the diagnosis, the change she approved and the proof. Every step is recorded in the MCP server's log and in R1's.
MCP over HTTP: the headers
In the Streamable HTTP transport each message is a POST to a single endpoint (/mcp). Some headers repeat body fields so a load balancer, proxy or firewall can decide without reading the JSON; the server checks that they match.
| Header | Where it comes from | Required |
|---|---|---|
MCP-Protocol-Version | _meta → protocolVersion | On every POST |
Mcp-Method | method | On every request |
Mcp-Name | params.name (or params.uri) | On tools/call, resources/read and prompts/get |
Mcp-Param-Device | Argument marked with x-mcp-header | If the tool's schema asks for it |
Accept | application/json, text/event-stream | On every POST |
What changed in revision 2026-07-28
| Up to 2025-11-25 | Since 2026-07-28 | |
|---|---|---|
| Start | initialize handshake and notifications/initialized | No handshake: server/discover is optional |
| Session | Mcp-Session-Id header | No session: each request carries its _meta |
| Server questions | Requests sent by the server (elicitation, sampling) | Inside the result: input_required and retry |
| Change notifications | Separate GET stream | subscriptions/listen |
| Cache | Not defined | ttlMs and cacheScope on lists |
An MCP server for Cisco devices
The MCP server logs in to devices like any administrator, so the same rules apply to it: its own account, minimum permissions and a log of everything it does.
| IOS XE command | What it's for |
|---|---|
username noc-mcp privilege 15 algorithm-type scrypt secret … | An account of its own for the MCP server: its changes are logged under its name. |
aaa authorization commands 15 default group tacacs+ local | With TACACS+, the AAA server authorizes each command (topic 4.1). |
archive → log config → logging enable | Records every configuration command with the user who typed it. |
show users | Shows the MCP server's SSH session. |
show logging | include CONFIG_I | Shows who changed the configuration and from where. |
What happens when it fails
- 400 with error -32020 (HeaderMismatch): a header doesn't match the body, or MCP-Protocol-Version, Mcp-Method or Mcp-Name is missing.
- 400 with error -32022 (UnsupportedProtocolVersion): the server doesn't speak that version and answers with the list of the ones it does. An older server, without server/discover, expects the initialize handshake.
- 404 with error -32601: the server doesn't implement that method.
- Unknown tool: JSON-RPC error -32602. A wrong argument, on the other hand, should come back as a result with isError: true, so the model can correct itself.
- Invalid Origin: 403. The server must check it to prevent DNS rebinding attacks from a browser.
- Without authentication or TLS, anyone on the network can call the tools and read the results. In production, MCP runs over HTTPS with OAuth.
Frequently asked questions
Does the AI model log in to the router?
No. The model only chooses a tool and its arguments. The MCP client sends the request and the MCP server is the one that logs in to the router, with its own account and only through the tools it publishes.
How is MCP different from a REST API?
A REST API is used by a program that already knows what to call. MCP describes its tools in natural language and JSON Schema so a model can discover them and decide when to use them, and it defines how to ask a person for confirmation. Underneath, the MCP server can call REST APIs, NETCONF or SSH.
Why did the server ask for confirmation?
Because set_interface_state changes the network. The specification recommends always having a person who can deny a tool call. Here the server does it with input_required; the client can also ask before calling.
Why is there no session or initialize anymore?
Revision 2026-07-28 made MCP stateless: each request carries its version and capabilities in _meta. That way any server instance behind a load balancer can handle any request.
What does MCP have to do with the CCNA?
CCNA v2.0 asks you to describe the role of agentic AI in network operations (topic 5.1) and automation-based management approaches (topic 5.3). MCP is the most common way to connect that AI to the devices.
Key takeaways
- MCP connects an AI assistant (client) to servers that publish tools; the model chooses, the server runs.
- Messages are JSON-RPC 2.0; over HTTP, each one is a POST to /mcp with headers that repeat the method and the tool.
- Since 2026-07-28 there is no session: each request carries its version and capabilities in _meta.
- A tool error comes back with isError: true so the model can correct itself; changes can ask for confirmation with input_required.
- The MCP server logs in to devices with its own account: minimum permissions, AAA and a log of every command.
NEXT STEP
From this lesson to the Canadá Logística NOC
In the CCNA 2.0 Course you connect an AI assistant to the Canadá Logística network with MCP, decide which tools it may use, evaluate its recommendations and apply the golden rule: no change without approval. We'll let you know when it opens.
Upcoming labs
- Agentic AI
- RIPv1
- OSPFv2
- IPv6Soon
- RADIUS
- BGP
Sources
- MCP · Specification 2026-07-28 · Key Changes
- MCP · Streamable HTTP transport (2026-07-28)
- MCP · Discovery: server/discover (2026-07-28)
- MCP · Tools (2026-07-28)
- JSON-RPC 2.0 Specification
- Linux Foundation · Agentic AI Foundation (AAIF)
Lesson prepared with AI assistance and checked against the sources cited. The bytes of every packet are generated according to the standard and verified with an independent tool.