Skip to main content
Glama

anthropic-admin-mcp

The MCP server Anthropic hasn't shipped yet — full coverage of the Anthropic Admin API and the Usage & Cost API, properly typed, properly tooled, and properly safety-scoped.

Manage your Anthropic organization from any MCP-compatible client (Claude Desktop, Cursor, Windsurf, ChatGPT, etc.) using natural language:

  • "What did my organization spend last week, grouped by workspace?"

  • "Which API key burned through the most Opus tokens yesterday?"

  • "Show me Pre-Mortem's usage day-by-day for the last 14 days."

  • "Invite contractor@example.com as a developer to the Sandbox workspace."

  • "Deactivate the API key named 'old-laptop'."

10 read tools, 10 write tools, audit logging, optional workspace scoping, read-only mode, role-escalation guard.

Why this exists

Anthropic ships an excellent Admin API with ~22 endpoints across organization management, workspaces, members, API keys, usage reporting, and cost reporting. Existing MCP wrappers from third parties cover a tiny slice of it through commercial integration platforms. This server is native, free, open-source, and complete — installable in two minutes against your own Admin key.

Related MCP server: Pankow MCP

Install

pip install git+https://github.com/Trushtonfactory/anthropic-admin-mcp.git

Or for local development:

git clone https://github.com/Trushtonfactory/anthropic-admin-mcp.git
cd anthropic-admin-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -e .

Configure

  1. Get an Admin API key at console.anthropic.com → Settings → Admin Keys. Requires an Organization plan (Team / Pro+ / Enterprise) and the admin role. Individual accounts cannot create Admin keys.

  2. Copy .env.example to .env and fill in your key:

    cp .env.example .env
    # edit .env: ANTHROPIC_ADMIN_KEY=sk-ant-admin-...
  3. Wire it into your MCP client. For Claude Desktop, add to ~/Library/Application Support/Claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "anthropic-admin": {
          "command": "anthropic-admin-mcp",
          "env": {
            "ANTHROPIC_ADMIN_KEY": "sk-ant-admin-..."
          }
        }
      }
    }

    See examples/claude_desktop_config.json for more options (read-only mode, workspace scoping).

Tools

Read (10)

Tool

Purpose

get_org_info

Smoke-test the key; return org id + name

list_members

List org members and roles

list_invites

List pending and historical invites

list_workspaces

List active (and optionally archived) workspaces

get_workspace

Resolve a workspace ID to its full record

list_workspace_members

List members of a specific workspace

list_api_keys

List keys with filters by status / workspace

get_usage_report

Token usage, grouped by workspace/api_key/model/etc.

get_cost_report

Dollar costs, grouped by workspace / description

get_claude_code_usage

Claude Code-specific usage data

Write (10) — all require confirm=True

Tool

Action

invite_member

Send an invite (cannot grant admin)

delete_invite

Cancel a pending invite

update_member_role

Change a member's org role (cannot touch admin)

remove_member

Remove a non-admin member

create_workspace

Create a new workspace

update_workspace

Rename or recolor a workspace

archive_workspace

Archive a workspace

add_workspace_member

Grant workspace access

update_workspace_member_role

Change a workspace role

remove_workspace_member

Revoke workspace access

update_api_key

Rename or deactivate an API key

Running

# Full mode (read + write), stdio transport
anthropic-admin-mcp

# Read-only — recommended for first-time setup
anthropic-admin-mcp --read-only

# Streamable HTTP (for remote MCP clients)
anthropic-admin-mcp --http --port 8000

# Restrict writes to specific workspaces (set in .env or shell)
ALLOWED_WORKSPACES=wrkspc_abc,wrkspc_xyz anthropic-admin-mcp

Safety

