Conversation
Design doc for adding MCP-client capability to Bifrost. Filing as docs-only so the discussion has a stable URL. Implementation follows once direction is confirmed by upstream maintainer.
|
Companion feature request: #100 |
|
Edit (cleaning up my stream-of-consciousness reply): Trying to land the actual architectural concern more clearly. This was on my roadmap and I like the data-model approach. Before I green-light, I want to surface a risk that I think is the real blocker, and ask for your take on it. What I think the actual value isReading this back, I don't think the value of this RFC is "MCP-the-protocol" — it's catalog reuse. Mirroring 77 HaloPSA tools as 77 workflows doesn't scale, and an MCP-aware client lets us inherit a vendor's catalog without that toil. That part I want. The risk I keep landing onBifrost integrations are system-first: org-scoped or global, headless agents, scheduled runs, no UI primitive for "your token expired, please re-consent." That model assumes credentials are configured once and refresh in the background. Most useful vendor MCP servers (Slack, GitHub, M365 Admin, Atlassian, Notion) are user-first: per-user OAuth, interactive consent, the protocol leans into elicitation/sampling/etc. Looking at how Copilot Studio, M365 Copilot Chat, Claude.ai, Cursor, and VS Code handle this — there's a remarkably consistent pattern: admin enables the MCP server at the org level, then each user OAuths individually. None of them have a "this tool is interactive-only" flag; tools are uniformly callable and the runtime just 401s if the wrong auth is attached. Headless only works with service-principal/managed-identity credentials. So the architectural question I keep running into: if we build the service-account-only version of MCP-as-client now, how do we extend it to per-user later without a refactor? Specifically:
What I'm askingIf you can sketch even a rough answer to (1) and (2) — or push back on (3) — I'd green-light. The thing I want to avoid is building a system-first MCP client now that we'd architecturally regret when (not if) the per-user MCP requirement shows up. If we agree on the auth-tier model upfront, the implementation can ship in stages. Genuinely want to collaborate — the design itself is solid, I just want to make sure we build it on a foundation that survives the user-auth requirement we're definitely going to face. |
|
Thanks — these are genuinely the right questions and I had to back up and rethink. You're right that lumping MCP into "always service-account" hides a real use case I have on the roadmap. Real forcing example: SpireTech's Tech Support agent needs to combine HaloPSA results (service-account — halopsa-mcp's job) with SharePoint Copilot Graph search results, where Microsoft Graph filters results by the calling user's permissions. Using a service principal there is either useless (no SharePoint membership) or scary (Application permissions that bypass per-document ACLs). The whole point of Copilot search is the personalized result ranking — it needs the calling user's identity. So per-user delegation isn't a v2 nice-to-have; it's required for the integration to be correct. Proposed: admit both auth modes as configuration on the integration, not as separate features:
The four concerns become: 1 & 2 (admin-vs-user, scheduled agents): solved at the integration level. Service-mode tools always work. Per-user-mode tools require user context — 3 (mid-chat re-auth): solvable when Bifrost owns the chat UI. Dispatch returns a structured 4 (philosophical): the SharePoint case is concrete proof that there's value beyond chat. A scheduled-or-chat-driven agent that needs to query M365 (or Salesforce, or any other vendor that ships an MCP server with delegated auth) gets to do it without us reimplementing search-with-permissions ourselves. That's not a "chat-client niche." I'd plan to update the spec PR with this — the Per-user delegation needs to be in v1 in some form (full per-user, service-user fallback, or both — happy to follow your preference on which). Deferring it to v2 would mean the SharePoint integration class can't ship at all, and from what I'm seeing across the vendor MCP ecosystem (M365, Atlassian, Salesforce — all delegated by default) that's a significant chunk of the value. Open to:
Strong preference any direction? |
Design doc for adding MCP-client capability to Bifrost — the symmetric counterpart to the existing
mcp_server/package.Filing as docs-only so the conversation has a stable URL to anchor on. Companion feature issue will be filed referencing this doc.
TL;DR: Reuse
integrations+oauth_providers+configs, add akinddiscriminator and one newexternal_mcp_toolscache table.resolve_agent_tools()gains a fourth source. Two-layer access control: Bifrost grants AND remote scopes.First question in the spec is whether this is already on your roadmap — answer that first if so and I'll align rather than duplicate.
If green-lit I'd build the whole thing as a single feature PR (open question if you'd prefer it split, noted at the end of the spec).