Repository navigation
Description
Problem
Developers use several agent harnesses side by side (Claude Code, Codex, opencode, ...). Each one keeps its own list of MCP servers, and for every remote server that needs OAuth each one runs its own login and holds its own tokens. Adding a server or logging in again means doing it once per harness, and the lists drift apart. Servers that act for a concrete user (an issue tracker, for example) cannot be shared any other way.
devstack mcp is already registered in each of these harnesses.
Idea
devstack mcp exposes, next to its own tools, the tools of upstream MCP servers the user configured. The hub owns the connections to the upstreams and their tokens. One login per upstream, the same tools in every harness.
Why the hub (ADR-0021)
- It runs per user, across all stacks, from logon, on a fixed loopback port, and without a stack. A stack's daemon is the wrong owner: it exists per stack.
- One owner for the tokens. Every harness starts its own
devstack mcp. Several processes refreshing at the same time invalidate each other when the upstream rotates refresh tokens. - It already serves HTTP on loopback: the natural redirect target for the OAuth browser flow, and its dashboard is the place to add upstreams and log in or out.
Auth model
- The hub is an OAuth client of each upstream, per user (authorization code + PKCE, dynamic client registration where the upstream offers it). Tokens live in the OS keychain.
- No token passthrough (MCP security best practices): a token a harness holds is never sent upstream, and an upstream token never leaves the hub.
- Holding the tokens locally, per user, is the same thing every harness does today, done once. A central gateway on a server would hold every user's tokens in one place; that is out of scope here.
- Upstreams with a static bearer token: the secret comes from the keychain or the environment, never from a config file.
Scope
In:
- Upstreams over stdio and Streamable HTTP.
- Per-user OAuth as above.
- A prefix and a tool allowlist per upstream (shorter tool lists make agents better, and names collide).
- The stack and lane context as a header to an upstream, opt-in per upstream.
- An upstream that is down or logged out does not take devstack's own tools with it.
devstack mcp --proxy-only: works without a stack file, so a desktop app or a session outside any repository can use it as a plain stdio server.
Out: a registry or marketplace, a policy engine, caching, rewriting content, a gateway on a server for many users.
Configuration
- User level (hub settings): the base, works without a pool.
- Pool profile, optional: the pool hands upstream definitions to its members, administered in the pool's dashboard (ADR-0032). Never secrets; every member logs in for themselves.
- Stack file: at most non-secret declarations of upstreams the project suggests. The stack file is shared with everyone who has the repository.
Open questions (for an ADR)
- Precedence between user and pool settings; may a user switch off an upstream the pool hands out?
- Pool membership as identity: an upstream that trusts the pool CA could accept the member's client certificate, so removing a member also revokes access there. Worth it, or too much coupling?
- What a harness sees for an upstream that is logged out: tools hidden, or listed and failing with "log in from the dashboard"? Use of
notifications/tools/list_changed. - Hub not running: does
devstack mcpstart it, or offer only its own tools? - Headless machines and CI: no browser for the OAuth flow.
Prior art: MCPJungle (self-hosted MCP gateway, central, no OAuth).
Activity
docs(adr): ADR-0069 devstack mcp can carry the tools of upstream MCP …
docs(adr): ADR-0069 proposed: a proxy in the hub, configured per user (…
7schmiede commentedon Oct 27, 2026
Review card: ADR-0069 as built (upstream login, proxy, dashboard)
ADR-0069 was proposed before ADR-0070; per ADR-0070 point 7 its card-category points are reviewed here, before the code that depends on them. Already merged: the secrets store (#325). The rest comes in three pull requests: (a) upstream configuration, OAuth login and the dashboard section, (b) the hub's loopback API and
devstack mcplisting and forwarding, (c) stdio upstreams.state, ten minutes), tokens kept only in the secrets store of #325. If wrong: a forged callback ties the user's hub to an attacker's upstream account, and whoever reads the store acts on every upstream as the user.devstack mcpreaches upstream tools only through a loopback API of the hub behind the user token (ADR-0019) that lists tools and forwards calls; no route ever returns a token. If wrong: any process of the user that reads the user token calls every upstream tool as the user, the reach it has today over the harnesses' own token files, now in one place.devstack mcp(token passthrough)upstreams.tomlin the hub's state directory (name, URL or command, prefix, tool allowlist, auth kind), with no secret in it.<prefix>__<tool>beside devstack's own, unprefixed; a logged-out or unreachable upstream keeps its tools listed, and they answer with an error that names the dashboard.devstack mcpstarts the hub when it is not running, asdevstack uidoes; withDEVSTACK_NO_HUBit does not, and only upstreams with a static token from the environment work.devstack mcpwithout upstreams until the user starts the hubDecided by the agent: the crates (
oauth25, MIT OR Apache-2.0, for the flow; the MCP client written against the protocol rather than a framework crate), dynamic client registration where an upstream offers it and a client id the user enters where not, refreshing a token before it expires and once on a401, the timeouts, error texts and the layout of the dashboard section, the order of the three pull requests.Approved by the owner: 2026-10-27, points 1–7.
feat(hub): MCP upstreams, configured once per user and logged in by t…
feat(mcp): devstack mcp offers the MCP upstreams' tools, called throu…
feat(hub): an MCP upstream can be a command the hub starts (stdio, AD…
7schmiede commentedon Oct 27, 2026
Built in #325 (secrets store), #329 (configuration, OAuth login, dashboard page), #332 (devstack mcp offers and forwards upstream tools through the hub) and #333 (stdio upstreams), on the approved review card above. ADR-0069 notes the paths as built. Not yet tried against a real upstream.