[codex] Add Slack-authenticated MCP tool runners#718
Draft
Zygimantass wants to merge 2 commits into
Draft
Conversation
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.
Summary
This adds a first pass at Centaur MCP + SSO using Slack-issued bearer tokens and principal-scoped persistent tool runners.
api-rs, including protected-resource metadata,tools/list,tools/call, and bearer-token authentication.slackbotv2to issue an MCP token from a DM or bot mention while refusing to print secrets into normal shared-channel messages.values.dev.yaml, because local iron-proxy mode now needs iron-control wiring.ELI10
Centaur now gives a Slack user a special key. When Amp uses that key to call Centaur's MCP server, Centaur can tell whose tools it should use.
The first real tool call starts a small sandbox for that person. That sandbox has the normal Centaur tool shims and its own iron-proxy. Later tool calls from the same person reuse the same sandbox, so we avoid the slow "start a new sandbox every time" path. The tools still do not get raw secrets; the proxy injects only what that principal is allowed to use.
Validation
cargo fmt --checkcargo check -p centaur-api-servercargo test -p centaur-session-runtime persistent_tool_runner_command_preserves_sandbox_entrypoint_for_tool_setupcargo test -p centaur-api-server mcp_cargo test -p centaur-session-sqlx mcp_tokens_have_expected_prefix_and_hash_without_leaking_secretpnpm install --frozen-lockfilepnpm --dir services/slackbotv2 testpnpm --dir services/slackbotv2 check:typesgit diff --cached --checkjust build-one api-rs,just deploy,/healthz, and two proxied MCPslack.list_channelscalls using one local MCP token. Both calls returnedisError:false, and logs showed onepersistent_tool_runner_createdplus one runningcentaur.ai/component=mcp-tool-runnerpod.