Skip to content
Agent Field Notes
Practice topicsFilter practice questions by topic.All practice →
knowledge unit 32AdvancedSystem designAbout 15 minutes

Understand → Implement → Debug → Design

Versioned protocol, identity and execution boundaries

Pin MCP 2026-07-28 while separating per-request compatibility, server trust, OAuth issuer/resource binding and business authorization.

MCPOAuthtrust boundaryTool authorization

Knowledge content check2026-10-30 · Check the source of the original question2026-10-30

Which step do you want to learn from this knowledge point?

Select the starting point based on the current basis, or you can go deeper one by one. When you encounter an unfamiliar concept, go back to the core principles first; use the knowledge exercises to check your understanding when you are finished.

Understand first

New to this knowledge point

Complete the prerequisite concepts, read the principles and counterexamples, and then explain why in your own words.

Start with core principles →

Implement next

Prepare to write the principles into code

Understand implementation steps and boundaries, complete small tasks, and check results against acceptance requirements.

Reading implementation and trade-offs →

Debug failures

Need to handle failures and changes in conditions

Follow the continuous questioning to locate the failure premise, and then compare the migration cases to explain how the plan should be adjusted.

Continue to delve deeper into the problem →

Compare designs

Need to design or review plans

Combine engineering deductions and senior self-evaluation standards to explain the applicable conditions, costs and alternatives of the plan.

Analyze engineering scenarios →
Knowledge unit directory

LEARN · PRACTICE · REFLECT

Knowledge learning and personal records

My notes and review ↗

First read along the principles, Q&A and migration cases. When you need to check your understanding, switch to reinforcement exercises or start personal recording.

Answers and personal notes

Each modified commit will be kept as an independent history. Your level of mastery is up to you to evaluate yourself against the standards.

Core concept · Versioned protocol, identity and execution boundaries

Understand the core principles first

Preparatory concepts:OAuth resource server, tool gateway, least privilege

MCP interoperability is one boundary, not production authorization. In 2026-07-28 core, each request supplies version/capabilities; discovery identity and tool annotations remain self-reported. Validate HTTP header/body consistency, authentic authorization-server discovery, issuer response binding and tokens for the target MCP resource. Authorize tenant/resource/action server-side, protect state/task handles, and use separate scoped downstream credentials. Preserve a legacy adapter only with the same security policy; never downgrade to bypass denial.

Visual guide · Protocol discovery is not business authority

Protocol discovery is not business authority

MCP carries capability and call messages. Trusted application checks and audience-bound credentials define who may act on each resource. Select the figure to open it at full size.

Four separate questions

Can this peer speak the selected revision? Is this the intended server and authorization issuer? Can this principal act on this resource? Did the business action commit? Discovery answers only the first part.

Validate at the point of use

Gateway headers must match body fields; OAuth responses must bind to the recorded issuer; tokens must target the MCP resource; action and tenant checks happen at execution. Model-visible filtering improves usability but is not enforcement.

Continue without expanding authority

MRTR state and Tasks handles carry continuity, not permission. Validate integrity, scope and resource ownership each time. Pin extension contracts separately from modern core statelessness and keep equivalent controls during a legacy rollback.

Tool calls: trust boundaries from proposal to receipt
  1. 1
    Model

    Proposes a tool name, arguments, and call_id. All are candidate inputs.

  2. 2
    Runtime

    Checks the allowlist, completeness, shared budget, and arguments. A failed check stops the action.

  3. 3
    Business service

    Reads identity from a trusted session; checks resource ownership and current permissions, then state at the commit boundary.

  4. 4
    Tool adapter

    Correlates success, failure, or unknown receipts by call_id and preserves facts that already occurred.

  5. 5
    Acceptance

    Adds the receipt to the next input; checks the final answer against facts before reporting business completion.

Valid structure grants no permission. call_id correlates a call in this turn; it cannot replace a business operation key across recovery.

Check understanding with a question

Does connecting to MCP complete production-grade tool integration? Where are the boundaries of trust?

Compare with the reference answer

MCP interoperability is one boundary, not production authorization. In 2026-07-28 core, each request supplies version/capabilities; discovery identity and tool annotations remain self-reported. Validate HTTP header/body consistency, authentic authorization-server discovery, issuer response binding and tokens for the target MCP resource. Authorize tenant/resource/action server-side, protect state/task handles, and use separate scoped downstream credentials. Preserve a legacy adapter only with the same security policy; never downgrade to bypass denial.

Implementation and trade-offs

Fix the version and each enforcement point

This answer targets 2026-07-28; a deployed 2025-11-25 peer still requires its own initialized adapter. Modern core metadata declares protocol version and client capabilities per request. It is not a security attestation: clientInfo/serverInfo and readOnlyHint do not establish identity, permission or actual side effects. Lists may depend on current authorization, never previous connection calls. Authorize actual resources at execution even when the model cannot see a tool.

Protect HTTP routing and OAuth separately

Require version/method/name headers where applicable and validate them against the body so gateway policy and execution cannot refer to different tools. For protected HTTP use validated Protected Resource Metadata and authorization-server metadata, PKCE and exact redirect handling. Record the selected issuer with the authorization request. If iss is returned, compare it exactly; if the server advertised iss support but omits it, reject before sending a code to the token endpoint. Bind authorization and token requests to the target resource; validate audience/expiry/scope and tenant/resource permission at the MCP service. A valid signature alone does not make a token valid here.

