submit-mcp-server
Submit MCP Server details, including URL and avatar, to the MCP Servers Directory for collection and public listing by mcp-server-collector.
Instructions
Submit MCP Server to MCP Servers Directory like mcp.so
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| avatar_url | No | avatar URL of the MCP Server to submit | |
| url | Yes | URL of the MCP Server to submit |
Implementation Reference
- src/mcp_server_collector/server.py:46-63 (registration)Registration of the 'submit-mcp-server' tool in list_tools(), including name, description, and input schema.types.Tool( name="submit-mcp-server", description="Submit MCP Server to MCP Servers Directory like mcp.so", inputSchema={ "type": "object", "properties": { "url": { "type": "string", "description": "URL of the MCP Server to submit", }, "avatar_url": { "type": "string", "description": "avatar URL of the MCP Server to submit", }, }, "required": ["url"], }, ),
- src/mcp_server_collector/server.py:86-97 (handler)Handler logic in handle_call_tool() for 'submit-mcp-server': extracts arguments, calls submit_mcp_server helper, and returns JSON result as TextContent.case "submit-mcp-server": url = arguments.get("url") avatar_url = arguments.get("avatar_url") or "" result = await submit_mcp_server(url, avatar_url) content = json.dumps(result) return [ types.TextContent( type="text", text=content, ) ]
- Core helper function that performs HTTP POST to submit the MCP server URL and avatar to the directory endpoint.async def submit_mcp_server(url: str, avatar_url: str): payload = { "url": url, "avatar_url": avatar_url } try: async with aiohttp.ClientSession() as session: async with session.post( os.getenv("MCP_SERVER_SUBMIT_URL"), headers={"Content-Type": "application/json"}, data=json.dumps(payload) ) as response: if response.status == 200: return await response.json() else: raise Exception(f"submit mcp server failed: HTTP {response.status}") except Exception as e: raise Exception(f"submit mcp server failed: {str(e)}")