Skip to main content
Glama

FastMCP Boilerplate

by rainer85ah
conftest.py760 B
from asyncio import get_event_loop import pytest from httpx import AsyncClient from fastapi.testclient import TestClient from main import app @pytest.fixture(scope="module") async def async_client(): async with AsyncClient(app=app, base_url="http://testserver") as client: yield client @pytest.fixture(scope="module") def event_loop(): loop = get_event_loop() yield loop # Sync test client for synchronous tests @pytest.fixture(scope="module") def test_client(): with TestClient(app) as client: yield client # Async test client for async tests, bind to FastAPI app and base URL @pytest.fixture(scope="module") async def async_client(): async with AsyncClient(base_url="http://0.0.0.0") as client: yield client

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

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