Agentor enables you to build a custom MCP Server as a FastAPI app. You can integrate it with your existing FastAPI app or deploy it as a standalone MCP Server.

LiteMCP - Lightweight MCP Server
To build MCP Servers withAgentor, you can use the LiteMCP class.
LiteMCP vs FastMCP
LiteMCP has a more transparent design and FastAPI primitives such as middlewares and dependency injection are immediately available, while FastMCP requires mounting as a sub-application, diverging from standard FastAPI primitives.| Feature | LiteMCP | FastMCP |
|---|---|---|
| Integration Pattern | Native ASGI app | Requires mounting |
| FastAPI Primitives | β Standard patterns | β οΈ Diverges (sub-app) |
| With Existing Backend | β Easy | β οΈ Complex |
| Decorator API | β Yes | β Yes |
| Custom Methods | β Full support | β οΈ Limited |
| Lightweight | β Minimal deps | β οΈ More deps |
Connecting MCP endpoint to existing FastAPI app
Using FastMCPUsing LiteMCP
When to Use Each
Use LiteMCP when:- You want to serve MCP tools alongside your existing FastAPI/Starlette backend
- You prefer standard FastAPI patterns and routing
- You want full control over custom JSON-RPC methods
- You want minimal dependencies
- Youβre building a standalone MCP server
- You want the official SDK implementation
- You donβt need to integrate with existing web services