Installation and extras
The package is fastmcp-feedback on PyPI.
It needs Python 3.11 or newer and FastMCP 2.12.2 or newer, below 5.
uv add fastmcp-feedback # baseuv add "fastmcp-feedback[instrumentation]" # + DatabaseSinkuv add "fastmcp-feedback[instrumentation,embeddings]" asyncpg # + embeddings on PostgresWhat each install covers
Section titled “What each install covers”| Install | Adds | Covers |
|---|---|---|
fastmcp-feedback | fastmcp>=2.12.2,<5, sqlalchemy>=2.0.43, pydantic>=2.11.7 | The five feedback tools (sync SQLAlchemy). instrument(app) with JsonLinesSink, CallbackSink and MemorySink; events; redaction; result classification |
[instrumentation] | sqlalchemy[asyncio] (brings greenlet), aiosqlite | DatabaseSink, build_metadata, feedback linking across workers and restarts (capture_recent_calls, link_feedback, feedback_context), events_for from the database |
[instrumentation,embeddings] | pgvector>=0.5.0 | EmbeddingSink, OpenAIEmbedder, similar(), similar_feedback(), the backfill API and CLI |
[postgresql] | psycopg2-binary | The feedback tools on PostgreSQL (postgresql:// URLs) |
[mysql] | pymysql | A driver for the feedback tools on MySQL (mysql+pymysql://); the test suite does not cover MySQL |
Drivers
Section titled “Drivers”The instrumentation’s database code is async; the feedback tools’ is sync. They use different drivers and URL schemes:
| Store | Async URL (DatabaseSink, backfill) | Sync URL (add_feedback_tools) |
|---|---|---|
| SQLite | sqlite+aiosqlite:///calls.db (in [instrumentation]) | sqlite:///feedback.db |
| PostgreSQL | postgresql+asyncpg://... (add asyncpg) | postgresql://... ([postgresql] extra) |
pgvector is only needed when embeddings are stored on PostgreSQL. On SQLite,
vectors are stored as JSON lists.
Missing extras
Section titled “Missing extras”Without the instrumentation extra, importing DatabaseSink (or any other
name that needs the async database stack) raises an ImportError that names
the missing package and the extra to install:
ImportError: fastmcp_feedback.instrumentation.DatabaseSink needs the async database stack, and greenlet is not installed. Install it with: uv add "fastmcp-feedback[instrumentation]" (or pip install "fastmcp-feedback[instrumentation]")The middleware’s database helpers (capture_recent_calls, feedback_context,
events_for, similar, …) then return their empty results instead of
raising.
Versions
Section titled “Versions”Releases use calendar versioning, YYYY.MM.DD, with .1, .2 for further
releases the same day. PyPI normalizes leading zeros, so 2026.10.01.2 and
2026.10.1.2 are the same version. Changes are listed in the
changelog.