Repository navigation
0.2.0: an MCP address per agent, each signing in through its own Discord application - #2
Merged
Merged
Conversation
Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Each agent names the broker that signs its users in; the core forwards GET /signin/client and POST /signin to that broker's Feed. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
Each agent is its own OAuth protected resource at /<agent>/mcp. The consent page names the mailbox from the request's resource instead of asking. Discord sign-in (client ID and code exchange) goes through mailroom-core to the agent's own broker, so the door loses its SIGNIN binding. The agent list is cached for 60 seconds and refetched when a request names an unknown agent. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
The door logged only the status, so the generic page pointed at logs that did not hold the reason. Log the core's error text as message (never on a page), point the page at the door's logs, and correct the README row. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
An authorize request naming an agent the cache has not seen refetches the list once. /mcp/mcp reaches an agent named mcp. README: invalid_target row, exact address, rollback to 0.1.0. Co-Authored-By: Claude & Lothrop (cycle.five@proton.me)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Mailroom serves a list of agents: two today, many more later. In 0.1.0 there was one MCP address with a mailbox picker, and every sign-in went through one Discord application. So an agent's connector signed in through another agent's application, and every connection depended on a person picking the right mailbox.
Design:
docs/superpowers/specs/2026-11-18-per-agent-signin-design.md. Plan:docs/superpowers/plans/2026-11-18-per-agent-signin.md.What changes
PUBLIC_URL/<agent>/mcp. Each is its own OAuth protected resource, so a token for one agent is refused at another agent's address. The old/mcpanswers 404 with a line saying where mailboxes live.signinbroker. The core gains two internal routes (GET /signin/client?agent=,POST /signin) that forward to that broker'sFeed. The door no longer has a broker binding.resourceparameter. A client that sends none gets a list of mailboxes; that is the only place a picker remains.Breaking
MAILROOMneeds"signin": "<BROKER_BINDING>".SIGNINservice binding is gone./<agent>/mcp; each agent's Discord application lists the redirectPUBLIC_URL/callback.Verification
cargo fmt --check,cargo clippy --workspace --all-targets -- -D warnings,cargo test --workspace(105 tests)door:npm run typecheck,npm test(34 tests, the real OAuth library against an in-memory KV: per-agent metadata, cross-agent token refused, the flow with and withoutresource, unknown and foreign resources refused, a removed agent answering 404, sign-in failures leaving no grant)crates/worker/smoke/run.sh: the wasm build under workerd, now also covering the sign-in routes🤖 Generated with Claude Code
https://claude.ai/code/session_017zqkEBoTfRovHZ26Cjjc91