Skip to content
Back to skills

Model Context Protocol Knowledge Patch

ASecurity

Model Context Protocol (MCP)

  • 25 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
ai-agentsapisecurity

Works with

  • terminal
  • cli
  • api
  • mcp

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill model-context-protocol-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Model Context Protocol Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Model Context Protocol Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-model-context-protocol-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-model-context-protocol-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: model-context-protocol-knowledge-patch
description: Model Context Protocol (MCP)
version: "2025-11-25"
license: MIT
metadata:
  author: Nevaberry
---


# Model Context Protocol Knowledge Patch

Use this skill when implementing or updating MCP clients, servers, HTTP
transports, authorization, schemas, and interactions. Consult the references
for version-specific requirements and wire examples.

## Reference index

| Reference | Topics |
| --- | --- |
| [Authorization, Registration, and Security](references/authorization.md) | Metadata discovery, registration, resource indicators, scope consent, token and issuer binding |
| [Streamable HTTP, Sessions, and Resumption](references/http-and-subscriptions.md) | POST handling, routing headers, sessions, subscriptions, SSE recovery, transport migration |
| [Elicitation, Sampling, Tools, and Tasks](references/interaction-patterns.md) | Form and URL elicitation, sampling tools, tool results, experimental core tasks, tasks extension |
| [Lifecycle, Messages, Metadata, and Schemas](references/protocol-core.md) | Discovery, stateless requests, multi round-trip results, metadata, completion, schemas, errors, caching |

## Stateless requests and discovery

For `2026-07-28`, remove `initialize` and `notifications/initialized`.
Send `io.modelcontextprotocol/protocolVersion` and
`io.modelcontextprotocol/clientCapabilities` in every request's `params._meta`.
`io.modelcontextprotocol/clientInfo` is optional but recommended.
Servers should include `io.modelcontextprotocol/serverInfo` in result metadata
and return `UnsupportedProtocolVersionError` on a version mismatch.

Servers must implement `server/discover` to advertise supported protocol
versions, capabilities, and identity. Clients may call it before other
operations to select a version or use it as a compatibility probe over stdio.
Advertise optional extensions in the `extensions` field of `ClientCapabilities`
and `ServerCapabilities`.

## HTTP session, subscription, and recovery changes

For `2026-07-28`, Streamable HTTP drops MCP sessions and `Mcp-Session-Id`.
Tools, prompts, and resources lists can no longer vary by connection.
Carry cross-call state with explicit server-minted handles passed as ordinary
tool arguments.

Use the long-lived POST response to `subscriptions/listen` in place of the HTTP
GET stream and `resources/subscribe` and `resources/unsubscribe`.
Opt in with `toolsListChanged`, `promptsListChanged`, `resourcesListChanged`, or
`resourceSubscriptions`. The server acknowledges the subscription and tags its
notifications with `io.modelcontextprotocol/subscriptionId`.
Request-scoped progress and log messages continue on their own response stream.

SSE event IDs, `Last-Event-ID` resumption, and message redelivery are removed.
A broken response stream loses the in-flight request: the client must issue a
new request with a fresh JSON-RPC ID. POSTs use `Mcp-Method` and `Mcp-Name`;
tool parameters can supply custom headers through `x-mcp-header`.

## Multi round-trip interactions and task migration

For `2026-07-28`, a server needing roots, sampling, or elicitation returns an
`InputRequiredResult` with `resultType: "input_required"` and `inputRequests`.
Retry the original operation with answers in `inputResponses`.
Successful results require a `resultType` discriminator, using `"complete"`
for ordinary results. Clients must treat omitted discriminators from earlier
revisions as `"complete"`.

URL elicitation drops `elicitationId` and `notifications/elicitation/complete`.
Retry the original request to learn the out-of-band interaction's outcome.
Servers needing correlation across retries can encode their own identifier
in `requestState`.

