Skip to main content
Glama

FastMCP Boilerplate

by rainer85ah
github_fetcher.py682 B
import httpx from utils.retries import http_retry from utils.logger_config import configure_logger logger = configure_logger("GitHubFetcher") class GitHubFetcher: BASE_URL = "https://api.github.com" def __init__(self, token: str = None): self.headers = {"Authorization": f"token {token}"} if token else {} @http_retry() async def get_repo_contents(self, owner: str, repo: str, path: str = "") -> list: url = f"{self.BASE_URL}/repos/{owner}/{repo}/contents/{path}" async with httpx.AsyncClient() as client: resp = await client.get(url, headers=self.headers) resp.raise_for_status() return resp.json()

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