Skip to content

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.

Terminal window
uv add fastmcp-feedback # base
uv add "fastmcp-feedback[instrumentation]" # + DatabaseSink
uv add "fastmcp-feedback[instrumentation,embeddings]" asyncpg # + embeddings on Postgres
InstallAddsCovers
fastmcp-feedbackfastmcp>=2.12.2,<5, sqlalchemy>=2.0.43, pydantic>=2.11.7The five feedback tools (sync SQLAlchemy). instrument(app) with JsonLinesSink, CallbackSink and MemorySink; events; redaction; result classification
[instrumentation]sqlalchemy[asyncio] (brings greenlet), aiosqliteDatabaseSink, 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.0EmbeddingSink, OpenAIEmbedder, similar(), similar_feedback(), the backfill API and CLI
[postgresql]psycopg2-binaryThe feedback tools on PostgreSQL (postgresql:// URLs)
[mysql]pymysqlA driver for the feedback tools on MySQL (mysql+pymysql://); the test suite does not cover MySQL

The instrumentation’s database code is async; the feedback tools’ is sync. They use different drivers and URL schemes:

StoreAsync URL (DatabaseSink, backfill)Sync URL (add_feedback_tools)
SQLitesqlite+aiosqlite:///calls.db (in [instrumentation])sqlite:///feedback.db
PostgreSQLpostgresql+asyncpg://... (add asyncpg)postgresql://... ([postgresql] extra)

pgvector is only needed when embeddings are stored on PostgreSQL. On SQLite, vectors are stored as JSON lists.

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.

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.