OM

olahulleberg/mcpc

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

35 stars 7 forks 质量 52 趋势 12MIT

这是MCP(模型-上下文-协议)的扩展,使LLM与工具之间通过已有的MCP传输实现双向异步通信——无需额外的传输层。

概览

MCPC 是 MCP(模型-上下文-协议)的扩展,解决了 LLM 工具交互中的一个关键限制: 。它通过已有的 MCP 传输促进了 LLM 与工具之间的连接——无需额外的传输层,同时保持完全向后兼容。 MCPC 是 MCP 协议的替代品,而非替代品。它基于现有 MCP 基础设施,增加了实时双向通信能力,同时保持与标准 MCP 实现的完全兼容性。

概述(AI 翻译)

MCPC 是 MCP(模型-上下文-协议)的扩展,解决了 LLM 工具交互中的一个关键限制:在运行工具后台任务时实现持续对话。它通过已有的 MCP 传输促进了 LLM 与工具之间的异步双向通信——无需额外传输层,同时保持完全向后兼容。

什么是MCPC?

MCPC 是 MCP 协议的扩展,而非替代品。它基于现有 MCP 基础设施,增加了实时双向通信能力,同时保持与标准 MCP 实现的完全兼容性。

MCPC 解决了大型语言模型工具交互中的一个关键限制:在运行后台任务时实现连续双向通信:

  • LLM与使用同一MCP传输工具之间的双向通信
  • 在工具执行过程中与大型语言模型的持续对话
  • 来自后台进程的实时更新
  • 操作完成时的异步通知
  • 支持无限期运行任务并同步流式更新

兼容性矩阵

特色

|专题 |状态 |注释 |

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

MCPC - Model Context Protocol Callback

MCPC is an extension to MCP (Model-Context-Protocol) that solves a critical limitation in LLM tool interactions: enabling continued conversations while running tools background tasks. It facilitates asynchronous two-way communication between LLMs and tools through the already existing MCP transport - no additional transport layer needed, while maintaining full backward compatibility.

What is MCPC?

MCPC is an extension to the MCP protocol, not a replacement. It builds upon the existing MCP infrastructure to add real-time two-way communication capabilities while maintaining full compatibility with standard MCP implementations.

MCPC solves a critical limitation in LLM tool interactions: enabling continuous two-way communication while running background tasks:

  • Bidirectional communication between LLMs and tools using the same MCP transport
  • Continuous conversation with LLMs during tool execution
  • Real-time updates from background processes
  • Asynchronous notifications when operations complete
  • Support for indefinitely running tasks with streaming updates

Compatibility Matrix

Features

Feature Status Notes
STDIO Transport ✅ Implemented Full support for standard input/output transport
SSE Transport ✅ Implemented Full support for standard input/output transport
MCPC Client → Standard MCP Server ✅ Implemented Full backward compatibility
Standard MCP Client → MCPC Server ✅ Implemented Automatic fallback to synchronous results

Frameworks

Framework Status Notes
FastMCP 😎 ✅ Implemented Recommended
Standard MCP SDK Server ✅ Implemented Works (Use FastMCP if you can)

Quick Installation

# With UV (recommended)
uv add mcpc

# With pip
pip install mcpc

Basic Client Usage

# Initialize the MCPC handler
mcpc_handler = MCPCHandler("my-provider")

# Define your event listener function
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →