Skip to main content
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

LiteMCP - Lightweight MCP Server

To build MCP Servers with Agentor, 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.

Connecting MCP endpoint to existing FastAPI app

Using FastMCP
Using 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
Use FastMCP when:
  • You’re building a standalone MCP server
  • You want the official SDK implementation
  • You don’t need to integrate with existing web services

Configuration

Constructor Parameters

Decorators

@app.tool()

Register a tool that can be called by MCP clients:

@app.prompt()

Register a prompt template:

@app.resource()

Register a resource that can be read by MCP clients:
Last modified on May 5, 2026