Get the FREE Ultimate OpenClaw Setup Guide →

mcpc

An extension to MCP (Model-Context-Protocol) that enables two-way asynchronous communication between LLMs and tools through the already existing MCP transport - no additional transport layer needed.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio olahulleberg-mcpc uvx mcpc

How to use

MCPC is an extension to MCP that enables continuous, two-way communication between the running LLM and background tools. By using the existing MCP transport, MCPC allows real-time updates and streaming results from long-running tasks without breaking the conversation flow. This means your LLM can start a background operation, receive interim progress events, and later see the final results, all while maintaining compatibility with standard MCP clients and servers. The included example demonstrates how to expose tools that report progress and completion through MCPC events, while standard MCP clients simply receive an initial acknowledgment and the final results in the usual MCP format.

To use MCPC, install the package via UV (recommended) or pip, start your MCPC-enabled server, and then interact with it through an MCP client. If the client supports MCPC, you’ll get streaming task events (update, progress, complete) in real time. If not, you’ll still get synchronous results as a fallback, preserving compatibility with legacy MCP clients. The provided FastMCP example shows how to wrap a tool with MCPC support so that long-running operations can yield periodic updates while the client remains responsive.

How to install

Prerequisites:

  • Python 3.8+ (or another supported Python runtime per MCPC compatibility)
  • Internet access to install packages via pip or UV

Install via UV (recommended):

  1. Install UV if you don’t have it installed yet (instructions may vary by system):
  2. Add MCPC using UV: uv add mcpc

Install via pip:

  1. Ensure you have Python and pip installed.
  2. Install MCPC with pip: pip install mcpc

Verification:

  • Run a quick check to ensure MCPC is importable in Python: python -c "import mcpc; print(mcpc.version)"

Note: If you’re using a FastMCP-based server or a standard MCP SDK server, ensure you follow the corresponding integration steps in the MCPC documentation to enable streaming and task events.

Additional notes

Tips and known considerations:

  • MCPC relies on the existing MCP transport; ensure your MCP client/server pair supports the standard MCP protocol to take advantage of MCPC streaming features.
  • When integrating, you can design tools to emit MCPC task events (e.g., created, update, complete) so the client can render real-time progress indicators.
  • If a client does not support MCPC, MCPC provides a synchronous fallback path so operations still complete and return results, preserving backward compatibility.
  • Environment variables can be used to configure endpoints, tokens, or feature flags. Example: { "ENV_MCPC_ENABLED": "true", "ENV_MCPC_LOG_LEVEL": "info" }.
  • Review the documentation under Documentation/API References for details on protocol messages and the MCPC event payload structure to implement custom listeners and handlers.

Related MCP Servers

Sponsor this space

Reach thousands of developers