Tasks move from core into the official `io.modelcontextprotocol/tasks`
extension. Poll `tasks/get` and send client input with `tasks/update`.
The extension drops `tasks/result` and `tasks/list`; servers may return task
handles without per-request opt-in.

## Deprecations and error compatibility

For `2026-07-28`, remove `ping` and `logging/setLevel` calls and stop sending
`notifications/roots/list_changed`. Set `io.modelcontextprotocol/logLevel`
in a request's `_meta` to receive `notifications/message` for that request.
Servers must suppress those messages when the field is absent.

Avoid adding Roots, Sampling, or Logging to new implementations. Pass file or
directory inputs via tool arguments, resource URIs, or server configuration.
Integrate directly with a model API for sampling; use stderr over stdio or
OpenTelemetry for logging. The `includeContext` values `"thisServer"` and
`"allServers"` are formally deprecated: omit the field or use `"none"`.
Legacy HTTP+SSE is formally Deprecated; migrate to Streamable HTTP.

Prefer Client ID Metadata Documents. Dynamic Client Registration remains
available for authorization servers without document support; a dynamically
registering client must set the appropriate `application_type` for its
redirect URIs.

Missing-resource errors change from `-32002` to `-32602` (`Invalid Params`).
Use `-32000` through `-32019` for implementation-defined server errors and
reserve `-32020` through `-32099` for MCP, with existing SDK usage grandfathered.
Stable codes are `-32020` for `HeaderMismatch`, `-32021` for
`MissingRequiredClientCapability`, and `-32022` for `UnsupportedProtocolVersion`.
The schema includes `HeaderMismatchError`.

## Authorization discovery and consent

For `2025-06-18`, clients must implement RFC 8707 Resource Indicators.
Send `resource` in both authorization and token requests even when the
authorization server lacks support. Use the most specific canonical MCP URI available,
including its path when it identifies a particular server; omit a trailing
slash unless it changes the resource's meaning.

For `2025-11-25`, discovery supports OpenID Connect Discovery 1.0 metadata.
When a challenge omits `resource_metadata`, clients must try
`/.well-known/oauth-protected-resource` with the MCP endpoint path appended,
then at the origin root. Clients must verify PKCE support in discovered
metadata, requiring `code_challenge_methods_supported` in both supported
metadata formats. Use `S256` when technically capable.

Treat the challenge's `scope` as authoritative for the current request.
If absent, use all `scopes_supported` when present; otherwise omit the scope
parameter. For step-up authorization, servers should send HTTP 403 with a
Bearer challenge carrying `error="insufficient_scope"`, `scope`, and
`resource_metadata`. Clients acting for a user should try reauthorization
and limit retries of the original request.

For `2026-07-28`, authorization servers should include `iss` in authorization
responses. Clients must validate it against the recorded issuer when present
before redeeming the code. Key stored client credentials by issuer, use them only
with that issuer, and register again when the authorization server changes.

## Tool results, schemas, and caches

For `2025-06-18`, when a tool declares `outputSchema`, the server must return
conforming `structuredContent`; the client should validate it. Also return
serialized JSON in a text block in `content` for older clients.
Use a `resource_link` result's `uri` to fetch or subscribe directly; that URI
may be absent from `resources/list`. Servers returning embedded `resource`
items in tool results should implement the `resources` capability.

For `2025-11-25`, report invalid tool arguments as tool execution errors so
the model can correct the input and retry. Interpret schemas without an
explicit dialect using JSON Schema 2020-12.

For `2026-07-28`, tool `inputSchema` and `outputSchema` accept any JSON Schema
2020-12 keywords; `structuredContent` accepts any JSON value. Validators must
account for `$ref` resolution requirements and resource bounds for schema
composition keywords. The generated `schema.json` accepts fractional numeric
`minimum`, `maximum`, and `default` values.

