Skip to main content
Glama

FastAPI-MCP

by tadata-org
--- title: Refreshing the Server description: Adding endpoints after MCP server creation icon: arrows-rotate --- If you add endpoints to your FastAPI app after creating the MCP server, you'll need to refresh the server to include them: ```python {9-12, 15} from fastapi import FastAPI from fastapi_mcp import FastApiMCP app = FastAPI() mcp = FastApiMCP(app) mcp.mount() # Add new endpoints after MCP server creation @app.get("/new/endpoint/", operation_id="new_endpoint") async def new_endpoint(): return {"message": "Hello, world!"} # Refresh the MCP server to include the new endpoint mcp.setup_server() ```

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/tadata-org/fastapi_mcp'

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