Slides · Tools and agents
Model Context Protocol and tool ecosystems
1 / 33
Model Context Protocol and tool ecosystems
One standard plug for tools, what it changes, what it lets in, and why you must name the spec revision you mean.
Spec revision used in this deck: 2026-07-28, the revision the official versioning page marked as current when it was read on 2026-10-23.
Concept
A fast-moving standard with a trust problem
- Every tool has its own way of connecting, so every app carries an adapter for each. Someone proposes one plug that fits all. What else does that plug let into each tool?
- MCP fluency covers how tools are discovered, authorised and secured, and how MCP relates to function calling and to REST.
- It is versioned by date and changes in breaking ways, so a lesson written against last year’s revision can teach things that no longer exist. This one also teaches you how to check.
Four things you will be able to do:
- Explain what problem MCP solves and how it relates to function calling.
- Describe hosts, clients and servers, the three primitives and the transports.
- Explain why behaviour depends on the spec revision, and what changed in 2026-07-28.
- Threat-model an MCP integration.
Diagram
N apps times M tools, or N plus M
The N times M counting is this deck’s own framing. The cited MCP intro page defines MCP as an open-source standard for connecting AI applications to external systems.
Math
Counting the integrations
without_standard=N×Mwith_mcp=N+M| Variable | Meaning |
|---|---|
| N | Number of AI applications (hosts) |
| M | Number of tools or data sources |
Illustrative numbers:
| Setup | Without MCP | With MCP | Working |
|---|---|---|---|
| 3 apps, 5 tools | 15 | 8 | 3×5 versus 3+5 |
| 4 apps, 6 tools | 24 | 10 | 4×6 versus 4+6 |
| Add a 7th tool to 4 apps | +4 | +1 | one server instead of four adapters |
- MCP standardises the contract. You still write one server per tool and one client per app.
- The saving grows with the number of pairs, which is why it matters for ecosystems and platform teams more than for one app with one tool.
Concept
USB-C for AI tools, and where it breaks
The MCP docs themselves use the USB-C comparison: one standard way to connect applications to external systems. It explains the shape and nothing else.
- Plugging in is not safe by default. A server’s tool names, descriptions and results flow into the model’s context, where they can steer it. Connecting a server means trusting text it controls.
- The host mediates; a cable does not. The model never talks to a server. The host shows tools to the model through the model API and runs the call through its MCP client. That is where approvals, logging and limits go.
- Trust is per server and per user. Same connector, different owners, permissions and update habits. The tools page tells clients to regard tool annotations as untrusted unless the server is trusted.
Sources[2] What is the Model Context Protocol (MCP)?[3] Tools (Model Context Protocol specification, revision 2026-07-28)
Diagram
Host, client and server
- The MCP architecture docs: the host creates one client per server, and each client keeps a dedicated connection to its server.
- “Local” and “remote” describe where the server runs, not what it is.
Source[4] Architecture overview (Model Context Protocol docs, 2026-07-28)
Diagram
Who talks to the model: the host
Some provider APIs can act as the client for you. Anthropic’s MCP connector (a beta feature) lets the Messages API connect to remote MCP servers without a separate MCP client. Something still sits between the model and the server.
Sources[3] Tools (Model Context Protocol specification, revision 2026-07-28)[5] Tool use with Claude[6] MCP connector
Compare
MCP and function calling are different layers
| Aspect | Function calling | MCP |
|---|---|---|
| Layer | Model-facing | Integration-facing |
| What it does | The model returns a structured call (tool_use); your code runs it | Standardises how the host finds, describes and invokes tools and data |
| Who uses it | The model API | The host and its MCP clients |
| Relationship | Still needed | Composes with it |
- Anthropic’s tool-use docs describe tool use as the model returning a structured call that your application runs.
- The MCP docs say MCP focuses on the protocol for context exchange and does not dictate how applications use LLMs or manage that context.
- “MCP replaces function calling” is a common mistake. An MCP tool still reaches the model as a tool definition.
Sources[5] Tool use with Claude[4] Architecture overview (Model Context Protocol docs, 2026-07-28)[6] MCP connector
Compare
Three server primitives, three deciders
| Primitive | What it is | Who decides to use it (per the spec) |
|---|---|---|
| Tools | Actions with JSON-schema inputs | The model (model-controlled) |
| Resources | Data or context, each identified by a URI | The host application (application-driven) |
| Prompts | Reusable prompt templates | The user (user-controlled), for example as slash commands |
- “Who decides” names who triggers the use. The text of a prompt still comes from the server.
- The spec says these are designs, not mandates: implementations may expose each through other interface patterns.
- A good test when you design a server: who should be able to trigger this, and who must be able to say no?
Sources[3] Tools (Model Context Protocol specification, revision 2026-07-28)[7] Resources (Model Context Protocol specification, revision 2026-07-28)[8] Prompts (Model Context Protocol specification, revision 2026-07-28)
Worked example
Worked: sorting a DevOps server’s features
| Feature | Primitive | Why |
|---|---|---|
| Restart a deployment | Tool | An action the model may propose; it needs approval because it writes |
| Current cluster config file | Resource | Context the host decides to attach, identified by a URI |
| Fetch last hour of error logs | Tool | A read-only action the model decides to run |
| Runbook for the on-call “page” flow | Resource | Reference text the host can attach when relevant |
| An “explain this alert” template the user picks from a menu | Prompt | The user chooses it explicitly; the server supplies the text |
- Only one of five is a prompt: prompts are for user-chosen templates.
- The spec says there should always be a human in the loop with the ability to deny tool invocations.
- This deck’s own advice: mark each tool read-only or write; writes deserve approval, and reads can often run automatically.
Compare
Two standard transports
MCP messages are JSON-RPC. The transport only decides how they travel.
| Aspect | stdio | Streamable HTTP |
|---|---|---|
| How | The client starts the server as a child process; messages travel as one JSON-RPC message per line on its standard input and output | Each message is an HTTP POST to a single MCP endpoint; the answer comes back either as plain JSON or as a server-sent event stream tied to that one request |
| Typical use | Local servers | Remote servers |
| Credentials | The spec says implementations should take them from the environment | The authorization spec (built on OAuth 2.1 drafts, MCP server as resource server) |
- Authorization is optional in MCP.
- The older HTTP+SSE transport is listed as deprecated; migrate to Streamable HTTP.
Sources[9] Transports: Overview (Model Context Protocol specification, revision 2026-07-28)[10] Authorization (Model Context Protocol specification, revision 2026-07-28)[11] Deprecated Features (Model Context Protocol specification, revision 2026-07-28)
Concept
MCP versus REST
- A REST or OpenAPI service is the underlying API. An MCP server usually wraps one.
- What MCP adds is what an LLM host needs: a standard
tools/listthat returns each tool’s name, description and JSON-schema input, and a uniform client contract. - Plain REST has no agreed way for a host to ask “what can you do, and how should I describe it to a model?”
- The cost: another layer to run, secure and keep current with the spec.
Source[3] Tools (Model Context Protocol specification, revision 2026-07-28)
Concept
Behaviour depends on the revision
- A revision is named by a date,
YYYY-MM-DD: the last day an incompatible change was made. Compatible changes do not bump it, so the current revision can still receive them. - The versioning page (read 2026-10-23) lists
2026-07-28as the current revision. The changelog compares it with2025-11-25. - Revisions are marked draft, current or final. Features can also be deprecated within a revision.
- Practical rule: whenever you describe MCP behaviour, say which revision. “MCP sessions work like this” is not a complete sentence.
Two cautions: the revision your SDK or host speaks may not be the newest, so read its release notes; and always check the spec for the revision you build against.
Sources[1] Versioning (Model Context Protocol specification)[12] Key Changes (Model Context Protocol specification, revision 2026-07-28)
Compare
2026-07-28: stateless requests, no protocol sessions
| Topic | Up to 2025-11-25 | 2026-07-28 |
|---|---|---|
| Start of a connection | initialize handshake | Removed. Every request carries its protocol version and client capabilities in _meta |
| Discovery | Part of the handshake | Servers must implement server/discover (supported versions, capabilities, identity); clients may call it first |
| Sessions | Mcp-Session-Id header on Streamable HTTP | Removed; list endpoints no longer vary per connection |
| Version mismatch | Settled by the handshake | The server rejects the request with UnsupportedProtocolVersionError |
| Cross-call state | Often the session | An explicit handle passed as an ordinary tool argument |
- The versioning page calls 2025-11-25 and earlier “handshake-based” and links a backward-compatibility section for implementers who must talk to both eras.
- Also changed in this revision: experimental tasks moved to an official extension, and list and read results carry required cache hints (
ttlMs,cacheScope). - The MRTR page gives this reason for its pattern: no shared storage layer across server instances and no stateful load balancing. The same logic drives per-request state.
Sources[12] Key Changes (Model Context Protocol specification, revision 2026-07-28)[13] Multi Round-Trip Requests (Model Context Protocol specification, revision 2026-07-28)[1] Versioning (Model Context Protocol specification)
Diagram
Explicit handles instead of sessions
- The spec’s guidance: do not treat possession of a handle as authentication; use secure random, expiring handles; bind them server-side to the authenticated user.
- State the lifetime in the creation tool’s description, and return a clear tool error for an expired handle so the model can create a new one.
Sources[3] Tools (Model Context Protocol specification, revision 2026-07-28)[14] Security Best Practices (Model Context Protocol specification, revision 2026-07-28)
Diagram
Asking for more input: multi round-trip requests
inputRequests (what it needs) and an opaque requestState. The client gathers the input, for example by asking the user, and retries the original request with a new request id, the answers and the opaque requestState it was given. The server then completes the call.- It replaces servers sending requests to the client. The MRTR page calls that a breaking change.
- It works for
tools/call,resources/readandprompts/get. - Treat
requestStateas attacker-controlled: it passes through the client, so servers must protect its integrity if it influences authorisation or business logic.
Source[13] Multi Round-Trip Requests (Model Context Protocol specification, revision 2026-07-28)
Compare
Deprecated is not removed
| Feature | Suggested replacement | Earliest removal (per the registry) |
|---|---|---|
| Roots | Pass directories or files as tool parameters, resource URIs or server configuration | First revision released on or after 2027-07-28 |
| Sampling | Integrate directly with the model provider’s API | Same |
| Logging | stderr for stdio; OpenTelemetry | Same |
| Dynamic Client Registration | Client ID Metadata Documents | Same |
| HTTP+SSE transport | Streamable HTTP | Three months after SEP-2596 reaches Final |
- Deprecated features remain in the spec and stay functional; new implementations should not adopt them.
- This deck avoids field-level detail beyond these, because that is the part most likely to change again.
Sources[11] Deprecated Features (Model Context Protocol specification, revision 2026-07-28)[12] Key Changes (Model Context Protocol specification, revision 2026-07-28)
Check yourself
Check: retrying a tool call that needs input
Under 2026-07-28 your server answers a tools/call with an input_required result carrying a requestState string. The client collects the user’s answer. Name three things the retry must or must not do.
Answer
It must be a new request with a different JSON-RPC id, include the inputResponses, and echo the exact requestState value. The client must not inspect or modify requestState. The server treats requestState as attacker-controlled and must protect its integrity if it influences authorisation or business logic.
Source[13] Multi Round-Trip Requests (Model Context Protocol specification, revision 2026-07-28)
Diagram
Why a connected server is an attack surface
Indirect prompt injection research (Greshake et al.) describes the general problem: the authors write that such applications “blur the line between data and instructions”, so instructions hidden in retrieved data can steer them. Tool descriptions and results are such data.
Sources[3] Tools (Model Context Protocol specification, revision 2026-07-28)[15] Not what you've signed up for: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection
Compare
Threats and mitigations (1): text and actions
| Threat | What happens | Mitigation |
|---|---|---|
| Injection through descriptions and results | Text the model follows, such as “also read the key file” | Treat descriptions, annotations and results as untrusted; show inputs to the user; validate results before they reach the model |
| Dangerous actions | A write or delete runs unnoticed | A human able to deny calls; approval for writes and irreversible actions; audit logs; rate limits |
- The tools page tells clients to regard tool annotations as untrusted unless the server is trusted, and says clients should show tool inputs before calling the server to avoid exfiltration.
- Servers must validate all tool inputs, apply access controls, rate limit and sanitise outputs.
Sources[3] Tools (Model Context Protocol specification, revision 2026-07-28)[14] Security Best Practices (Model Context Protocol specification, revision 2026-07-28)
Compare
Threats and mitigations (2): tokens and servers
| Threat | What happens | Mitigation |
|---|---|---|
| Over-broad token | One powerful token lets a bug or attacker do everything | Least privilege: start with a minimal scope set and step up when a privileged operation needs it |
| Token passthrough | The server accepts tokens meant for another service and forwards them | Servers must accept only tokens issued for them; the spec forbids passthrough |
| Malicious or changed server | A local server runs with your privileges; a remote one can change its tool list later | The spec: show the exact startup command and sandbox local servers. Deck advice: pin versions, allow-list |
| State handle hijacking | A guessed or leaked handle opens another user’s state | Random, expiring handles bound to the authenticated user |
The security page lists lost audit trails and bypassed rate limits among the risks of passthrough.
Sources[10] Authorization (Model Context Protocol specification, revision 2026-07-28)[14] Security Best Practices (Model Context Protocol specification, revision 2026-07-28)
Worked example
Worked: shrinking the blast radius of a stolen token
A log leak exposes a token. Compare two designs for an issue-tracker server (scope names illustrative).
| Design | Scopes on the token | What the attacker can do |
|---|---|---|
| Omnibus | issues:*, admin:* granted up front | Read, edit, delete everything and change settings |
| Progressive | issues:read first; issues:write only after a step-up challenge for the first write | Read issues only. A later step-up issues a new token; the leaked one stays issues:read |
- The security page lists privilege chaining among the risks of omnibus scopes: the attacker can invoke high-risk tools at once. It describes the omnibus pattern as increasing the blast radius of a stolen token, and recommends a minimal initial scope with incremental elevation.
- The authorization spec has the server signal needed scopes in the
WWW-Authenticateheader, so the client can step up. - The cost: more consent prompts and some latency. Skipping the control is the larger cost.
Sources[14] Security Best Practices (Model Context Protocol specification, revision 2026-07-28)[10] Authorization (Model Context Protocol specification, revision 2026-07-28)
Process
Adding a local server safely
- Read what the one-click config would run: the client must show the exact command, untruncated, and ask for explicit approval.
- Look for patterns such as
sudo,rm -rf, network calls or access to the home directory or SSH keys. - Remember that a local server runs with the same privileges as the client.
- Sandbox it with minimal default privileges and grant extra access (a directory, the network) explicitly.
- Deck advice: pin the version and allow-list it, because a server can change behaviour after you approved it.
Source[14] Security Best Practices (Model Context Protocol specification, revision 2026-07-28)
Worked example
Too many tools, and name collisions
- Anthropic’s tool search docs say loading every definition up front causes context bloat and worse selection: they cite roughly 55k tokens of definitions for a five-server setup, and say Claude’s tool selection accuracy degrades beyond 30 to 50 available tools.
- Their suggestion for large sets: search a catalog and load only the 3 to 5 tools needed, which they say typically cuts that context by over 85 percent.
Collisions when you aggregate servers:
| Server | Tool it exposes | After prefixing with a server id |
|---|---|---|
| Tracker | search | tracker_search |
| Docs | search | docs_search |
search | mail_search |
The spec says tool names are unique only within one server, and aggregating clients should disambiguate, for example by prefixing a server identifier. Curate and namespace tools; the model chooses from what it can see.
Sources[16] Tool search tool[3] Tools (Model Context Protocol specification, revision 2026-07-28)
Worked example
Worked: threat model for a first-party remote server
Asset: customer records. Entry point: your own remote “crm” server over Streamable HTTP with OAuth, used by an internal assistant.
| Step | Question | Finding | Mitigation |
|---|---|---|---|
| 1 | What text does it control? | Tool descriptions and record fields written by customers | Untrusted; show inputs; validate results |
| 2 | Whose token reaches it? | The user’s access token | Accept only tokens issued for this server; never forward them downstream |
| 3 | What scopes? | Read and write granted up front | Read first; step up for writes |
| 4 | What actions cause harm? | Update or delete a record | Human approval; rate limits; audit log |
| 5 | What state does it hold? | A draft-edit handle | Random, expiring, bound to the user |
A customer-written field is attacker-controlled text reaching the model even though the server is yours.
Check yourself
Check: a leaked token
An agent holds one token with files:* and db:* scopes, but its normal work is reading three report files. The token appears in a debug log. Name the design flaw and two changes.
Answer
The flaw is over-broad scopes granted up front. Change to a minimal initial scope set (read access to the report files) with step-up authorisation when a privileged operation is first attempted, and keep per-user credentials with audit logging. Also keep tokens out of logs. Rotating or revoking the leaked token is incident response, not the design fix.
Check yourself
Check: when does MCP save work?
Compare N times M with N plus M for 2 assistants and 3 tools, then for 2 assistants and 2 tools, then for 1 assistant and 12 tools. Which cases favour MCP on integration count alone? (Illustrative numbers.)
Answer
2 by 3: 6 versus 5, so MCP saves one. 2 by 2: 4 versus 4, a tie. 1 by 12: 12 versus 13, so MCP costs one extra. The difference NM−(N+M) equals (N−1)(M−1)−1, so MCP saves work on count alone only when (N−1)(M−1) is greater than 1. Other reasons to adopt it (a shared contract, an ecosystem of servers) do not show up in this count.
Concept
Common mistakes to avoid
- Saying MCP replaces function calling.
- Ignoring injection through tool descriptions and results.
- One all-powerful token for the agent.
- Describing session behaviour from an old spec revision without saying which revision you mean.
Likely questions (generated practice, a judgement, not reported by any company): MCP versus function calling, how to secure an MCP integration, and how to design discovery for 200 tools.
Summary
Recap
- MCP turns N×M integrations into N+M. It is the integration layer and composes with function calling.
- The host mediates between model and server. The USB-C picture hides the trust problem.
- Servers expose tools (model), resources (host) and prompts (user) over stdio or Streamable HTTP, with optional authorization.
- Revision 2026-07-28 (current when read on 2026-10-23): stateless requests, no protocol sessions, multi round-trip requests, sampling, roots and logging deprecated. Always name the revision.
- Threat-model every server: untrusted text, least-privilege tokens, no passthrough, approvals for writes, pinned and sandboxed servers, curated tool lists.
References
References & Sources (1 of 4)
Versioning (Model Context Protocol specification) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/versioning
Used for Date-based versioning, revision states (draft, current, final), and that 2026-07-28 was the current revision when read on 2026-10-23.
What is the Model Context Protocol (MCP)? (opens in a new tab)
Model Context Protocol project2026Documentation
https://modelcontextprotocol.io/docs/getting-started/intro
Used for MCP as an open standard for connecting AI applications to external systems, with the USB-C comparison.
Tools (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/server/tools
Used for Tools as model-controlled, the human-in-the-loop guidance, untrusted annotations, tool naming and prefixing, stateful tool handles, security considerations.
Architecture overview (Model Context Protocol docs, 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Documentation
https://modelcontextprotocol.io/docs/2026-07-28/learn/architecture
Used for Host, client and server roles, one client per server, statelessness and discovery, and that MCP does not dictate how apps use LLMs.
Tool use with Claude (opens in a new tab)
Anthropic2026Documentation
https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview
Used for Function calling as the model returning a structured call that the application runs, and the pointer to the MCP connector.
References
References & Sources (2 of 4)
MCP connector (opens in a new tab)
Anthropic2026Documentation
https://platform.claude.com/docs/en/agents-and-tools/mcp-connector
Used for The Messages API can connect to remote MCP servers without a separate MCP client.
Resources (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/server/resources
Used for Resources identified by URI and described as application-driven.
Prompts (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/server/prompts
Used for Prompts described as user-controlled templates, typically slash commands.
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/basic/transports
Used for The two standard transports, stdio and Streamable HTTP.
Authorization (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization
Used for Authorization is optional, builds on OAuth 2.1 drafts for HTTP, stdio takes credentials from the environment; servers accept only tokens issued for them.
References
References & Sources (3 of 4)
Deprecated Features (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/deprecated
Used for Which features are deprecated, their migration paths and earliest-removal rules.
Key Changes (Model Context Protocol specification, revision 2026-07-28) (opens in a new tab)
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/changelog
Used for What changed in 2026-07-28 versus 2025-11-25: stateless requests, no sessions, server/discover, multi round-trip requests, tasks extension, cache hints, deprecations.
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/basic/patterns/mrtr
Used for The multi round-trip requests pattern and the security treatment of requestState.
Model Context Protocol project2026Specification
https://modelcontextprotocol.io/specification/2026-07-28/basic/security_best_practices
Used for Token passthrough, state handle hijacking, local server compromise, scope minimisation.
Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, et al.2023AISec 2023 (16th ACM Workshop on Artificial Intelligence and Security)Paper
DOI 10.1145/3605764.3623985 (opens in a new tab)arXiv 2302.12173 (opens in a new tab)https://arxiv.org/abs/2302.12173
Used for Instructions hidden in retrieved data can steer an LLM-integrated application.
References
References & Sources (4 of 4)
Tool search tool (opens in a new tab)
Anthropic2026Documentation
https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
Used for Context bloat and selection accuracy problems with large tool sets, and on-demand tool loading.
Keys: ← → move, Home End first and last, F full screen.