Skip to main content
Glama

Model Context Protocol Server

test_mcp.py927 B
from fastapi.testclient import TestClient from main import app client = TestClient(app) def test_health_check(): response = client.get("/health") assert response.status_code == 200 data = response.json() assert data["status"] == "healthy" assert "providers" in data def test_list_models(): response = client.get("/models") assert response.status_code == 200 models = response.json() assert isinstance(models, list) assert len(models) > 0 assert all("name" in model and "description" in model for model in models) def test_get_context(): response = client.post( "/context", json={ "query": "Tell me about iPhone 15", "model": "llama2" } ) assert response.status_code == 200 data = response.json() assert "context" in data assert "metadata" in data assert "analysis" in data assert "response" in data

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/Shekharmaheswari85/MCP'

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