Skip to main content
Glama
chatmcp
by chatmcp

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
NameRequiredDescriptionDefault
urlYesURL of the MCP Server to submit
avatar_urlNoavatar URL of the MCP Server to submit

Implementation Reference

  • 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"], },
  • 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"], }, ),
  • 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, ) ]

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/chatmcp/mcp-server-collector'

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