Skip to main content
Glama
check_fastmcp_version.py1.04 kB
#!/usr/bin/env python3 """ 检查 FastMCP 版本和属性 """ try: import fastmcp print(f"FastMCP 版本: {getattr(fastmcp, '__version__', '未知')}") print(f"FastMCP 路径: {fastmcp.__file__}") print(f"FastMCP 主要属性: {[attr for attr in dir(fastmcp) if not attr.startswith('_')]}") # 检查 FastMCP 类 if hasattr(fastmcp, 'FastMCP'): FastMCP = fastmcp.FastMCP print(f"\nFastMCP 类属性: {[attr for attr in dir(FastMCP) if not attr.startswith('_')]}") # 创建一个测试实例 test_mcp = FastMCP("test") print(f"\nFastMCP 实例属性: {[attr for attr in dir(test_mcp) if not attr.startswith('_')]}") # 检查 tool 方法 if hasattr(test_mcp, 'tool'): print(f"\ntool 方法类型: {type(test_mcp.tool)}") print(f"tool 方法属性: {dir(test_mcp.tool)}") except ImportError as e: print(f"导入 FastMCP 失败: {e}") except Exception as e: print(f"检查 FastMCP 时出错: {e}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Lillard01/chatExcel-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server