Token导航 LogoToken导航TokenDH.com
MCP auto register logo
开发工具stdio官方级别未说明来源级核验

MCP auto register

MCP Server

Automate the registration of functions and classes from a python package into a FastMCP instance.

工具数

0

提示词数

0

GitHub Stars

9

资源数

0
Python开发工具命令行工具

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

JoshuaSiraj

提供方

JoshuaSiraj

最后核验

2026/5/18 03:27

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install mcp-auto-register

详细介绍

MCP自动注册

此包自动将函数和类从python包注册到FastMCP实例中。

安装

要安装该软件包,请运行以下命令:

pip install mcp-auto-register

用法

从包中注册函数:

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()

从包中注册类:

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")

目录标签

目录标签

Python开发工具命令行工具developer-toolsPython自动化本地部署函数注册类注册FastMCP集成

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP