Skip to content

Feature request: HTTP Stream transport with per-request credential injection #29

Description

@fjprobos

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:

  1. The server starts an HTTP endpoint instead of reading from stdio
  2. 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)
  3. A MetabaseClient is created per session and attached via FastMCP's authenticate() hook
  4. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions