AI Admin API MCP Server
Query OpenAI Admin API for usage, costs, projects, users, and project API keys.
Click on "Install 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., "@AI Admin API MCP Servershow my OpenAI usage for this month"
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.
AI Admin API MCP Server
Read-only MCP server for querying AI provider administration APIs and returning normalized usage, cost, and dashboard data.
Status
Implemented providers:
OpenAI Admin API usage, costs, projects, users, and project API keys.
Anthropic Admin API organization metadata, workspaces, API keys, messages usage, and costs.
Planned providers:
Google Cloud Billing export through BigQuery. This provider is not implemented yet. When it ships, release notes must state that direct BigQuery billing export queries can incur Google Cloud query costs.
All MCP tools are read-only. The server does not expose provider mutation tools.
Related MCP server: OfficeRnD MCP Server
Tech Stack
Node.js 22+
TypeScript
pnpm workspaces
@modelcontextprotocol/sdkZod input schemas
Vitest
Quick Start
pnpm install
pnpm check
pnpm testRun over STDIO:
OPENAI_ADMIN_KEY=sk-admin-... \
ANTHROPIC_ADMIN_KEY=sk-ant-admin-... \
pnpm start:stdioRun over Streamable HTTP:
OPENAI_ADMIN_KEY=sk-admin-... \
ANTHROPIC_ADMIN_KEY=sk-ant-admin-... \
MCP_HTTP_AUTH_TOKEN=local-proxy-token \
pnpm start:httpHTTP listens on http://127.0.0.1:8787/mcp. Pass --unsafe-local-http only for local development where another process already protects the endpoint.
Run the gateway-compatible local HTTPS endpoint with a local development certificate:
OPENAI_ADMIN_KEY=sk-admin-... \
ANTHROPIC_ADMIN_KEY=sk-ant-admin-... \
MCP_HTTP_AUTH_TOKEN=local-proxy-token \
MCP_HTTPS_CERT_PATH=/path/to/localhost.pem \
MCP_HTTPS_KEY_PATH=/path/to/localhost.key \
pnpm start:httpsHTTPS listens on https://127.0.0.1:8787/mcp.
Configuration
Variable | Required | Description |
| No | Comma-separated |
| No | Comma-separated providers that must be enabled and statically configured at startup. |
| No | Only |
| OpenAI static mode | OpenAI Admin API key. |
| No | Override for tests or compatible OpenAI Admin API gateways. Defaults to |
| Anthropic static mode | Anthropic Admin API key, sent as |
| Anthropic static mode | Optional Anthropic OAuth bearer token with admin scope. |
| No | Override for tests or compatible Anthropic Admin API gateways. Defaults to |
| No | Anthropic API version. Defaults to |
| No | Comma-separated Anthropic beta headers, for example |
| HTTP mode | Bearer token required by the MCP HTTP endpoint unless unsafe local mode is used. |
| HTTPS mode | PEM certificate path for local HTTPS. |
| HTTPS mode | PEM private-key path for local HTTPS. |
| No | Dashboard bundle cache TTL in seconds. Metadata list tools cache for 300 seconds. Defaults to |
| No | Optional user agent context for future outbound request metadata. |
Credentials
Provider credentials must come from environment variables or an external host secret integration. They must never be sent as normal MCP tool arguments.
In v0.1 static mode, these credential refs are accepted:
credential:openai:staticcredential:anthropic:static
Omit credential_ref to use the static provider credential. Unknown refs are rejected.
Pass-through and broker modes are deployment contracts for an operator-supplied gateway. The gateway, credential store, tenant policy, audit layer, and envelope signing are outside this runtime build. See pass-through gateway docs.
Tools
Common tools:
ai_admin_list_providersai_admin_query_usageai_admin_query_costsai_admin_query_dashboard_bundle
OpenAI tools:
openai_admin_query_usageopenai_admin_query_costsopenai_admin_list_projectsopenai_admin_list_usersopenai_admin_list_project_api_keysopenai_admin_query_dashboard_bundle
Anthropic tools:
anthropic_admin_get_organizationanthropic_admin_list_workspacesanthropic_admin_list_api_keysanthropic_admin_query_messages_usageanthropic_admin_query_costsanthropic_admin_query_dashboard_bundle
Resources and Prompts
Resources:
ai-admin://providersai-admin://providers/{provider}/capabilitiesai-admin://schema/provider-capability-v1ai-admin://schema/usage-fact-v1ai-admin://schema/cost-fact-v1ai-admin://schema/dashboard-bundle-v1openai-admin://capabilitiesanthropic-admin://capabilities
Prompts:
build_usage_dashboardinvestigate_cost_spikeexport_finance_report
Provider Notes
OpenAI usage endpoints have endpoint-specific filters, groupings, and metrics. Unsupported parameters are rejected before any provider call.
Anthropic costs are reported in minor units and normalized to USD major units. Priority Tier costs are not included in the Anthropic cost endpoint.
Anthropic
speedusage filters/groupings requireANTHROPIC_BETA=fast-mode-2026-02-01.Google Cloud Billing support is planned only. BigQuery queries against billing export tables can be cost-bearing.
MCP Client Example
{
"mcpServers": {
"ai-admin-api": {
"command": "pnpm",
"args": ["--dir", "/absolute/path/to/ai-admin-api-mcp", "start:stdio"],
"env": {
"OPENAI_ADMIN_KEY": "sk-admin-...",
"ANTHROPIC_ADMIN_KEY": "sk-ant-admin-..."
}
}
}
}Docker
docker build -t ai-admin-api-mcp .
docker run --rm -p 8787:8787 \
-e OPENAI_ADMIN_KEY \
-e ANTHROPIC_ADMIN_KEY \
-e MCP_HTTP_AUTH_TOKEN \
ai-admin-api-mcpThe Docker image starts Streamable HTTP mode by default.
Development
pnpm check
pnpm test
pnpm test:live:openai
pnpm test:live:anthropicLive tests are skipped unless provider credentials are present.
Release
CI runs pnpm check and pnpm test on pushes and pull requests targeting main.
Publishing to npm is manual through the Publish to npm GitHub Actions workflow. Configure the repository secret NPM_TOKEN with publish access to the npm packages, then run the workflow from main and choose the npm dist-tag. Use the workflow's dry-run option to validate packaging without uploading.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Amaretto-Software-Labs/ai-admin-api-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server