See SECURITY.md for the full threat model and design notes. The short version:

  • Reads are open. Anything the Admin API exposes with your key, this server exposes.

  • Writes are guarded. Every mutation requires confirm=True, gets audit-logged to JSONL, and respects optional workspace scoping.

  • Role escalation is blocked client-side even though the API itself blocks it server-side — clearer error messages for Claude.

  • No credential exfiltration paths. The Admin API never returns key values, and this server never logs the Admin key itself.

Status

v0.1.0 — read + write tool surface complete. Pagination, error messages, and audit logging tested manually. No usage limits implemented yet. Pydantic response models are minimal (tools return raw dicts).

Issues and PRs welcome.

License

MIT — see LICENSE.

Available Tools

21 tools
add_workspace_memberA

Grant a user access to a workspace.

Org admins and org billing members get automatic workspace roles and don't need to be added explicitly. workspace_billing is inherited from org-level billing role and cannot be assigned here.

Inputs: workspace_id (required), user_id (required), workspace_role (required), confirm. Returns: object

archive_workspaceA

Archive a workspace.

Archived workspaces are hidden from default listings but their data (usage history, costs) is preserved. API keys in the workspace become inactive. Per Anthropic docs this state is reversible through the Console.

Inputs: workspace_id (required), confirm. Returns: object

create_workspaceA

Create a new workspace.

Workspaces partition API keys, members, and limits. Max 100 active workspaces per organization. Creating a workspace does not add any members or keys to it automatically.

Inputs: name (required), confirm. Returns: object

delete_inviteA

Cancel a pending invite.

Once deleted, the invite link will no longer work. The invitee will not be notified. Re-inviting requires a new invite call.

Inputs: invite_id (required), confirm. Returns: object

get_claude_code_usageA

Get usage data specific to Claude Code workspaces.

Returns daily aggregated user activity, tool usage statistics, and token consumption for Claude Code sessions. This is separate from the general usage report and only covers Claude Code workspace activity. Bedrock-routed Claude Code is not included.

Inputs: starting_at (required), ending_at, limit, page. Returns: object

get_cost_reportA

Get dollar-amount cost data for the organization.

