What is MCP Auto Register?
MCP Auto Register is a Python package that automates the registration of functions and classes from any Python package into a FastMCP instance, exposing them as MCP tools or resources. It is designed for developers who want to quickly turn existing library code into MCP-enabled endpoints without manual wrapping.
How to use MCP Auto Register?
Install via pip install mcp-auto-register. Then use register_functions_from_package to register specific functions (e.g., from scipy.linalg) or register_classes_from_package with a custom wrapper (e.g., for nba_api.stats.endpoints) by passing an initialized FastMCP instance. The example uses transport="stdio" when running.
Key features of MCP Auto Register
- Automatically registers functions from a Python package into FastMCP
- Supports registering classes with a user-defined wrapper function
- Allows filtering which functions to include via
func_filter
- Integrates directly with the FastMCP server instance
- Simple pip installation and minimal setup code
Use cases of MCP Auto Register
- Expose specific scientific computing functions (e.g., from
scipy.linalg) as MCP tools
- Turn external API endpoint classes (e.g., from
nba_api) into MCP tools with a consistent interface
- Quickly prototype MCP servers by reusing existing Python library code without manual scaffolding
- Automate registration of large packages where manual tool definition would be tedious
コメント