Why this matters: Build an explicit trust-boundary map and a trace for a consequential tool call. The central judgment is to place authority where evidence and identity exist: the host governs interaction and approval, the server enforces capability and authorization, and the downstream deployment API remains the final authority. MCP standardizes the interchange, but does not make an integration safe by itself.

What you will be able to do
- Map execution authority and trust boundaries across model, host, client, server, transport, and external system.
- Specify a narrow MCP tool contract with schema validation, authorization inputs, output constraints, and side-effect verification.
- Trace a modern MCP 2026-07-28 tools/call without confusing protocol interchange with host policy or external authorization.
- Design retries, approvals, observability, and migration behavior for a consequential remote MCP capability.
1. Frame the integration boundary
Decision first: reject a tempting but unsafe design. The OpsAssist team proposes one tool: run_command(command: string). The model would emit kubectl rollout restart deployment/payments, the host would forward it over MCP, and the server would execute it with a powerful production credential. Do not ship this boundary. It turns natural-language ambiguity and prompt-injected content into a broad command-execution surface, and it makes later authorization and audit interpretation needlessly difficult.
Replace it with a narrow, business-level capability: restart_service({service, environment, changeTicket, idempotencyKey}). MCP is useful here because OpsAssist needs a reusable, structured boundary between an AI application and a separately deployed operations capability. It is not an agent framework: it does not prescribe planning, memory, model selection, approval UX, or whether a host auto-runs tools. It is also not the complete security boundary: standard messages do not substitute for identity proof, authorization, validation, or downstream enforcement.
As of the current released specification revision, 2026-07-28, MCP’s core is stateless request/response. The older 2025-era lifecycle used initialize and protocol sessions; new implementations should use the modern protocol behavior rather than introducing that legacy lifecycle. The modern client may call server/discover to inspect versions and capabilities, but discovery is optional; a client may invoke an RPC directly and handle an unsupported-version outcome. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/server/discover.mdx?utm_source=openai))
2. Draw authority, not just arrows
Annotate these six roles before discussing “the agent.”
| Component | Owns | Must not be credited with |
| Model | Interpreting context; producing text; proposing a tool name and arguments. | Execution, authorization, a durable identity, or truth of untrusted tool output. |
| Host/application | User interaction, model orchestration, server allowlisting, tool exposure, approval policy, audit correlation, and fallback UX. | Server-side enforcement merely because it displayed a confirmation. |
| MCP client | One protocol relationship to one server; encoding/decoding JSON-RPC, transport behavior, version handling, and credential attachment under host control. | Business authorization at the downstream system. |
| MCP server | Publishing bounded capabilities; validating arguments; authenticating/authorizing callers; translating calls to domain APIs; producing a truthful result contract. | Authority to bypass the downstream service’s own controls. |
| Transport | Carrying protocol messages, such as stdio for a local process or Streamable HTTP for a remote service. | Confidentiality, authorization, or safe retries unless the deployment adds and verifies those controls. |
| External deployment API | The authoritative restart action, service identity, change policy, and final side-effect record. | Model interpretation or MCP capability discovery. |
In the historical architecture description, a host creates and manages clients and each client has a 1:1 relationship with a particular server. Keep that separation as the mental model even though the current wire core is stateless: “stateless protocol” does not mean your application has no state. If a workflow needs state across calls, the server should mint an explicit, scoped handle and require it as a normal argument—not hide it in a transport session. ([modelcontextprotocol.io](https://modelcontextprotocol.io/specification/2025-06-18/architecture?utm_source=openai))
3. Make the capability contract enforceable
Trace one call and label the authority at each hop.
- The user asks: “Restart payments in production; ticket CHG-1042 is approved.” The host records the user and conversation/run identity.
- The model proposes restart_service. That proposal is untrusted application input, even when it looks well structured.
- The host deterministically checks: production target? authenticated user role? valid approval object? ticket format? maintenance window? It displays or collects a consequential-action approval according to host policy.
- The MCP client sends a JSON-RPC tools/call request. In the modern era, the request carries the protocol version and client capabilities in reserved _meta. For Streamable HTTP, requests include the protocol-version header and standardized method/name headers, enabling a gateway to route or meter without parsing the JSON body. ([blog.modelcontextprotocol.io](https://blog.modelcontextprotocol.io/posts/2026-07-28/?utm_source=openai))
- The server validates the schema again, authenticates the caller, authorizes user + tenant + service + environment + ticket, applies rate and concurrency controls, and calls the deployment API using a least-privileged server credential.
- The deployment API decides whether the restart actually occurs. The server returns a result with an operation identifier and observed status. The host shows the outcome; the model may summarize it but does not certify it.
Do not let a tool description, tool annotation, model confidence, or a client-supplied “approved: true” field become the sole permission signal. The server must derive authorization from authenticated context and trusted approval evidence. Likewise, treat server-provided descriptions, annotations, and content as data from that server—not inherently reliable security metadata. Earlier tools guidance explicitly says clients must consider annotations untrusted unless they come from trusted servers. ([modelcontextprotocol.io](https://modelcontextprotocol.io/specification/2025-06-18/server/tools?utm_source=openai))
4. Secure failure and side effects
Write the contract artifact—not SDK-bound code.
| Field | Contract | Enforcement owner |
| name | restart_service; no arbitrary shell or raw API path. | Server registry |
| inputSchema | Object; service from allowlisted service IDs; environment enum staging|production; ticket pattern; UUID idempotency key; reject unknown fields where your validator supports it. | Server, and optionally host preflight |
| authorization | Production requires an entitled principal, tenant/service scope, valid ticket, and a trusted approval reference. | Server and deployment API |
| outputSchema | Structured result: operationId, accepted, observedState, and safe diagnostic code. Never include bearer tokens, command output containing secrets, or internal stack traces. | Server |
| verification | Return “accepted” only after durable downstream acknowledgement; later query operation status or correlate an event before claiming “restarted.” | Server/host runbook |
Tools use JSON Schema contracts. A server that supplies an output schema must return structured output conforming to it, and clients should validate that structured result. In the 2026-07-28 revision, output schema and structured content may use any JSON value conforming to JSON Schema 2020-12; do not assume the older object-only output shape when building a modern-only contract. ([php.sdk.modelcontextprotocol.io](https://php.sdk.modelcontextprotocol.io/servers/tools/?utm_source=openai))
Validation is layered: the host protects the user experience and reduces bad calls; the server protects the capability; the external API protects the business action. Revalidate after a user approval if authorization-relevant state can change between proposal and execution.
5. Separate protocol migration from product behavior
Plan the failure path before the happy path. A timeout after the server calls the deployment API creates an unknown outcome, not permission to retry blindly. Require a caller-supplied idempotency key; persist its mapping to the downstream operation ID and normalized outcome. On retry, return the original operation state. If no downstream acknowledgement exists, return a typed “outcome unknown” result and direct the host to a status lookup/incident path rather than issuing another restart.
- Retry: automatic only for demonstrably pre-dispatch failures or idempotent status reads; bounded with jitter and a deadline.
- Fallback: do not fall back from a rejected production restart to a broader tool. Offer a read-only status tool or human escalation.
- Secrets: keep server credentials in the server/runtime secret store; redact authorization headers, tokens, and sensitive arguments from logs; never expose them to model context.
- Untrusted content: deployment logs and tool text can contain attacker-controlled instructions. Label them as data, constrain what enters model context, and never interpret embedded instructions as host policy.
- Observability: log correlation ID, authenticated subject, server/version, tool name, schema-validation outcome, authorization decision/reason code, approval reference, idempotency key hash, downstream operation ID, and result class. Do not log raw secrets. The modern spec documents reserved OpenTelemetry trace-context conventions in _meta, which can connect host, client, server, and downstream traces. ([github.com](https://github.com/modelcontextprotocol/modelcontextprotocol/blob/main/docs/specification/2026-07-28/changelog.mdx?utm_source=openai))
For HTTP authorization, MCP supplies an authorization framework, but it is optional rather than a universal deployment guarantee. Current authorization guidance requires secure token storage and OAuth security practices; it also requires clients to include a resource indicator and servers to validate that a token was issued for them. These controls do not eliminate the need for server-level business authorization. ([modelcontextprotocol.io](https://modelcontextprotocol.io/specification/draft/basic/authorization?utm_source=openai))
Applied Practice — OpsAssist Production Restart Boundary Review
Scenario: Fictional/synthetic scenario: You are building “OpsAssist,” an internal incident-response application. A model can summarize an incident and propose a mitigation, but it must not be able to restart a production service merely by emitting tool-like text. The host owns approvals and policy; an MCP client connects to a remote Operations MCP server; that server calls the company’s deployment API. A legacy client still uses the 2025-era `initialize` handshake, while the new server deployment supports MCP 2026-07-28.
<p><strong>Deliverables (add these to your MCP Systems Build Portfolio):</strong></p><ol><li>A one-page trust-boundary map for the fictional OpsAssist system. Use six labeled swimlanes: user, host, model, MCP client, MCP server, deployment API. Put a lock icon beside every authorization decision and a lightning icon beside every side effect.</li><li>A server capability card for <em>restart_service</em>: purpose, allowed environments, JSON input/output schemas, identity and scope needed, approval evidence, idempotency rule, sensitive fields, audit fields, failure classes, and owner/on-call team.</li><li>Two protocol traces: (a) approved production call returning an operation ID; (b) network timeout after dispatch, followed by an idempotent replay/status check. Annotate what the host, client, server, and deployment API each know.</li><li>A migration note: support both a 2025-era peer and MCP 2026-07-28 for a defined transition. State whether your chosen SDK is configured for automatic negotiation or a pinned revision. Do not assume that installing a current SDK automatically emits modern wire behavior; the TypeScript v2 documentation says modern 2026-07-28 support is explicit opt-in. ([ts.sdk.modelcontextprotocol.io](https://ts.sdk.modelcontextprotocol.io/v2/migration/support-2026-07-28?utm_source=openai))</li></ol><p><strong>Test matrix:</strong> valid staging request; production without approval; malformed schema; unauthorized service scope; expired/incorrect-audience token; duplicate idempotency key; downstream 500 before acknowledgement; timeout after acknowledgement; poisoned deployment-log text; old-server version negotiation; and load-balanced modern requests reaching different replicas. For each, name the expected host UX, server response class, downstream action count, and audit event.</p><p><strong>Self-review:</strong> Can you point to the exact component that prevents a production restart? If your answer is “MCP,” “the model,” or “the tool description,” redesign. Can you prove a retry does not duplicate the action? Can an operator reconstruct who authorized, what server executed, and what downstream operation actually occurred? If not, your integration boundary is incomplete.</p>
Self-review checklist
- I marked the model output as a proposal, not an authorization decision or execution event.
- I drew separate boundaries for host policy, MCP client transport, MCP server authorization, and the downstream deployment API.
- I wrote a narrow `restart_service` contract with a deny-by-default environment enum and an idempotency key.
- I identified which values are protocol-required, which are server-defined, and which are host/vendor-specific.
- I recorded an approval requirement for production and a server-side re-authorization requirement after approval returns to the host flow.
Key takeaways
- MCP 2026-07-28 is a versioned interoperability protocol: it carries structured requests and results; it does not grant the model execution authority or replace application security controls.
- Treat the host/application as the interaction and policy coordinator, the client as the protocol peer for one server, the server as the bounded capability adapter, and the downstream API/database as the final action and data authority.
- A tool schema is a contract, not an authorization policy. Validate inputs and outputs, authorize the resolved operation server-side, and verify side effects with the downstream authority.
- For the current stateless protocol era, use explicit state handles rather than transport-session state; `server/discover` is optional discovery, while each modern request is self-describing.
- Host approval UX, tool-selection heuristics, model behavior, credential storage choices, and SDK defaults are implementation-specific—not guarantees supplied by MCP.
Useful terms
- Host/application
- The user-facing application process that coordinates model interaction and MCP clients; its approval and policy behavior is application-specific.
- MCP client
- The protocol peer managed by a host to communicate with a particular MCP server.
- MCP server
- A process or service that exposes MCP capabilities and adapts them to underlying systems while enforcing its own controls.
- Tool contract
- The server-published name, description, schemas, and operational semantics for one callable capability.
Research & review note
This lesson is built from source-traceable research and reviewed before publication. AI Agentic School uses AI as a research and practice tool, not as a substitute for evidence or editorial judgment.
Sources & further reading
- modelcontextprotocol/docs/specification/2026-07-28/server/discover.mdx at main · modelcontextprotocol/modelcontextprotocol · GitHub
- Architecture – Model Context Protocol
- The 2026-07-28 Specification | Model Context Protocol Blog
- Tools – Model Context Protocol
- Tools – MCP PHP SDK
- modelcontextprotocol/docs/specification/2026-07-28/changelog.mdx at main · modelcontextprotocol/modelcontextprotocol · GitHub
- Authorization – Model Context Protocol
- Supporting protocol revision 2026-07-28 | MCP TypeScript SDK
- MCP TypeScript SDK