Skip to main content
Glama
test_mcp_registration.py866 B
#!/usr/bin/env python3 """Test MCP tool registration patterns""" from mcp.server import Server from mcp.types import Tool import inspect # Create a server instance server = Server("test-server") # Check if we can create Tool objects print("Tool class:") print(f" - Tool type: {Tool}") print(f" - Tool attributes: {[attr for attr in dir(Tool) if not attr.startswith('_')]}") # Check server's request_handlers print("\nServer request handlers:") print(f" - Type: {type(server.request_handlers)}") print(f" - Methods: {[m for m in dir(server.request_handlers) if not m.startswith('_')]}") # Look for tool-related attributes print("\nChecking for tool storage:") for attr in dir(server): value = getattr(server, attr) if 'tool' in attr.lower() or (hasattr(value, '__name__') and 'tool' in str(value).lower()): print(f" - {attr}: {type(value)}")

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/webdevtodayjason/A2AMCP'

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