- Explore MCP Servers
- mcp_auto_register
Mcp Auto Register
What is Mcp Auto Register
mcp_auto_register is a Python package that automates the registration of functions and classes from a specified Python package into a FastMCP instance, streamlining the integration process.
Use cases
Use cases for mcp_auto_register include automating the registration of mathematical functions from libraries like SciPy, or integrating API endpoints from sports statistics libraries, enabling seamless access to complex functionalities within a FastMCP environment.
How to use
To use mcp_auto_register, install it via pip with ‘pip install mcp-auto-register’. Then, you can register functions or classes from a package by importing the relevant functions and initializing a FastMCP instance, followed by calling the registration functions with the desired package and instance.
Key features
Key features of mcp_auto_register include automatic registration of functions and classes, support for filtering specific functions, and the ability to wrap classes for enhanced functionality.
Where to use
mcp_auto_register can be used in various fields such as data science, machine learning, and any application that requires the integration of Python packages into a FastMCP framework.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Auto Register
mcp_auto_register is a Python package that automates the registration of functions and classes from a specified Python package into a FastMCP instance, streamlining the integration process.
Use cases
Use cases for mcp_auto_register include automating the registration of mathematical functions from libraries like SciPy, or integrating API endpoints from sports statistics libraries, enabling seamless access to complex functionalities within a FastMCP environment.
How to use
To use mcp_auto_register, install it via pip with ‘pip install mcp-auto-register’. Then, you can register functions or classes from a package by importing the relevant functions and initializing a FastMCP instance, followed by calling the registration functions with the desired package and instance.
Key features
Key features of mcp_auto_register include automatic registration of functions and classes, support for filtering specific functions, and the ability to wrap classes for enhanced functionality.
Where to use
mcp_auto_register can be used in various fields such as data science, machine learning, and any application that requires the integration of Python packages into a FastMCP framework.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
MCP Auto Register
This package automates the registration of functions and classes from a python package into a FastMCP instance.
Installation
To install the package, run the following command:
pip install mcp-auto-register
Usage
Register functions from a package:
from mcp_auto_register.register import register_functions_from_package
from mcp.server.fastmcp import FastMCP
# Initialize MCP instance
mcp_instance = FastMCP()
register_functions_from_package('scipy.linalg', mcp_instance=mcp_instance, func_filter=['eigh', 'inv'])
if __name__ == "__main__":
mcp_instance.run()
Register classes from a package:
import inspect
from mcp_auto_register.register import register_classes_from_package
from mcp.server.fastmcp import FastMCP
from nba_api.stats.endpoints._base import Endpoint
# Create MCP instance
mcp = FastMCP()
def nba_endpoint_wrapper(endpoint: Endpoint):
init_params = inspect.signature(endpoint.__init__).parameters
required_args = {
p: param.annotation if param.annotation != inspect.Parameter.empty else "Any"
for p, param in init_params.items()
if p != "self" and param.default == inspect.Parameter.empty
}
def wrapper(**kwargs):
return endpoint(**kwargs).get_dict()
wrapper.__signature__ = inspect.Signature(
parameters=[
inspect.Parameter(arg, inspect.Parameter.POSITIONAL_OR_KEYWORD)
for arg, _ in required_args.items()
]
)
return wrapper
register_classes_from_package("nba_api.stats.endpoints", nba_endpoint_wrapper, mcp)
if __name__ == "__main__":
mcp.run(transport="stdio")
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










