Ray's Knowledge Base
Unlock

Bifrost per-user OAuth for a remote MCP server (Linear): the admin sign-in, the per-key sign-in and the gate

RecipeVerified 26 Oct 2026Holds bifrost: 2.3.0:2.3.2
Recipe. When to use it, the steps, and what showed that they work.

When to use#

One Bifrost serves several people, and each must use her own account on a remote MCP server such as https://mcp.linear.app/mcp.

Steps#

  1. Declare the client with auth_type: "per_user_oauth" and no oauth_config. Linear accepts dynamic client registration, so it needs no app (scope read write).
  2. Set client.mcp_external_client_url to the public Bifrost address (the OAuth redirect_uri is that plus /api/oauth/callback) and client.mcp_enable_temp_token_auth: true.
  3. Dashboard, MCP Gateway, the row's ..., Authorize. Give the link to the person whose account may refresh the tool list. Her token is stored as the admin credential (mcp_oauth_tokens.auth_mode = admin). It is not used for agent calls.
  4. Each virtual key needs its own sign-in. The agent's first call returns mcp_auth_required with a link. The person opens it, signs in and asks again.
  5. Tool names are linear-<verb>_<thing> (69 tools, 4 delete_*). Read them from discovered_tools_json in config_mcp_clients (config.db).

Evidence#

Ran on a live Bifrost 2.3.2 behind Authelia and Caddy. The callback arrived (GET /api/oauth/callback ... 302) and the token row was admin|active. The agent call then created a mcp_oauth_flows row with flow_mode: vk and the key's id. So a header Authorization: Bearer ${BIFROST_API_KEY} in Hermes mcp_servers expands from .env. A person who is not a Bifrost admin sees the message "We can't reach the dashboard" on the landing page after the callback when the gate blocks /api/config. That is cosmetic, because the token is stored.

Also found by searching

  • bifrost per_user_oauth first sign-in admin credential
  • bifrost mcp auth required link open this link and sign in
  • we cannot reach the dashboard after bifrost oauth callback
  • bifrost mcp remote server each person own account