fleet-memory/hindsight-api/hindsight_api
Anton Evseev 0da77ce2c9
feat(mcp): add Bearer token authentication and tenant auth propagation (#241)
* feat(mcp): add Bearer token authentication support

Add HINDSIGHT_API_MCP_AUTH_TOKEN environment variable to enable
authentication for MCP endpoint. When set, all requests must include
a valid Authorization header (Bearer token or direct token).

If not set, MCP endpoint remains open for backwards compatibility
with local development environments.

* fix: propagate Bearer token from MCP middleware to tools for tenant auth

MCP tools were creating RequestContext() without api_key, causing
"Invalid API key" errors when tenant extension validates requests.
Now the Bearer token is extracted in middleware, stored in a context
variable, and passed through to all MCP tool RequestContext instances.
2026-01-30 09:08:18 +01:00
..
admin feat: new 'worker' service (#176) 2026-01-20 10:17:56 +01:00
alembic fix: misc fixes for observations and mental models (#209) 2026-01-27 15:37:57 +01:00
api feat(mcp): add Bearer token authentication and tenant auth propagation (#241) 2026-01-30 09:08:18 +01:00
engine fix(auth): skip tenant auth for all internal background tasks (#240) 2026-01-30 09:07:23 +01:00
extensions feat: support different default pg schema (#222) 2026-01-28 18:14:44 +01:00
worker fix: run migrations on tenant schemas at startup and harden worker poller (#237) 2026-01-29 15:03:20 -05:00
__init__.py Release v0.4.2 2026-01-29 17:54:19 +01:00
banner.py fix: doc build and lint files (#34) 2025-12-16 13:49:09 +01:00
config.py feat: support vertex as llm provider (#233) 2026-01-29 16:13:57 -05:00
daemon.py fix: hindsight-embed on macos crashes (#228) 2026-01-29 16:57:51 +01:00
main.py feat: support vertex as llm provider (#233) 2026-01-29 16:13:57 -05:00
mcp_local.py feat(mcp): add timestamp to retain (#190) 2026-01-23 16:00:43 +01:00
mcp_tools.py feat(mcp): add Bearer token authentication and tenant auth propagation (#241) 2026-01-30 09:08:18 +01:00
metrics.py feat: add tenant to metrics labels (#151) 2026-01-13 15:31:58 +01:00
migrations.py fix: batch queries on recall (#149) 2026-01-13 13:20:22 +01:00
models.py chore: drop unused access_count column (#178) 2026-01-20 10:36:02 +01:00
pg0.py feat: support vertex as llm provider (#233) 2026-01-29 16:13:57 -05:00
server.py Fix: Load extensions in server.py for multi-worker deployments (#155) 2026-01-13 17:55:33 +01:00