Skip to main content
Glama
hub_client.py1.11 kB
from json import loads from toolkit_testing.integration_tests.healthcheck import poll_healthcheck from toolkit_testing.integration_tests.routing import Routing from toolkit_testing.integration_tests.client import ProviderClientHelper _ROUTING = Routing("http://localhost", 8088) class HubClient: def __init__(self): self._client_helper = ProviderClientHelper() async def get_discovery(self): return await self._client_helper.make_request(_ROUTING, "/discovery") async def get_metrics(self): return await self._client_helper.make_request(_ROUTING, "/metrics") async def get_configuration_load(self): return await self._client_helper.make_request(_ROUTING, "/configuration_load") async def healthcheck(self, retries: int, sleep_s: float) -> bool: return await poll_healthcheck( routing=_ROUTING, path="/healthcheck", retries=retries, sleep_s=sleep_s, body_predicate=lambda body: loads(body) == {"status": "OK"}, status_predicate=lambda status: status == 200, )

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/TheLunarCompany/lunar'

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