Pymcp

•
3
•

Implements a simple, asynchronous Modern Context Protocol (MCP) server and client for exposing and consuming remote functions.

PyMCP provides a straightforward and asynchronous implementation of the Modern Context Protocol (MCP), enabling developers to easily expose Python functions as remote, callable tools. It features a simple `@tool` decorator for defining these functions and supports hot-reloading, allowing tools to be added, modified, or removed on the fly without server restarts. Built on a JSON-based WebSocket protocol, PyMCP facilitates seamless communication between clients and the server, making it an ideal choice for creating extensible and dynamic service architectures where Python functions can be consumed remotely.

主な機能

01Simple tool definition using a Python decorator
02Hot-reloading for live updates to tools without server restart
03Asynchronous server and client implementation
04Lightweight, JSON-based WebSocket communication protocol
05Support for dependency injection for tool registry
064 GitHub stars

ユースケース

01Exposing existing Python functions as remote APIs
02Building dynamic microservices that can update logic on the fly
03Creating extensible automation backends by defining callable tools