Skip to content

feat(agent): add an app catalog with browser sign-in to Integrations - #1447

Merged
AnthonyRonning merged 2 commits into
masterfrom
codex-mcpauth-maple
Nov 5, 2026
Merged

AnthonyRonning merged 2 commits into
masterfrom
codex-mcpauth-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Settings > Integrations now has three parts: the built-in integrations, the servers you connected, and a searchable catalog of 23 remote apps with their official logos. An app in the catalog is a data entry in catalog.json, so adding one needs no Rust. Vana can join later the same way.

This is not only a UI change. Master can only reach a remote server with a pasted token, so this PR also adds browser sign-in and the stateless MCP revision.

What changed

  • Catalog: 23 well-known apps across personal, team, business and developer use. Google and Microsoft are left out for now. Anything that needs a local CLI is left out too.
  • Browser sign-in: OAuth with Dynamic Client Registration, PKCE and a loopback redirect. This takes over the OAuth code from feat(agent): connect Vana through native local MCP OAuth #1313 and removes its Vana-only limit.
  • Token apps: GitHub has no self-serve sign-in, so it opens a filled-in form with a masked token field and a "Get a token" link.
  • MCP 2026-07-28: HTTP servers use the stateless revision and fall back to the initialize handshake for older servers. Stdio is unchanged.
  • Store: migration 5 adds mcp_oauth_credentials, with GC and integrity coverage.

Behavior to review

  • Migration 5 is one-way. A store that has opened with this build cannot be opened by an older one.
  • Saved sign-ins pin their endpoints. Maple does not re-read metadata when it connects, because a server could otherwise redirect a refresh token by changing what it advertises. If a vendor moves its endpoints, the person signs in again.
  • Sign-in confirms the issuer. rmcp only checks an issuer when it found the metadata at that issuer's own address. Maple now reads the issuer's own document and requires the endpoints to match. All 22 OAuth apps in the catalog pass this against live metadata.
  • Tokens are stored like Maple's other credentials. Release builds use plain SQLite, protected by OS file permissions. Maple Work has no filesystem sandbox and no per-call approval, so a prompt-injected agent could read them. This PR does not change that, but connected apps raise what is at stake.
  • New connections start on, and tools run without per-call approval. A new task can use a connected app right away, including its write tools. Someone can turn an app off, and signing in again keeps it off.
  • Closing Settings cancels a sign-in in progress and closes its callback listener.
  • Connecting no longer uses an alert. The button shows a spinner with Cancel, and the custom server form shows a spinner with Stop signing in. A failed sign-in shows as a line on the card or form that started it.
  • The browser lands on Maple's branded page. The template moved to the maple-agent crate so both sign-in flows share it. It says Maple Work is finishing the connection, because the code has not been redeemed at that point.
  • Some hand-written HTTP servers stop connecting. The first request is now server/discover. A server that answers it with a JSON-RPC error or a 4xx falls back to initialize, including the session errors SDK-built servers typically send. A server that answers it with a 5xx, a non-MCP 200, an empty 202 or 204, or nothing does not. Those worked on master. This was accepted for now because custom servers are experimental.
  • HTTP servers no longer receive the task's folder, including HTTP servers on this computer. Stdio servers still do.
  • A rejected token only reaches the log. The task carries on, and the chat does not say the app failed to connect. Worth a follow-up.
  • Vercel's page says "An MCP client". Maple registers as Maple, and a test asserts that, so the wording appears to come from Vercel. Other vendors may show a different name.
  • Logos come from each vendor's site or verified GitHub organization, listed in app/assets/icons/apps/SOURCES.md. Vendor brand terms were not reviewed.

Dependencies

rmcp moves to =3.8.0 with its auth feature, plus sse-stream =0.2.6. The lockfile adds oauth2 5.0.0, which is well past the seven-day cooldown.

Validation

Run on macOS on the final code, without the workspace env sourced.

