Pymcp icon

Pymcp

5

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

About

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.

Key Features

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

Use Cases

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

Advertisement