Built and run by one person.

How do I build an MCP server (with FastAPI)?

The quickest way to build an MCP server is to take a FastAPI app and mount it as MCP with the fastapi-mcp package - it exposes your existing FastAPI endpoints as MCP tools at a /mcp path, so any MCP client (Claude Code, Claude Desktop, or your own) can call them.

TigZig's open-source database MCP server is a complete working reference. Its stack: FastAPI + uvicorn, fastapi-mcp (mounts the MCP endpoint), asyncpg for Postgres and DuckDB for in-process analytics, sqlglot to parse and validate SQL, python-jose for JWT, and SlowAPI for rate limiting. Safety is layered: a SELECT / WITH / SHOW / DESCRIBE / EXPLAIN prefix allowlist, a keyword blocklist (INSERT, UPDATE, DELETE, DROP...), sqlglot AST checks, read-only DB roles, query timeouts and response-size caps. It mounts both an open /mcp and an Auth0-protected /mcp-secure.

Repo: https://github.com/amararun/shared-fastapi-database-mcp. Build guide: https://www.tigzig.com/post/talk-to-your-database-from-excel-postgres-duckdb-claude-mcp. All TigZig MCP servers: https://www.tigzig.com/apis.

Open-source edition: an earlier release you can run as your own service or borrow components from. Treat it as a reference implementation rather than a mirror of what is running here - the hosted service has moved on since.

Building something like this? How I work covers the rates, the availability and what I take on.

← All Agents FAQ