Problem
The server currently only supports stdio transport, which requires a separate process per user and hardcoded credentials at startup. This makes it impossible to deploy a single shared instance that multiple users can connect to with their own Metabase credentials.
Proposed Solution
Add support for HTTP Stream transport (MCP_TRANSPORT=http) where:
- The server starts an HTTP endpoint instead of reading from stdio
- Each request provides Metabase credentials via headers:
x-metabase-url — Metabase instance URL
x-metabase-api-key — API key (or x-metabase-username + x-metabase-password)
- A
MetabaseClient is created per session and attached via FastMCP's authenticate() hook
- All tools resolve the client from the request context via
getClient(ctx)
This enables a single deployed instance to serve multiple teams/users pointing at different Metabase instances — ideal for cloud/SaaS deployments.
Additional
Also includes a legacy sse-server.js wrapper for clients that only support the older SSE transport (spawns stdio processes per connection).
A pull request with a working implementation is available: https://github.com/fjprobos/metabase-mcp-server/pull/new/feat/http-stream-transport-with-per-request-auth
Problem
The server currently only supports
stdiotransport, which requires a separate process per user and hardcoded credentials at startup. This makes it impossible to deploy a single shared instance that multiple users can connect to with their own Metabase credentials.Proposed Solution
Add support for HTTP Stream transport (
MCP_TRANSPORT=http) where:x-metabase-url— Metabase instance URLx-metabase-api-key— API key (orx-metabase-username+x-metabase-password)MetabaseClientis created per session and attached via FastMCP'sauthenticate()hookgetClient(ctx)This enables a single deployed instance to serve multiple teams/users pointing at different Metabase instances — ideal for cloud/SaaS deployments.
Additional
Also includes a legacy
sse-server.jswrapper for clients that only support the older SSE transport (spawns stdio processes per connection).A pull request with a working implementation is available: https://github.com/fjprobos/metabase-mcp-server/pull/new/feat/http-stream-transport-with-per-request-auth