Anthropic Admin Mcp

io.github.Trushtonfactory由 GitHub 帳號 Trushtonfactory 發布v0.1.1更新於 Oct 24, 2026

Native MCP server for the Anthropic Admin API: org, workspaces, members, API keys, usage, costs.

概覽

AI 產生的概覽

針對 Anthropic Admin API 的在地 MCP 伺服器,讓助理檢視並管理組織的 workspace、成員、API 金鑰、用量與成本。

可以做什麼
讀取組織資訊、成員、邀請、workspace、workspace 成員與 API 金鑰,可依狀態或 workspace 篩選。取得依 workspace、API 金鑰或模型分組的用量與成本報告,以及 Claude Code 用量。邀請成員、取消邀請、變更或移除成員角色,並移除非管理員成員。建立、重新命名、改色或封存 workspace,授予、變更或撤銷 workspace 存取權。重新命名或停用 API 金鑰。所有寫入工具都要求明確的確認參數,並記錄到 JSONL 稽核日誌。
適用情境
適合組織管理員在 MCP 用戶端中查詢 Anthropic 支出與 token 用量、稽核 API 金鑰與成員,或執行邀請、workspace 權限調整等日常組織操作,而不必開啟 Console。
執行需求
以 Python 套件形式在地執行(pip 安裝),使用 stdio 傳輸。需要 ANTHROPIC_ADMIN_KEY 中的 Anthropic Admin API 金鑰,且帳號須為 Organization 方案(Team、Pro+ 或 Enterprise)並具備管理員角色。選用 ALLOWED_WORKSPACES 可限定寫入工具範圍,AUDIT_LOG_PATH 指定稽核日誌位置。提供唯讀模式選項。
安裝前請注意
Admin 金鑰擁有廣泛的組織權限:讀取會暴露該金鑰可存取的全部 Admin API 資料,寫入工具可邀請、移除或變更成員角色、封存 workspace、停用 API 金鑰。寫入需 confirm=True 並記入稽核日誌,但目前尚無用量限制。請勿將金鑰放入共用設定,優先使用唯讀模式或 workspace 範圍限制以落實最小權限。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Anthropic Admin Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

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

Or for local development:

bash
git clone https://github.com/Trushtonfactory/anthropic-admin-mcp.gitcd anthropic-admin-mcppython3 -m venv .venvsource .venv/bin/activatepip 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:

    bash
    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:

    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

bash
# Full mode (read + write), stdio transportanthropic-admin-mcp
# Read-only — recommended for first-time setupanthropic-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.

來源:README.md,提交 dd826cb

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分