submit-mcp-server
Submit an MCP server URL to the MCP Servers Directory for inclusion in the public registry, enabling discovery and integration.
Instructions
Submit MCP Server to MCP Servers Directory like mcp.so
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the MCP Server to submit | |
| avatar_url | No | avatar URL of the MCP Server to submit |
Implementation Reference
- src/mcp_server_collector/submit.py:5-24 (handler)Core handler function that submits the MCP server by POSTing to an endpoint defined in MCP_SERVER_SUBMIT_URL environment variable.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)}")
- Input schema definition for the 'submit-mcp-server' tool, specifying required 'url' and optional 'avatar_url'.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:46-63 (registration)Registration of the 'submit-mcp-server' tool in the list_tools handler, including name, description, and 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)Dispatcher handler in call_tool that extracts arguments, calls submit_mcp_server, and returns the 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, ) ]