MCP实时协议扩展

MCPL 是模型上下文协议(MCP)的向后兼容扩展,通过推送事件、上下文钩子、服务端主动推理和 WebSocket 传输等能力,让服务器成为推理生命周期中的主动参与者。

  • by anima-research
  • JavaScript
  • 本地部署
  • 2 星标
  • 更新于
在 GitHub 查看 anima-research/mcpl

使用说明

MCP Live (MCPL)

MCPL is a backward-compatible extension to the Model Context Protocol (MCP) that enables servers to be active participants in the inference lifecycle.

Features

  • Push Events — Servers can push events to hosts that may trigger model inference
  • Context Hooks — Servers can inject context before inference, with observation and injection granted separately
  • Server-Initiated Inference — Servers can request autonomous inference from the host
  • Capability Grants — Host-controlled authorization for server behaviors
  • Feature Sets — Named behavior bundles derived from the capability grant
  • Event Tags — Semantic labels for host-controlled event treatment
  • Manifest Changes — Hosts re-fetch and compare announced server changes
  • WebSocket Transport — Persistent bidirectional connections with the same capability negotiation as other transports
  • Endpoint URIs — mcpl:// locators resolve to secure WebSocket endpoints
  • Bulk Content References — Bounded references to large payloads, with host-controlled fetching and context inclusion

Specification

See SPEC.md for the full protocol specification.

WebSocket transport is adopted separately from the state/branches proposal; see the accepted transport proposal.

Status

Draft specification (v0.5.0-draft). Subject to change. SPEC.md is the authoritative integrated text; RFC files preserve proposal and review history.

RFC Status Integrated specification
001: Event Tags Accepted; incorporated §16
002: Capability Grants Accepted; incorporated §5.4, §6.7, §14
003: Manifest Changes Accepted; incorporated §17
004: Endpoint URIs Accepted; incorporated §18
005: Bulk Content References Draft; incorporated, acceptance pending executable vectors §19

RFC-005's incorporation into the draft does not waive its acceptance criterion: freeze executable vectors under conformance/ and run them against a strict schema/parser implementation and a host-treatment implementation.

License

MIT