By whopmcp.com · May 3, 2026 · Updated November 21, 2026 · 8 min read
Whop MCP API Key Guide
When Whop MCP needs an API key and when it does not, where to create an Account API key, how to limit it, and how Account and App API keys differ.
Summary
The hosted Whop MCP server does not use an API key. You connect to https://mcp.whop.com/mcp and sign in to Whop in your browser. Do not paste an Account API key, bearer token or custom header into a hosted client. Whop's guide says not to.
You need a key in two other cases:
- The older local package,
@whop/mcp, which runs on your computer and readsWHOP_API_KEY. - Direct calls to the Whop REST API.
In those cases the key is the authority. If the key can refund payments, update products or cancel memberships, an AI agent using it can ask for those actions. So the key should cover only what the job needs.
Whop documents Account API keys and App API keys. Use an Account API key when the agent works on your own business. Use an App API key when you are building an app that works across the businesses that installed it. Whop now calls businesses "accounts" in its API. Older pages say "companies".
API versions and keys. Whop serves a Current API and a Legacy API. Its docs say new integrations should build on the Current API and that the Legacy API stays fully supported. A key can carry a stored version pin. A request with no
Api-Version-Dateheader uses the key's pin. Existing keys without a pin get the original2025-01-01behavior. Newly created keys get the latest version. Key pins are explained on Whop's API versions page. Current versus Legacy is on the API stability page.
Checked November 21, 2026 against Whop's API versions page.
Account API key
An Account API key is the normal choice for sellers, operators and internal workflows.
Use it for:
- Summarizing your own products, variants (formerly plans), payments or memberships.
- Creating internal reports.
- Debugging your own checkout or customer access issues.
- Running the local package against your own Whop business.
Where to create it. Open the Developer page in your Whop dashboard and look under Account API Keys.
How to limit it. Whop lets you choose what a key can do. Its Auth and API Keys guide says to give a key a custom permission set instead of Admin. Pick only the endpoints you will call. Create a new key for this job instead of reusing an old broad one.
One naming detail: variant permissions still use the old word. They are plan:basic:read, plan:create, plan:update and plan:delete. No variant:* permission exists.
Checked November 21, 2026 against Whop's Auth and API Keys guide.
For the local package, keep the key outside your project files:
export WHOP_API_KEY="YOUR_WHOP_API_KEY"
npx -y @whop/mcp@latest --operation=read
The package has no read-only mode. --operation=read is its only read control. It exposes only the get and list tools.
For VS Code, use the portable mcpServers format in a workspace .mcp.json. Refer to the key as ${WHOP_API_KEY} and set the value in your environment. Never commit the value. VS Code rejects ${input:...} prompts for Copilot sessions, so the older prompted-secret pattern no longer works there.
{
"mcpServers": {
"whop-local": {
"command": "npx",
"args": ["-y", "@whop/mcp@latest", "--operation=read"],
"env": {
"WHOP_API_KEY": "${WHOP_API_KEY}"
}
}
}
}
Checked November 21, 2026 against the VS Code MCP configuration reference.
What to know about the local package
- Its latest release is 0.0.17, published December 10, 2025.
- Its tool names are different from the hosted names. It uses names like
list_payments. The hosted server uses names likepayments_list. - It sends no
Api-Version-Dateheader, so the key's version pin decides how the API behaves. A newly created key gets the latest version. Some of the package's older tools then stop working. For example, its withdrawal list and create tools return 410 Gone, because Whop replaced withdrawals with payouts. - It calls production by default. Sandbox and production share no keys, so a sandbox key fails there.
If none of that is what you want, use the hosted server and skip the key.
Checked November 21, 2026 against the @whop/mcp package on npm.
App API key
An App API key is for app developers. Use it when the agent is helping with an app that can reach data across the businesses that installed the app.
The risk is different. A mistake can affect more than your own business. App-key work should have stricter review, a separate test setup where you can, and a clear record of what was done.
Use an App API key for:
- Building or debugging a Whop app.
- Inspecting data across businesses that installed your app.
- Checking app behavior against Whop's API.
- Development work where the app itself is the subject.
Do not switch to an App API key just because an Account API key failed. Find out why the account key failed first.
API header example
For direct REST calls, the key is sent as a bearer token. The hosted server does not use this header in client config. To check an Account API key outside MCP:
curl https://api.whop.com/api/v1/accounts/me \
-H "Authorization: Bearer YOUR_WHOP_API_KEY"
This endpoint is for account API keys. A hosted sign-in is a Whop user, and Whop answers a user token here with 403. On the hosted server the agent uses accounts_list or connection_status instead.
Do not paste a real key into a screenshot, issue, commit, public chat or website source file. Use placeholder values in examples. Rotate any real key that left your control.
Permission patterns
| Workflow | Better key shape | Avoid |
|---|---|---|
| Read product and variant IDs for checkout code | Account API key with a custom permission set that reads products, variants and checkout | A broad key that can refund payments or cancel memberships |
| Summarize recent payments | Account API key that can read payments | A key that can retry, void or refund payments, unless that is the task |
| Build an installed Whop app | App API key in the app development context | Reusing a seller key because it is already there |
| Debug a user sign-in flow | An OAuth token for that user flow | An account key, when the bug depends on user authorization |
What not to do with keys
Do not commit keys to a repo. Do not paste keys into Markdown files, screenshots, issue reports or drafts. Do not put a real key in src/, public/, .env.example or any file that ships to a website.
Do not use one permanent key for every tool. If a key leaks, you want to know which workflow exposed it and rotate only that one.
Do not give an AI client a broad key and then write vague prompts. "Clean up my store" is not a safe instruction. "List memberships with failed payments and suggest next steps without changing data" is a safe start.
Safe first-session checklist
Before your first real session with a key:
- Create a key with a custom permission set for this job.
- Confirm whether the task is about your business or about your app.
- Connect the MCP client.
- Ask the client to list its tools without calling any write.
- Run one read.
- Review the result.
- Only then approve a specific write, if you need one.
Use this prompt:
Before you call any Whop tool, tell me whether it reads or writes. Do not create, update, delete, cancel, refund, pause, resume, message or change anything unless I say yes.
Writes on the hosted server
The hosted server runs each operation when it is called. There is no prepare step and no confirmation token. Your AI client's approval prompt is the approval point. Check the tool name, the business and the arguments before you approve.
If a write fails and you cannot tell if it ran, have the agent read the record back. Retry only with the same idempotency_key. A stable key is what prevents a double run.
Checked November 21, 2026 against Whop's MCP server README.
Rotating keys
Rotate a key if it was pasted into a chat, committed to git, shared in a screenshot, used on a machine you do not trust, or used in a test setup you no longer control.
- Create the replacement key with the smallest useful permission set.
- Update the environment variable or client config.
- Fully restart the client.
- Run one read.
- Revoke the old key.
- Search your repo and notes for copies of the old key.
For a local repo, include ignored files in the search. Replace the placeholder with the first characters of the old key:
rg -n --hidden --no-ignore "FIRST_8_CHARACTERS_OF_OLD_KEY" .
A hosted connection has no key to rotate. To end it, remove the connector in your client. In Claude Code, run claude mcp logout <name> before you remove the server.
Account key or app key?
Use an Account API key if the sentence starts with "my Whop" or "our business". Use an App API key if the sentence starts with "businesses that installed my app".
If you are still unsure, stop and settle it before you connect anything. The wrong key changes what data the agent can reach.
API key FAQ
Does the hosted Whop MCP server need an API key?
No. The hosted server at https://mcp.whop.com/mcp uses browser sign-in. Only the older local package and direct REST calls use a key.
Should I put the key in mcp.json?
No. Refer to it as an environment variable and set the value outside the file. Never commit the value.
Is an Account API key safer than an App API key?
Not automatically. It is safer only when the key has a narrower permission set and the work is limited to your own business.
Why do tools show up but still fail?
Seeing a tool only means the client can see the server. A call can still fail because the key lacks permission, the record belongs to another business or app, or the agent sent the wrong arguments.
Related guides
Official references
Next step. No Whop business yet? Create a Whop business, then connect it with a setup guide. Already running one? Try the seller playbooks.
Paid link: if you create a Whop business through this link, Whop pays us a share of its profit from that business. Your Whop pricing is the same either way.