We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/refreshdotdev/web-eval-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
api_utils.py•733 B
#!/usr/bin/env python3
import httpx
from .env_utils import get_backend_url
async def validate_api_key(api_key: str) -> bool:
"""
Validate the API key against the Operative backend service.
Args:
api_key: The API key to validate
Returns:
bool: True if the API key is valid, False otherwise
"""
try:
async with httpx.AsyncClient() as client:
response = await client.get(
get_backend_url("api/validate-key"),
headers={
"x-operative-api-key": api_key
}
)
result = response.json()
return result.get("valid", False)
except Exception:
return False