Skip to main content
Glama
chatmcp
by chatmcp
submit.py760 B
import aiohttp import json import os 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)}")

Implementation Reference

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