Control downstream and continuation state

Do not pass the incoming bearer token to an unrelated downstream API. A vault/proxy can use separately scoped credentials on behalf of the authorized principal. Tools and remote text cannot grant new policy. Modern MRTR requestState is attacker-controlled on return: verify integrity, principal, expiry and parameter binding when it affects business logic. Enforce one-time use separately where needed. Authorize each taskId lookup/update/cancel; possession of a guessed handle is not permission.

Compatibility and negative evidence

Core has no initialization handshake; adopted extensions can have independent lifecycle/negotiation rules. Enable Tasks only on mutual support; otherwise use documented fallback or a controlled error. Keep security checks in both legacy and modern adapters. Test wrong issuer, wrong resource audience, changed header/body, foreign tenant, tampered state, unauthorized task handle, misleading read-only hint and oversized results. Expected rejection is a test plan until executed; this question reports no live MCP security validation.

Engineering deduction

scene
Hypothetical engineering scenario: The enterprise provides document query and work order modification as two MCP tools to the R&D Agent.
design decisions
Only necessary tools are exposed according to tasks; query and modification use different action permissions; the server verifies the audience, tenant and work order ownership.
Verify target
Expected behavior: Read-only tasks cannot modify tickets; tokens issued by another service are rejected; downstream credentials do not enter the model.
applicable boundary
Hypothetical expected behavior, not a measured security test. HTTP OAuth rules, stdio environment handling, core versioning and optional extensions have different scopes.

Continuous questions and answers

Continue reading along with the premises and constraints of the problem. Understand the reference answers first, then try to put away the answers and explain the cause and effect and trade-offs in your own words.

Draw inferences from one example: If the conditions change, how to deduce it?

First find out the conditions for change, and then determine which premises in the original plan still hold true. The following cases are teaching deductions to facilitate the transfer of principles to new problems.

Local stdio deployment

Changing conditions:HTTP authorization is replaced by a host-launched process

Extended question:Does modern metadata make inherited credentials safe?

Derivation and reference solutions

No. Pin executable provenance, pass only required environment variables, separate stdout protocol from stderr logs, and constrain file/network access externally. Modern per-request capabilities are not an OS sandbox or credential policy.

The principles that remain unchanged:Transport choice does not remove least privilege.

Legacy client remains in production

Changing conditions:An old client requires initialize while modern traffic uses metadata

Extended question:Can its fallback skip the new authorization checks?

Derivation and reference solutions

No. Keep era-specific framing but identical resource policy and scoped credentials. Route it explicitly to a compatible adapter or reject with an actionable upgrade requirement. A legacy-only client cannot fall forward to a modern-only server.

The principles that remain unchanged:Compatibility must not expand authority.

Easy to make mistakes

  • Treating self-reported identity or capabilities as proof of trust
  • Normalizing an iss comparison or ignoring a wrong token audience
  • Weakening authorization in a legacy fallback or treating opaque handles as bearer permission

References

Original scenario and rubric reviewed against MCP 2026-07-28 primary specifications on 2026-10-30. Legacy references are retained for compatibility scope; no remote server security or learner outcomes were measured. New Q&A and migration cases are added for principle explanation, and source verification and case operation verification are recorded separately.

Check how far you understand

After reading, you can explain the principles, boundaries, and trade-offs against these standards. It is up to you to evaluate your mastery; if further verification is needed, complete the small tasks below.

Basic standards met
Knows a connected MCP tool still needs server-side resource authorization.
Intermediate and advanced signals
Explains header/body agreement, issuer response binding, resource audience and separate downstream credentials.
Senior criteria
Designs version-compatible enforcement, continuation-state protection and falsifiable negative controls without claiming unrun tests.

Continue to do advanced research experiments

Push the read-only tool boundary to the approval boundary

First observe whether business effects have been generated while waiting for approval, and then press README to check action binding and recovery.

Read full text and fault analysis → · Download experiment package ↓

python3 approval_cli.py submit
python3 approval_cli.py run
python3 approval_cli.py inspect
# 审查 draft 和 action_json 后,按 README 使用对应 binding_hash 批准并恢复

Keep evidence and check item by item

  • Status waiting_approval, no reports service has written yet.
  • Review actions, targets, scopes, inputs, and content summaries before approving the corresponding binding_hash.
  • Run tests to reject, cancel and modify content respectively to explain why old approvals cannot be reused.

Local approval fixture; --actor is not a login or production authentication. No network by default.

Hands-on verificationComplete on demand · Suggestions25 minutes

Design a version-pinned ticket MCP gateway and a negative-control table covering wrong issuer, wrong audience, cross-tenant access, header/body disagreement, tampered MRTR state and unauthorized task lookup. Include an equivalent legacy path.

Expand acceptance requirements and checkpoints
  • Each denial names the component enforcing it
  • No token or model text can authorize another tenant or downstream service
  • Legacy compatibility retains the same policy and records unexecuted tests as pending

Key inspections

  • Separates protocol metadata and annotations from authenticated authority
  • Binds authorization response issuer and token resource audience independently
  • Applies resource/handle authorization consistently to modern and legacy adapters