platform-mcp-stub
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@platform-mcp-stubRequest an API key for scope messages:write and check our current usage and limits."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
platform-mcp-stub
A minimal MCP server (TypeScript, stdio transport, official
@modelcontextprotocol/sdk) that demonstrates agent-native platform
onboarding with human-in-the-loop provisioning: an agent can discover its
usage and limits on its own, but getting a credential always routes through a
visible human approval gate.
Tools
Tool | What it does | Real vs fixture |
| Files a pending approval request in a local | The gate is real (ledger + CLI); the key is intentionally fake — this stub never touches real credential minting. |
| Last 7 days of org token usage, daily buckets grouped by model, via the Anthropic Usage Admin API ( | Live when |
| The org's configured rate-limit groups (per-model-group RPM / input-TPM / output-TPM, batch queue limits) via the Rate Limits Admin API ( | Same pattern: live with an admin key, labeled fixture without. |
The human-approval gate is the whole point: the agent's request, the human's decision, and the resulting (fake) credential are all visible in one plain-JSON ledger.
Related MCP server: anthropic-admin-mcp
What is real vs fixture
Real: the MCP protocol surface (official SDK, stdio JSON-RPC), the approvals ledger and CLI flow, and — when
ANTHROPIC_ADMIN_KEYis present — the HTTP calls to the two Admin API endpoints above (correct headers:anthropic-version: 2023-06-01,x-api-key).Fixture: without an admin key,
get_usage_summary/get_limit_statusreturn synthetic data labeled_fixture: truewith a_note, matching the real response schemas so downstream handling is identical.Always fake: issued keys. Format
sk-ant-demo-<hex>; they mint nothing and authenticate nowhere.
Note: the Admin API requires an Admin API key (sk-ant-admin01-...),
which is a different credential from a regular Claude API key, and is only
available on organization (not individual) accounts.
Run it
npm install
npm run build
npm start # MCP server on stdio (Ctrl-C to stop)Demo the approval flow end to end:
# 1. In an MCP client (or via raw JSON-RPC — see below), call:
# request_api_key(scope="usage:read", justification="dashboard prototype")
# -> "pending human approval: apprq_xxxxxxxx"
# 2. As the human operator:
npm run approve -- list
npm run approve -- apprq_xxxxxxxx
# -> approved; prints the FAKE sk-ant-demo-... key
# (to reject instead: npm run approve -- deny apprq_xxxxxxxx)
# 3. Agent re-calls request_api_key (same scope, or scope="status:apprq_xxxxxxxx")
# -> gets the demo keyNo MCP client handy? Drive the server with raw JSON-RPC over stdio. Pipe
into node dist/server.js directly — not npm start, because npm prints
its script banner to stdout, which pollutes the JSON-RPC stream:
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"probe","version":"0.0.1"}}}' \
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"request_api_key","arguments":{"scope":"usage:read","justification":"dashboard prototype"}}}' \
| node dist/server.jsThe same pattern works for get_usage_summary and get_limit_status
(empty arguments).
To exercise the live Admin API paths:
export ANTHROPIC_ADMIN_KEY=sk-ant-admin01-...
npm startWire into Claude Code
claude mcp add platform-stub -- node /absolute/path/to/platform-mcp-stub/dist/server.jsOptionally pass the admin key through:
claude mcp add platform-stub -e ANTHROPIC_ADMIN_KEY=sk-ant-admin01-... -- \
node /absolute/path/to/platform-mcp-stub/dist/server.jsThen in a Claude Code session: "Request an API key for scope messages:write
and check our current usage and limits." Approve from a second terminal with
npm run approve -- <id>.
Honest scope notes (v1)
Evening-sized prototype, not a provisioning product: single-file JSON ledger, no auth on the approve CLI, no expiry/rotation, no real key minting (by design — the Admin API does support key management, which a v2 could gate behind the same approval flow).
Usage summary is a fixed query (7 days,
1dbuckets,group_by[]=model); the real endpoint supports much richer filtering/grouping.approvals.jsonlives at the repo root by default; override withAPPROVALS_FILE.
Requirements
Node 20+
ANTHROPIC_ADMIN_KEY(admin key,sk-ant-admin01-...) only for live usage/limit data — everything else works offline.
Available Tools
3 toolsget_limit_statusGet organization rate limit statusA
The organization's configured rate limit groups (per-model-group RPM/ITPM/OTPM, batch queue limits, ...) via the Anthropic Rate Limits Admin API (GET /v1/organizations/rate_limits). Requires an Admin API key in ANTHROPIC_ADMIN_KEY; without one, returns a clearly-labeled fixture with the real response schema.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It transparently discloses the required authentication method, the fallback fixture behavior when no key is present, and the fact that the fixture is clearly labeled. This goes well beyond a bare 'gets rate limit status' statement, though it does not describe error cases or exact response formatting.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single compact sentence with no filler. Every clause earns its place: the resource and data scope, the exact API endpoint, the authentication requirement, and the no-key fallback behavior are all packed efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, read-only status endpoint with no output schema, the description covers the essential operational details: what data is returned, which endpoint is used, what credentials are needed, and what happens when credentials are absent. It could additionally mention the shape of successful responses or potential errors, but nothing critical is missing for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the baseline is 4. The description adds useful contextual detail about what the response covers (per-model-group RPM/ITPM/OTPM, batch queue limits), which helps an agent understand the tool's data scope even though there is nothing to configure.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The title and description together clearly identify the operation as getting organization rate limit status, with a specific resource (Anthropic Rate Limits Admin API endpoint) and specific data fields (RPM/ITPM/OTPM, batch queue limits). This distinguishes it from the siblings request_api_key and get_usage_summary, which serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage context by stating that an Admin API key in ANTHROPIC_ADMIN_KEY is required and what happens without one, which is important prerequisite information. It does not explicitly name alternatives or exclusions, but the sibling tools are clearly different operations, so the intended use is unambiguous.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_usage_summaryGet organization usage summaryA
Last 7 days of organization token usage, daily buckets grouped by model, via the Anthropic Usage Admin API (GET /v1/organizations/usage_report/messages). Requires an Admin API key (sk-ant-admin01-...) in ANTHROPIC_ADMIN_KEY; without one, returns a clearly-labeled fixture with the real response schema.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does so well. It discloses the GET endpoint, required authentication, the time range/bucketing behavior, and that a clearly-labeled fixture with the real response schema is returned when no admin key is present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two dense sentences deliver the semantic core first, then the endpoint, auth requirement, and fallback behavior. Every clause provides useful information with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter read-only tool with no annotations and no output schema, the description is effectively complete: it names the resource, scope, grouping, endpoint, auth path, and abnormal return behavior. It gives an agent enough to call and interpret the result correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and an empty schema with 100% coverage, so the baseline is 4. The description adds contextual value about time window and grouping, but no parameter-level semantics are needed or missing.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: get organization token usage for the last 7 days, daily buckets grouped by model. It names the exact API endpoint and is clearly distinct from sibling tools like get_limit_status and request_api_key.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly communicates the prerequisite (Admin API key in ANTHROPIC_ADMIN_KEY) and describes fallback behavior without one. It does not name alternatives or explicitly say when not to use it, but the tool's scope and sibling names make selection straightforward.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
request_api_keyRequest an API key (human-gated)A
Request an API key for a given scope. This does NOT mint a key: it files a pending approval request that a human operator must approve out-of-band by running the companion CLI (npm run approve -- <id>). Approved requests carry a demo key in the deliberately fake sk-ant-demo-... format. If a request for the same scope was already approved, the existing demo key is returned. Pass an existing request id via scope prefixed with 'status:' to check status (e.g. scope='status:apprq_1234abcd').
| Name | Required | Description | Default |
|---|---|---|---|
| scope | Yes | What the key is for, e.g. 'messages:write' or 'usage:read'. Or 'status:<request_id>' to check an earlier request. | |
| justification | Yes | Why the key is needed — shown to the human approver. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full disclosure burden and exceeds it: it reveals the async pending-approval flow, the out-of-band CLI dependency, the deliberately fake sk-ant-demo-... key format, the dedup behavior for already-approved scopes, and the hidden dual-mode status: prefix behavior. This is far more than the bare schema conveys.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Five sentences, each carrying a distinct non-redundant fact: purpose, the no-mint caveat, the fake key format, dedup behavior, and the status-check mode. The most critical warning is front-loaded in the second sentence, and no sentence repeats schema content or adds padding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no output schema and no annotations, the workflow is thoroughly covered: what it does, what it does not do, approval mechanics, key format, dedup, and status checking. The one notable gap is the return value: the description references request ids (apprq_...) but never states what a successful call returns, which an agent needs to chain the status-check call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The schema already fully documents both parameters, including the status:<request_id> pattern for scope and the approver-facing purpose of justification. The description adds only marginal parameter-level meaning (that scope is the dedup identity), which is not enough to push above baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence names a specific verb+resource ('Request an API key for a given scope'), and the title adds the 'human-gated' qualifier. The 'This does NOT mint a key' clause immediately disambiguates it from a key-generation operation, and the workflow described (approval requests vs. the read-only status/usage siblings) makes it easy to tell apart from get_limit_status and get_usage_summary.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear operational context for when to use the tool: to file a pending approval request, with explicit notes on the out-of-band human approval via the companion CLI, dedup on repeated scopes, and a status-check mode. However, it never explicitly names the sibling tools or states when NOT to use this one, so it lacks explicit exclusion/alternative guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
get_limit_status - First observed
get_usage_summary - First observed
request_api_key
TDQS
Scored across 3 tools
Each tool addresses a distinct domain area: rate limits, API key requests, and usage summaries. There is no meaningful overlap between them, and the status-checking behavior inside request_api_key is clearly documented rather than being a separate ambiguous tool.
All tool names follow a consistent verb_noun pattern in snake_case: get_limit_status, request_api_key, get_usage_summary. The verbs are descriptive and the naming style is uniform across the set.
Three tools is a reasonable scope for a platform admin stub focused on limits, usage, and key requests. Each tool covers a distinct administrative area without unnecessary bloat or redundant operations.
The set covers the main admin concerns suggested by the server name: rate limits, usage reporting, and API key access requests. Minor gaps exist, such as no direct approval or managed key listing, but these appear intentionally delegated to an out-of-band CLI process.
Maintenance
Related MCP Connectors
Build and manage AI-native customer support agents from Claude or any MCP client.
Agent payments, API key vaulting, and governed mandates. Agents spend within user-defined limits.
Human approvals, notifications, inbound webhooks, wake-ups for headless agents. Free trial: /try
Agentic workflow budget approvals with usage receipts.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI-first DevOps management of multi-tenant Solid SaaS platforms through natural language conversation. Monitor thousands of tenant instances, track AI agent performance, handle errors, manage billing, and provision new tenants directly through Claude Desktop.-
- AlicenseAqualityDmaintenanceFull coverage of Anthropic Admin API to manage organization, workspaces, members, API keys, usage, and costs via natural language from any MCP client.21MIT
- FlicenseNot gradedqualityDmaintenanceExposes LiteLLM Proxy admin APIs as MCP tools for managing internal users, virtual keys, and spend logs via streamable-http, enabling agents to administer LiteLLM without custom HTTP glue.1-
- FlicenseNot gradedqualityDmaintenanceEnables HR teams to automate employee onboarding workflows through an Agentic AI system integrated with Claude Desktop.1-