`tools/list`, `prompts/list`, `resources/list`, `resources/read`, and
`resources/templates/list` results require `ttlMs` and `cacheScope`.
Use `ttlMs` as a freshness hint in milliseconds and `cacheScope` (`"public"`
or `"private"`) to determine whether a shared cache may store the result.
List-change notifications complement these hints. Servers should return
`tools/list` entries in a deterministic order so clients can reliably cache it.

## Form and URL elicitation

For `2025-11-25`, advertise `capabilities.elicitation.form: {}` and/or
`capabilities.elicitation.url: {}`. Empty `elicitation` means form only;
omitted `params.mode` means `"form"`. Clients must return `-32602` for an
unsupported mode. Forms support titled or untitled single-select and
multi-select enums; handle both in `ElicitResult`. String, number, and enum
fields can set `default`.

URL-mode requests have `mode: "url"`, `elicitationId`, `url`, and `message`.
An `accept` response omits `content` and records consent to navigate.
Completion may arrive separately as `notifications/elicitation/complete`
with `params.elicitationId`; clients must ignore unknown or completed IDs.
Clients must show the full URL before consent, skip automatic prefetching,
and use a browser context that keeps page contents and user input private
from the client and model. Servers must verify that the completing user is
the same user who requested the interaction.

## Sampling with tools

For `2025-11-25`, send tool-enabled sampling only to clients advertising
`capabilities.sampling.tools: {}`. Supply `tools` and control tool selection
with `toolChoice`. After an assistant message with `tool_use` blocks, the
next message must have role `user` and contain only `tool_result` blocks,
with a matching `toolUseId` for every tool-use `id`.
Clients should return `-32602` for missing results or mixed content.
`includeContext` defaults to `"none"`; `"thisServer"` and `"allServers"` are
soft-deprecated and should only be used with clients advertising
`capabilities.sampling.context: {}`.

## Experimental core tasks

Tasks are experimental in `2025-11-25`. Under `capabilities.tasks.requests`,
servers advertise `tools.call`; clients advertise `sampling.createMessage`
and/or `elicitation.create`, each as `{}`. Listing and cancellation have
separate opt-ins at `capabilities.tasks.list` and `capabilities.tasks.cancel`.
With `capabilities.tasks.requests.tools.call` advertised, apply the tool's
`execution.taskSupport`: omitted means `"forbidden"`, `"optional"` permits
either form, and calling a `"required"` tool without augmentation returns `-32601`.

Poll `tasks/get` with `params.taskId`, respecting supplied `pollInterval`
in milliseconds; status notifications are optional. Actual `ttl` can differ
from the request or be `null` for unlimited retention, and expiration can
remove a task in any state. On `input_required`, call `tasks/result` so the
receiver can send follow-up requests while the response waits for a terminal
state. The result retains the underlying operation's result or JSON-RPC error.

`tasks/cancel` must set `cancelled` before replying even if execution continues.
Terminal tasks must reject cancellation with `-32602`; cancelled tasks can be
deleted immediately. Receivers must bind tasks to authorization context when
available and limit access and listing to it. Otherwise they must generate
cryptographically secure task IDs.

## Completion, display, and observability

For `2025-03-26`, servers can advertise `completions: {}` during initialization;
`ProgressNotification` can include an optional human-readable `params.message`.
For `2025-06-18`, pass previously resolved variables in `CompletionRequest`
parameters' `context`. Use `title` for human-readable labels where provided
and `name` for programmatic identifiers in protocol calls.
For `2025-11-25`, servers can supply icons for tools, resources, resource
templates, and prompts. Optional `Implementation.description` provides
human-readable context during initialization.
For `2026-07-28`, propagate OpenTelemetry context using `_meta` keys
`traceparent`, `tracestate`, and `baggage`.

Files in this skill

  • SKILL.md8.4 KB
  • coverage.json1.5 KB
  • references/authorization.md5.3 KB
  • references/http-and-subscriptions.md3.3 KB
  • references/interaction-patterns.md7.4 KB
  • references/protocol-core.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.