Skip to main content
Glama
hsiangjenli
by hsiangjenli
main.py557 B
from fastapi import FastAPI from fastmcp import FastMCP from mcp_tools.schemas import NewEndpointRequest, NewEndpointResponse app = FastAPI( title="Python MCP Template", description="A template for creating MCP-compliant FastAPI services.", version="0.1.0", ) @app.post( "/new/endpoint/", operation_id="new_endpoint", response_model=NewEndpointResponse ) async def new_endpoint(request: NewEndpointRequest): return {"message": f"Hello, {request.name}!"} mcp = FastMCP.from_fastapi(app=app) if __name__ == "__main__": mcp.run()

Implementation Reference

Latest Blog Posts

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/hsiangjenli/mcp-slidev'

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