Skip to content

Releases: ftnext/fastapi-webmcp

Release list

0.3.0

Choose a tag to compare

@ftnext ftnext released this 02 Sep 13:33

Start llm-gemini-youtube project! 🎉

Features

fastapi-webmcp exposes selected FastAPI endpoints as in-page WebMCP browser tools. Tool definitions and input schemas are generated from FastAPI's OpenAPI document, so no separate MCP server is required.

@app.get("/books", operation_id="list_books")
@webmcp_tool(read_only=True, description="List books in the catalog.")
async def list_books(
    query: Annotated[str | None, Query(description="Optional title search")] = None,
):
    ...


FastAPIWebMCP(app).mount(page="/agent")

Opening /agent in a WebMCP-capable browser registers the decorated endpoints as tools. Undecorated routes are not exposed.

The included book application demonstrates:

  • exposing GET and POST endpoints with @webmcp_tool
  • generating tool inputs from query, path, and request-body parameters
  • marking read-only operations
  • mounting a small framework-free WebMCP page

Try it:

uv add fastapi-webmcp
uv run uvicorn examples.basic:app --reload

See the complete example in examples/basic.py.

This release also supports dynamic manifests using FastAPI dependencies and authorization, plus static and client-side tools for integration with custom frontends.

Full Changelog: https://github.com/ftnext/fastapi-webmcp/commits/0.3.0