{
  "schema_version": 1,
  "title": "Model Context Protocol (MCP): Authorization",
  "review_type": "AI-assisted source-support audit; not independent expert verification",
  "sources": [
    {
      "id": "S1",
      "key": "mcp-spec",
      "title": "Authorization - Model Context Protocol",
      "author": "Model Context Protocol contributors. (Specification 2026-07-28).",
      "url": "https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization",
      "requested_url": "https://modelcontextprotocol.io/specification/latest/basic/authorization",
      "accessed_at": "2026-11-13T22:38:56.333Z",
      "source_type": "primary",
      "version": "2026-07-28",
      "published_at": null,
      "source_date_note": "Model Context Protocol contributors. (Specification 2026-07-28).",
      "retrieved_body_sha256": "916f6a7827436ced61a29ceba7a151ced4ebd777985b58ea252165c4db928359",
      "library": {
        "id": "7467b89a07147fb5713bd8ab0a705b91",
        "revision": "576ab5a15ec1e4ce1d73c9cf9b1b561e",
        "published_at": null,
        "captured_at": "2026-11-07T02:46:59.715Z",
        "exact_quote_in_saved_original": true,
        "passage_matches": [
          {
            "evidence_id": "S1-E1",
            "exact_match": true
          },
          {
            "evidence_id": "S1-E2",
            "exact_match": true
          },
          {
            "evidence_id": "S1-E3",
            "exact_match": true
          }
        ]
      },
      "evidence": [
        {
          "id": "S1-E1",
          "location": "Token Handling",
          "quote": "expired tokens MUST receive a HTTP 401 response.",
          "normalized_text_offset": 11606
        },
        {
          "id": "S1-E2",
          "location": "Token Handling",
          "quote": "tokens were issued specifically for them as the intended audience",
          "normalized_text_offset": 11389
        },
        {
          "id": "S1-E3",
          "location": "Error Handling",
          "quote": "Invalid scopes or insufficient permissions",
          "normalized_text_offset": 12878
        }
      ],
      "limitations": "HTTP transport and token handling; stdio uses a different credential arrangement.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S2",
      "key": "oauth-resource",
      "title": "RFC 8707: Resource Indicators for OAuth 2.0",
      "author": "Campbell, B., Bradley, J., & Tschofenig, H. (2020).",
      "url": "https://www.rfc-editor.org/rfc/rfc8707.html",
      "requested_url": "https://www.rfc-editor.org/rfc/rfc8707.html",
      "accessed_at": "2026-11-13T22:38:56.351Z",
      "source_type": "primary",
      "version": null,
      "published_at": null,
      "source_date_note": "Campbell, B., Bradley, J., & Tschofenig, H. (2020).",
      "retrieved_body_sha256": "d085d9b8e5665995a3c9702ffb1458ac93c51855624f1109e2c81e467f3e82dd",
      "library": null,
      "evidence": [
        {
          "id": "S2-E1",
          "location": "RFC 8707 §1–2",
          "quote": "it can restrict the intended audience of that token to the given resource",
          "normalized_text_offset": 3593
        }
      ],
      "limitations": "Resource indicators bind the intended resource; a scope string alone is not that binding.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    },
    {
      "id": "S3",
      "key": "oauth-bearer",
      "title": "RFC 6750: The OAuth 2.0 Authorization Framework: Bearer Token Usage",
      "author": "Jones, M., & Hardt, D. (2012).",
      "url": "https://www.rfc-editor.org/rfc/rfc6750.txt",
      "requested_url": "https://www.rfc-editor.org/rfc/rfc6750.txt",
      "accessed_at": "2026-11-13T22:44:36.818Z",
      "source_type": "primary",
      "version": null,
      "published_at": null,
      "source_date_note": "Jones, M., & Hardt, D. (2012).",
      "retrieved_body_sha256": "9dc385cf4ecdd85024e5a95e447ede9230e11700bf35251906b25b37557d604b",
      "library": null,
      "evidence": [
        {
          "id": "S3-E1",
          "location": "RFC 6750 §3.1",
          "quote": "The access token provided is expired, revoked, malformed, or invalid for other reasons.",
          "normalized_text_offset": 17525
        },
        {
          "id": "S3-E2",
          "location": "RFC 6750 §3.1",
          "quote": "The request requires higher privileges",
          "normalized_text_offset": 17790
        },
        {
          "id": "S3-E3",
          "location": "RFC 6750 §3.1",
          "quote": "HTTP 403 (Forbidden)",
          "normalized_text_offset": 17908
        }
      ],
      "limitations": "Bearer-token errors; tokens are secrets. No token is entered or sent by this notebook.",
      "checks": [
        "publisher URL and final redirect inspected",
        "actual relevant primary passage read",
        "exact excerpt matched",
        "scope and available version/date inspected"
      ]
    }
  ],
  "claims": [
    {
      "id": "C01",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "Protected request — HTTP + bearer token — A client calls an HTTP MCP resource using its issued access token. — Record the requested resource and operation without logging the token.; Validate token — Trusted validation — Validate authenticity, issuer, expiry and the resource audience using the applicable authorization system. — The lab receives validation outcomes; parsing claims alone does not establish validity.; Check permission — Required scope — Compare trusted granted permissions with the operation’s required permission. — A valid token can still lack permission for a particular operation.; Return outcome — Allow · 401 · 403 — Invalid or expired tokens receive 401; insufficient permission is a 403 case. — Keep error responses useful without exposing token material.",
      "source_ids": [
        "S1",
        "S2",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3",
        "S2-E1",
        "S3-E1",
        "S3-E2",
        "S3-E3"
      ],
      "verdict": "editorial_diagram_with_source_supported_roles",
      "reason": "Diagram is a teaching workflow, not an exhaustive protocol or measured system. Each role and arrow is bounded in nearby text."
    },
    {
      "id": "C02",
      "notebook_locations": [
        "experiment"
      ],
      "claim": "Set three trusted outcomes. These switches stand in for real validation that has already happened; the page never accepts a token. The requested operation requires the fictional scope notes:read. This is a decision table over trusted booleans. It does not validate a signature, discover metadata, refresh credentials or secure an endpoint. Valid token; wrong audience: 401: The resource cannot accept a token issued for a different audience. Valid token and audience; missing scope: 403: The token is accepted as valid but does not authorize this operation. All three checks pass: Allow in this toy model: Real deployments also enforce operation-specific policy and the rest of the protocol.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_synthetic_experiment",
      "reason": "Original fixed inputs and outputs; Python assertions and independent browser arithmetic checked in verification artifacts."
    },
    {
      "id": "C03",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "MCP separates an application calling tools from the server exposing them. For a protected HTTP endpoint, authorization determines which requests that resource accepts. The protocol’s authorization specification describes OAuth roles, discovery and token handling; this notebook focuses on the resource-server decision after token validation. It does not describe the complete login flow.",
      "source_ids": [
        "S1"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C04",
      "notebook_locations": [
        "workflow"
      ],
      "claim": "A token can be validly issued yet intended for another resource. RFC 8707 distinguishes where a token can be redeemed from what access a scope requests. The MCP server must check that the token was issued for its own intended audience. A matching permission name does not repair an audience mismatch.",
      "source_ids": [
        "S1",
        "S2"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3",
        "S2-E1"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C05",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "Invalid-token and insufficient-scope errors are different cases in the standards. In the experiment, an invalid validation result takes priority over the scope result. The diagram shows that decision order explicitly. Neither a status code nor a successful local boolean test proves that the real validation system is correct.",
      "source_ids": [
        "S1",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3",
        "S3-E1",
        "S3-E2",
        "S3-E3"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C06",
      "notebook_locations": [
        "interpretation"
      ],
      "claim": "Editorial implementation checklist: verify token handling at the actual server boundary, avoid token logging, test cross-resource rejection, and test each sensitive operation’s permission rule. Keep discovery, redirect validation and client security work in the full specification; they are outside this lesson’s simulator.",
      "source_ids": [
        "S1"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3"
      ],
      "verdict": "source_supported_with_stated_scope",
      "reason": "Read against the stated source sections and notebook assumptions; see separate source audit. "
    },
    {
      "id": "C07",
      "notebook_locations": [
        "reproduce"
      ],
      "claim": "The original standard-library Python example passed its assertions and 8 input fixtures. Its browser implementation is separately compared against those results.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "tested_original_example",
      "reason": "No publisher code executed; no model, external network call or privileged action in the examples."
    },
    {
      "id": "C08",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "A token grants notes:read but targets another resource. What should this protected resource do? Correct answer: Reject the token. The intended audience must match this resource. A scope name is not audience validation.",
      "source_ids": [
        "S1",
        "S2"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3",
        "S2-E1"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C09",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "A valid, correctly targeted token lacks the required scope. Which case is this? Correct answer: Insufficient permission (403). The token can be valid while the operation remains forbidden.",
      "source_ids": [
        "S1",
        "S3"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3",
        "S3-E1",
        "S3-E2",
        "S3-E3"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C10",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "What does changing the switches demonstrate? Correct answer: Decision logic over assumed trusted results. The switches provide inputs. They do not establish authenticity or validate a real credential.",
      "source_ids": [],
      "evidence_ids": [],
      "verdict": "original_example_or_reasoned_limitation",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    },
    {
      "id": "C11",
      "notebook_locations": [
        "self-check"
      ],
      "claim": "Which scope does this lesson cover? Correct answer: Protected HTTP MCP resources. MCP authorization has transport-specific scope; this lesson follows the HTTP resource-server case.",
      "source_ids": [
        "S1"
      ],
      "evidence_ids": [
        "S1-E1",
        "S1-E2",
        "S1-E3"
      ],
      "verdict": "source_supported_and_worked_example",
      "reason": "Answer rechecked against the declared fixture and cited source scope."
    }
  ],
  "original_experiment": {
    "scope": "Protected HTTP MCP resources. This is an authorization study, not an implementation of an OAuth client or a token validator.",
    "assumptions": "This is a decision table over trusted booleans. It does not validate a signature, discover metadata, refresh credentials or secure an endpoint.",
    "results_file": "verification/python-results.json"
  },
  "library_gap": null,
  "excluded_evidence": [],
  "limitations": [
    "No real model or GPU measured.",
    "Sources and version/date labels checked as recorded; this does not prove absence of errors."
  ],
  "separate_audit_file": "verification/source-audit.json",
  "publication": {
    "state": "published",
    "approved_on": "2026-11-14",
    "published_on": "2026-11-14",
    "source_checks_on": "2026-11-13"
  }
}