Returns costs in US dollars (already converted from the API's native cents representation by the client wrapper) broken down by operation description (input tokens, output tokens, cache writes /reads, code execution, web search, etc.) and optionally by workspace. Use for questions like 'what did we spend last week' or 'which workspace cost the most this month'. Priority Tier costs are NOT included here — track those via usage.

Inputs: starting_at (required), ending_at, group_by, limit, +1 more. Returns: object

get_org_infoA

Get information about the current Anthropic organization.

Returns the organization's ID, name, and type. Useful as a smoke test that the Admin API key is configured correctly.

Inputs: no named parameters. Returns: object

get_usage_reportA

Get detailed token usage from the Messages API.

Returns input/output/cache token counts and request counts, bucketed by the requested time window and grouped by the requested dimensions. Use this for questions like 'how many Opus tokens did workspace X burn yesterday' or 'show daily request volume for the last week grouped by model'. Data appears within ~5 minutes of API calls.

Inputs: starting_at (required), ending_at, bucket_width, group_by, +2 more. Returns: object

get_workspaceA

Get a single workspace by ID.

Returns name, display_color, created_at, archived_at (if archived), and type. Useful for resolving a workspace ID into its display name before referring to it in subsequent operations.

Inputs: workspace_id (required). Returns: object

invite_memberA

Invite a new member to the organization.

Sends an invitation email. The invitation expires in 21 days and cannot be modified once created — only cancelled and re-issued. Cannot grant the 'admin' role; admins must be promoted via Console.

Inputs: email (required), role (required), confirm. Returns: object

list_api_keysB

List API keys in the organization.

Returns metadata only — the actual key values are never returned by the Admin API and cannot be retrieved after creation. Each entry includes id, name, status, workspace_id, partial_key_hint (last 4 chars), and created_by_user_id.

Inputs: limit, status, workspace_id, created_by_user_id, +2 more. Returns: object

list_invitesB

List pending and historical organization invites.

Invites expire after 21 days. Each invite includes the invited email, the role offered, status (pending / accepted / expired / deleted), and timestamps.

Inputs: limit, before_id, after_id. Returns: object

list_membersA

List organization members.

Returns up to limit members per call. For pagination, pass the last user_id from a previous response as after_id. Member objects include id, email, name, role (user / developer / billing / admin / claude_code_user), and timestamps.

Inputs: limit, before_id, after_id. Returns: object

list_workspace_membersA

List members of a specific workspace.

Each entry includes the user_id and their workspace_role (workspace_admin / workspace_developer / workspace_user / workspace_billing). Org admins automatically have workspace_admin on every workspace and may not appear here explicitly.

Inputs: workspace_id (required), limit, before_id, after_id. Returns: object

list_workspacesA

List workspaces in the organization.

Workspaces partition API keys, members, and billing. Every org has a Default Workspace that doesn't appear in this list. Max 100 active workspaces per org; archived workspaces don't count against the limit.

Inputs: limit, include_archived, before_id, after_id. Returns: object

remove_memberA

Remove a member from the organization.

The user loses access to all workspaces immediately. API keys created by them remain active (keys are org-scoped, not user-scoped). Cannot remove members with the 'admin' role — that must be done through the Console.

Inputs: user_id (required), confirm. Returns: object

remove_workspace_memberA

Remove a member from a workspace.

They lose access to API keys scoped to this workspace. Their org-level role and access to other workspaces are unaffected. Org admins cannot be removed from workspaces — their role is automatic and inherited.

Inputs: workspace_id (required), user_id (required), confirm. Returns: object

update_api_keyA

Rename or deactivate an API key.

Renaming is cosmetic and does not require confirmation in itself, but the tool still respects the global confirm flag. Setting status='inactive' immediately stops the key from authenticating new requests — any running workloads using it will start failing. This server cannot reactivate keys; that must be done in the Console.

Inputs: api_key_id (required), name, status, confirm. Returns: object

update_member_roleA

Change an existing member's organization role.

Cannot promote to or demote from 'admin' — those changes happen only in the Console. Changing roles takes effect immediately and may impact what API keys and workspaces the user can access.

Inputs: user_id (required), role (required), confirm. Returns: object

update_workspaceA

Rename or recolor a workspace.

Cosmetic only — does not affect billing, access, or API keys. At least one of name or display_color must be provided.

Inputs: workspace_id (required), name, display_color, confirm. Returns: object

update_workspace_member_roleA

Change a member's role within a workspace.

Effective immediately. Does not affect their org-level role or access to other workspaces.

Inputs: workspace_id (required), user_id (required), workspace_role (required), confirm. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 21 tools

    Disambiguation5/5

    Each tool has a distinct purpose targeting specific resources (workspaces, members, invites, API keys, usage). No two tools overlap in functionality; even the two report tools (get_cost_report and get_usage_report) clearly separate dollar costs from token usage. The tool set is well-organized with clear boundaries.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., create_workspace, list_members, update_api_key). Verbs are chosen predictably and match the action being performed. No mixing of conventions like camelCase or inconsistent verb styles.

    Tool Count5/5

    21 tools is reasonable for the complexity of Anthropic administration, covering organization, workspaces, members, invites, API keys, and usage reports. Each tool addresses a necessary operation without obvious redundancy or bloat.

    Completeness3/5

    The tool set covers most core admin operations but has notable gaps: no tool to create or delete API keys (only rename/deactivate), and no tool to delete a workspace (only archive). These missing lifecycle operations may cause agents to hit dead ends.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables read-only reporting of Anthropic organization usage and costs through a user-connected admin API key, across any MCP-compatible client.
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables Claude Desktop, Claude Code, and other MCP clients to manage firewall rules, VPNs, NAT, DNS, DHCP, routing, certificates, and diagnostics through natural language, with guardrails, rate limits, and config-revision backups that make destructive changes reversible.
      -