Wednesday, January 8, 2025

What is capabiltiy Negotiation in MCP

Capability Negotiation 

The Model Context Protocol uses a capability-based negotiation system where clients and servers explicitly declare their supported features during initialization. Capabilities determine which protocol features and primitives are available during a session.

Servers declare capabilities like resource subscriptions, tool support, and prompt templates

Clients declare capabilities like sampling support and notification handling

Both parties must respect declared capabilities throughout the session

Additional capabilities can be negotiated through extensions to the protocol



Each capability unlocks specific protocol features for use during the session. For example:

Implemented server features must be advertised in the server’s capabilities

Emitting resource subscription notifications requires the server to declare subscription support

Tool invocation requires the server to declare tool capabilities

Sampling requires the client to declare support in its capabilities

This capability negotiation ensures clients and servers have a clear understanding of supported functionality while maintaining protocol extensibility.

references:

https://spec.modelcontextprotocol.io/specification/architecture/


No comments:

Post a Comment