openai-workspace-mcp
Provides tools for interacting with the OpenAI Admin API, enabling management of organization members, invites, projects, project members, service accounts, project API keys, rate limits, usage, costs, and audit logs.
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., "@openai-workspace-mcpwhat's my API usage 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.
openai-workspace-mcp
English | 中文
OpenAI Workspace MCP server for Claude — exposes the OpenAI Admin API (the API Platform organization back office, distinct from ChatGPT Enterprise workspace admin) as MCP tools: organization members, invites, projects, project members, service accounts, project API keys, rate limits, usage, costs, and audit logs.
Tech stack: Python 3.12 + uv + FastMCP (Starlette/uvicorn)
关联需求:PRD-15751(ChatGPT / OpenAI Workspace)。完整调研见
vendor-mcp-template/prd/OpenAIWorkspace.md.
Out of scope: Admin API key self-management, fine-grained custom Roles/Groups (RBAC), mTLS Certificates, Data Retention policy, Spend Limit/Alert configuration, Model Permissions, and Hosted Tool Permissions are intentionally not implemented — see the PRD §4.11 for rationale (mostly: high-risk security/compliance writes, or orthogonal to the "members + usage + billing" scope this service targets).
Quick Start
cd openai-workspace-mcp
uv sync
# stdio mode (for Claude Desktop / CLI), single shared key from env
OPENAI_ADMIN_API_KEY=sk-admin-xxxx uv run openai-workspace-mcpRelated MCP server: OpenAI Assistant MCP Server
Authentication
This service is stateless: it never stores or persists the OpenAI Admin API key.
The key is either supplied once via an environment variable (local dev, AUTH_MODE=env),
or per-request via an HTTP header (AUTH_MODE=gateway, production).
Unlike some other vendor integrations in this workspace (Adobe, Bitwarden), the OpenAI Admin API needs no OAuth token exchange — it's a single static Bearer token attached directly to every request, so there's no extra Identity round trip.
Gateway mode HTTP headers (AUTH_MODE=gateway)
Header | Type | Required | Default | Enum | Description | Example |
| string | Yes | none | none | OpenAI Admin API key ( |
|
Missing the header on a /mcp request returns 401 with a required_headers list.
Env mode variables (AUTH_MODE=env, local dev only)
Variable | Default | Description |
| — | OpenAI Admin API key |
|
| Admin API base URL (fixed, no regional variants) |
|
|
|
|
|
|
|
| HTTP server port |
|
| HTTP server bind address |
Get a key: as an organization Owner, go to platform.openai.com -> Settings -> Admin API Keys -> Create. Requires an OpenAI API Platform organization (not a personal ChatGPT account).
Claude Desktop Setup
{
"mcpServers": {
"openai-workspace": {
"command": "uv",
"args": ["run", "--directory", "/path/to/openai-workspace-mcp", "openai-workspace-mcp"],
"env": {
"OPENAI_ADMIN_API_KEY": "sk-admin-xxxx"
}
}
}
}Transport Modes
stdio (Claude Desktop / CLI)
OPENAI_ADMIN_API_KEY=sk-admin-xxxx uv run openai-workspace-mcpHTTP — single-tenant (env mode)
OPENAI_ADMIN_API_KEY=sk-admin-xxxx MCP_TRANSPORT=http AUTH_MODE=env uv run openai-workspace-mcp
curl http://localhost:8080/healthHTTP — gateway / multi-tenant (production)
MCP_TRANSPORT=http AUTH_MODE=gateway uv run openai-workspace-mcpTool List
Base URL: https://api.openai.com/v1 (fixed). List endpoints use cursor pagination
(after/limit, some also before) — pass the previous response's last_id/next_page
value as after/page to fetch the next batch.
Organization Users
Tool | Description | Parameters |
| List organization members |
|
| Get a member's details |
|
| Change a member's org role |
|
| Remove a member from the org |
|
No "create user" endpoint — joining the org always goes through an invite.
Invites
Tool | Description | Parameters |
| Invite a new user by email |
|
| Get an invite's status |
|
| List all invites |
|
| Revoke a pending invite |
|
Projects
Tool | Description | Parameters |
| List projects |
|
| Get a project's details |
|
| Create a project |
|
| Rename a project |
|
| Archive a project (cannot be undone via API; projects cannot be deleted) |
|
Project Users
Tool | Description | Parameters |
| List members of a project |
|
| Get a project member's details |
|
| Add an existing org member to a project |
|
| Change a member's project role |
|
| Remove a member from a project |
|
Project Service Accounts
Service accounts are non-human, project-scoped identities. Creating one is the only programmatic way to mint a new API key — there's no "create user API key" endpoint.
Tool | Description | Parameters |
| List service accounts in a project |
|
| Get a service account's details |
|
| Create a service account (response includes the API key's plaintext value — shown only once) |
|
| Update name/role |
|
| Delete a service account |
|
Project API Keys (read + revoke only)
Tool | Description | Parameters |
| List API keys in a project (values always redacted) |
|
| Get a key's details (redacted) |
|
| Delete a key (fails if it belongs to a service account — delete the service account instead) |
|
Project Rate Limits
Tool | Description | Parameters |
| List per-model rate limit configs |
|
| Update one model's rate limit |
|
Usage & Costs
Tool | Description | Parameters |
| Query time-bucketed usage for one category |
|
| Query daily spend breakdown |
|
Audit Logs
Tool | Description | Parameters |
| List user actions and config changes |
|
Role enums: org — owner/reader; project & service account — owner/member (service
account also has read-only none). Invite status (read-only): pending/accepted/expired.
Rate limits: OpenAI has not published Admin-API-specific throttling numbers; 429
responses are passed through as-is.
Test Examples
tools/list (gateway mode)
curl -X POST http://localhost:8080/mcp \
-H "x-openai-admin-key: sk-admin-your_key" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'tools/call — invite a member into a project
curl -X POST http://localhost:8080/mcp \
-H "x-openai-admin-key: sk-admin-your_key" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 2,
"params": {
"name": "openai_invite_user",
"arguments": {
"email": "user@example.com",
"role": "reader",
"projects": [{"id": "proj_abc123", "role": "member"}]
}
}
}'tools/call — query last 7 days of completions usage
curl -X POST http://localhost:8080/mcp \
-H "x-openai-admin-key: sk-admin-your_key" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 3,
"params": {
"name": "openai_get_usage",
"arguments": {"category": "completions", "start_time": 1735689600, "bucket_width": "1d", "limit": 7}
}
}'Missing header → 401
curl -i -X POST http://localhost:8080/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
# HTTP/1.1 401 Unauthorized
# {"error":"Missing credentials","required_headers":["x-openai-admin-key"]}API Reference
Endpoint paths, params, and enums in this service were verified against the official
openai-nodeSDK source (src/resources/admin/organization/**, auto-generated by OpenAI from their OpenAPI spec), since the interactive docs site returns 403 to non-browser fetches. Seevendor-mcp-template/prd/OpenAIWorkspace.md§8 for the exact file list.
Known Limitations
No "create user" or "create project API key" tools — by design, these follow OpenAI's own API surface: org membership only grows via invites, and a new API key can only be minted by creating a service account.
openai_create_service_accountreturns a plaintext API key — this is the underlying API's own behavior (shown once, at creation time only); the tool does not redact it.Array-valued filters (
project_ids,event_types, etc.) are sent askey[]=...query params, matching OpenAI's own SDK serialization — not the plain repeated-key format some other vendors in this workspace use.No documented Admin-API-specific rate limits —
429is passed through as-is.Requires an OpenAI API Platform organization with Owner access to create an Admin API key; a personal ChatGPT account cannot use this service.
Advanced features intentionally out of scope: Admin API key self-management, custom Roles/Groups (RBAC), Certificates (mTLS), Data Retention, Spend Limit/Alerts, Model Permissions, Hosted Tool Permissions — see the PRD for rationale.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides tools to manage OpenAI API keys and spending through the OpenAI API. Requires an OpenAI admin API key for secure access to account management features.Last updated2MIT
- FlicenseBqualityDmaintenanceEnables interaction with OpenAI's Chat Completion and Assistants APIs, supporting assistant management, file operations, and direct queries to GPT models through standardized MCP tools.Last updated92
- AlicenseAqualityCmaintenanceFull coverage of Anthropic Admin API to manage organization, workspaces, members, API keys, usage, and costs via natural language from any MCP client.Last updated21MIT
- Flicense-qualityBmaintenanceExposes 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.Last updated1
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
Free public MCP for AI agents — 193 tools, 44 workflows. No API key.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/MSPbotsAI/openai-workspace-mcp-'
If you have feedback or need assistance with the MCP directory API, please join our Discord server