Repository navigation
Admin tools through the MCP - #3
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s admin Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What this does
Admins can manage the memory from any Claude session, using only their own MCP token. The only shell step left is creating the database once. After that, an admin can onboard a new member (create the member, grant scopes, issue a token) or offboard one, just by asking Claude.
Design: docs/superpowers/specs/2026-11-07-mcp-admin-design.md. Plan: docs/superpowers/plans/2026-11-07-mcp-admin.md.
Rules
admin_tools: list, create and delete scopes; list, create and deactivate members; list grants, grant and revoke; issue, list and revoke tokens. Everyone else, including the bot, sees the same 11 tools as before.admin.ts set-admin,reactivate).admin.ts admin-log.How it is enforced
The rules live once, in Postgres.
adm_*functions do each action and write the log. The shell admin script calls these.admin_*SECURITY DEFINER wrappers check the caller is an active admin and apply the other-admin and self rules before callingadm_*.Also
setup.tsmakes its human member the first admin. Existing installs runadmin.ts set-admin <member> ononce.set-admin,deactivate,reactivate,delete-scope,admin-log,list-members.smoke.tsaccepts admin tokens.admin_tools.Migration
20261107150000_admin.sqladds two columns tomembers(is_admindefault false;deactivated_atnull), adds theadmin_logtable, and creates functions. It drops, truncates and rewrites nothing.Testing
Left for later (shell-only edge cases; each needs a new migration): refuse
set-admin onfor a deactivated member, and recordwas_adminin the deactivation log.🤖 Generated with Claude Code