mcpField
A
anthropic-admin-mcp

anthropic-admin-mcp

Local
github.com/TrushtonfactoryAI & Agents0Updated 23w ago

About anthropic-admin-mcp

anthropic-admin-mcp is an open-source MCP server for organization administrators using the Anthropic Admin API. It offers typed tools for organization, workspace, member, API key, usage, and cost management, with guarded writes and audit logs.

Key features

  1. 01Read organization and workspace details
  2. 02Manage members, roles, and invitations
  3. 03Review API keys, usage, and costs
  4. 04Modify workspaces and API keys
  5. 05Require confirmation and log mutations

Use cases

  1. 01Review token usage by workspace or API key
  2. 02Compare organization costs across workspaces
  3. 03Invite members and adjust workspace access
  4. 04Deactivate an outdated API key

MCP support

Exposes Anthropic Admin API and Usage & Cost API operations as tools to MCP-compatible clients. Supports stdio and Streamable HTTP transports, with read-only mode and guarded write operations.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"trushtonfactory-anthropic-admin": {
"command": "uvx",
"args": [
"anthropic-admin-mcp"
],
"env": {
"ANTHROPIC_ADMIN_KEY": "<ANTHROPIC_ADMIN_KEY>",
"ALLOWED_WORKSPACES": "<ALLOWED_WORKSPACES>",
"AUDIT_LOG_PATH": "<AUDIT_LOG_PATH>"
}
}
}
}
Run commanduvx anthropic-admin-mcp
Environment variables to set
ANTHROPIC_ADMIN_KEYSecretYour Anthropic Admin API key (Console -> Settings -> Admin Keys). Required.
ALLOWED_WORKSPACESOptional comma-separated workspace IDs to scope write tools to. Recommended for least-privilege setups.
AUDIT_LOG_PATHPath for JSONL audit log of mutating operations. Defaults to ./audit.jsonl.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
pypianthropic-admin-mcp0.1.1

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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 [email protected] 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.

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)
ToolPurpose
get_org_infoSmoke-test the key; return org id + name
list_membersList org members and roles
list_invitesList pending and historical invites
list_workspacesList active (and optionally archived) workspaces
get_workspaceResolve a workspace ID to its full record
list_workspace_membersList members of a specific workspace
list_api_keysList keys with filters by status / workspace
get_usage_reportToken usage, grouped by workspace/api_key/model/etc.
get_cost_reportDollar costs, grouped by workspace / description
get_claude_code_usageClaude Code-specific usage data
Write (10) — all require confirm=True
ToolAction
invite_memberSend an invite (cannot grant admin)
delete_inviteCancel a pending invite
update_member_roleChange a member's org role (cannot touch admin)
remove_memberRemove a non-admin member
create_workspaceCreate a new workspace
update_workspaceRename or recolor a workspace
archive_workspaceArchive a workspace
add_workspace_memberGrant workspace access
update_workspace_member_roleChange a workspace role
remove_workspace_memberRevoke workspace access
update_api_keyRename 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.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.