Skip to main content
Glama

MockLoop MCP Server

Official
by MockLoop
generator.pyโ€ข937 B
from pathlib import Path from jinja2 import Environment, FileSystemLoader, select_autoescape env = Environment( loader=FileSystemLoader("templates"), autoescape=select_autoescape(["html", "xml"]) ) def generate_routes(spec: dict, output_path: str): template = env.get_template("route_template.j2") paths = spec.get("paths", {}) routes_code = "" for path, methods in paths.items(): for method, details in methods.items(): route = template.render( method=method, path=path.replace("{", "{"), summary=details.get("summary", ""), response_body={"message": "mock response"}, ) routes_code += route + "\n" output_file = Path(output_path) output_file.parent.mkdir(parents=True, exist_ok=True) output_file.write_text( f"from fastapi import FastAPI\n\napp = FastAPI()\n\n{routes_code}" )

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/MockLoop/mockloop-mcp'

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