Check Result
just ci-lint Passed
cargo test --workspace --no-fail-fast 2,588 passed, 1 failed
just ci-extra 359 passed before the rebase onto #1449 and the connect changes
scripts/audit-sqlcipher-dependencies.py Advisories and bans OK
just lane repo Passed before the final security fixes
just supply-chain Fails at SQLCipher's mkkeywordhash link on this Mac, also without this branch. agent-supply-chain passed in CI
  • The one failure is reads_native_release_tar_format_and_preserves_bundle_modes, in untouched updater code. It fails on this Mac because of bsdtar.
  • That failure is why the commits used MAPLE_HOOK_SKIP=1. The checks above were run separately.
  • queued_updates_reach_the_host_store_without_sidecar_files failed once in a filtered parallel run. It is untouched by this PR, and passed 5 of 5 alone and in the full run.

Real app, against a local fake OAuth app: registration, PKCE, a client secret, stateless calls, restart, a 401, a refresh with the saved secret, then a real model tool call. This run came before the endpoint pinning, which automated tests cover through the same sign-in and refresh code.

Real account, Notion: a person signed in through Connect. An agent then read a private page and created a new one through Notion's tools.

Real app, other checks:

  • All 23 logos in light and dark.
  • A typed test token stayed masked, reached a local server as the Authorization header, and stayed out of the logs.
  • Connect on Vercel went through live registration and the issuer check, then opened Vercel's real sign-in page. No account was signed in.
  • Pressing Back during that sign-in closed the callback listener at once, and a late request to its port was refused. Settings reopened clean, and a second sign-in started normally.
  • Cancel did the same on the second sign-in.
  • Removing a connected app deleted its saved sign-in. The refresh token no longer appears in the database, its WAL or the log.
  • On the final build: the spinner replaced the alert, a full sign-in against the local fake app saved it as on, and Chrome rendered the branded page with its security policy and no code in the address bar. A failed sign-in showed inline.

Custom servers on the final code:

  • A new older-style HTTP server with a saved header and a new stdio server, saved through the same host call as the form, both answered tool calls in a task with a scripted model.
  • A real SDK-built stdio server listed 62 tools, and a public HTTP server listed its tools and answered a tool call.
  • A stdio server saved in a version 4 store came through migration unchanged.
  • Stdio still opens with initialize at 2025-11-25, the same version as master.
  • The form itself was not clicked for this check because the Mac was locked.

Regression tests: both new sign-in security tests fail with their fix removed.

CI at ca44864d: agent-lint, agent-test (Ubuntu), agent-macos, agent-windows, agent-windows-updater, agent-provider, agent-supply-chain and ci-ok passed. Package lanes did not run.

Not proven

  • No real GitHub token has been used.
  • No token refresh has run against a real vendor. Notion's access token lasts 8 hours.

🤖 Generated with Claude Code

Settings > Integrations keeps the built-in integrations first, then the
servers you connected, then a searchable catalog of 23 remote apps, each
with its logo. A catalog app is a data entry, so adding one needs no Rust.

Most apps connect through OAuth in the browser, using Dynamic Client
Registration, PKCE and a loopback redirect. Credentials live in the local
store. GitHub takes a personal access token in a masked field, because it
has no self-serve sign-in.

A sign-in saves the endpoints it used, so a refresh token only ever goes
where the person signed in, and a server cannot redirect it later by
changing what it advertises. Each sign-in also confirms the issuer itself
publishes those endpoints.

HTTP servers now speak the stateless 2026-07-28 revision and fall back to
the initialize handshake for older servers. Store migration 5 is one-way.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A new browser sign-in now starts on, like every other new connection.
Signing in again keeps an app off if someone turned it off.

Connecting shows a spinner in the button instead of an alert, with
Cancel beside it. The custom server form gets the same state, because
the alert was its only way to stop a sign-in. Failures show as a line on
the card or form that started them.

The browser now lands on the same branded page as Maple Work's own
sign-in. The template moves to the maple-agent crate so both flows share
it, with a test that its security hashes match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AnthonyRonning
AnthonyRonning merged commit a900747 into master Nov 5, 2026
26 checks passed
@AnthonyRonning
AnthonyRonning deleted the codex-mcpauth-maple branch November 5, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant