Create Mammoth API keys and connect AI assistants
The API Keys section of Workspace Settings is where you connect AI assistants and the Mammoth CLI, and create API tokens for scripts. Workspace Owners and Workspace Members can use the setup cards and create tokens. Connected apps lists the apps you allowed in, with Revoke.
What's on the API Keys section
Two setup cards sit at the top, with three cards below them:
| Card | What it's for | Who can use it |
|---|---|---|
| Connect an AI assistant | The Mammoth MCP URL for AI assistants | Owners and Members |
| Use the Mammoth CLI | Install and sign-in commands for the CLI | Owners and Members |
| API tokens | Tokens for scripts, integrations and CI | Owners and Members |
| External API keys | Your own AI provider keys, for example OpenAI. See Add your own AI provider key | Owners manage; Members view |
| OAuth apps | Apps that use Sign in with Mammoth. See Register an OAuth app | Owners register and delete |
If your role can't manage API tokens, the section shows only "You can't view or manage API keys in this workspace. Contact the Workspace Owner."
AI assistants and the CLI sign in with your Mammoth account, and you choose their projects. Keep API tokens for CI and scripts.
Connect an AI assistant to Mammoth with MCP
The Connect an AI assistant card ("No key needed") reads "Add this URL to your assistant, then sign in to Mammoth when asked." Click it to expand. It shows the Mammoth MCP URL, https://mcp.mammoth.io/mcp, with Copy URL, and a setup step and Setup guide link for each client:
| Client | Step shown |
|---|---|
| Claude (web and desktop) | Add a custom connector in Claude's Connectors settings and paste the URL. |
| Claude Code | Run claude mcp add --transport http mammoth https://mcp.mammoth.io/mcp in your terminal. |
| Cursor | Add a new MCP server in Cursor's settings and paste the URL. |
| VS Code | Run "MCP: Add Server" from the Command Palette, choose HTTP, and paste the URL. |
| ChatGPT | Add Mammoth as a custom connector in ChatGPT's connector settings and paste the URL. |
When the assistant connects, you choose the workspace and projects it can use on a consent screen. For the full setup, see Mammoth MCP server.
Sign in to the Mammoth CLI
The Use the Mammoth CLI card ("No key needed") is for running Mammoth from a terminal, or letting a coding agent like Claude Code run it for you. Click it to expand; each command has a Copy button.
- Install: run the install command shown in your terminal.
- Sign in: run
mammoth auth login --method oauth. It opens your browser to sign in, and you choose which projects the CLI can use. - Check it: run
mammoth doctorto check the sign-in.
On a machine with no browser, use mammoth auth login --device instead. The card ends with "Running it in CI or a scheduled job? Create an API key below." and a CLI guide link. See Authentication.
Create an API token
API tokens are "For scripts, integrations and CI. AI assistants and the CLI sign in instead." A token starts with mm_ and is sent as Authorization: Bearer mm_....
- In the API tokens card, click Generate key.
- In Create API key, enter a Name you'll recognise, for example ETL pipeline - production.
- Optionally tick Project scoped and select a project. "A token works in every project in this workspace unless you scope it."
- Click Create key.
- In API key created, click Copy secret, store the secret, then click Done.
The key appears in the API tokens card, newest first, with its creator, created date and project scope ("All projects" when unscoped).
Danger: Save the secret before closing
"After this dialog closes, the secret is gone. Copy and store it somewhere safe." To replace a compromised key, remove it and generate a new one.
Tick Project scoped when an integration targets one project: the token then can't reach other projects, even if the secret leaks. For request examples and the base URL, see API authentication.
Edit, remove or copy an API token
Each row shows the last four characters of the key. Its menu offers:
| Option | What it does |
|---|---|
| Edit | Opens Edit token to rename the key or change its project scope |
| Remove | Asks "Are you sure you want to delete this token?" Apps using it stop working |
| Copy key | Legacy tokens only: copies the key |
With legacy tokens, the card shows "Legacy tokens will stop working very soon. Replace them with a new token." With no tokens, it shows "You don't have any generated tokens".
See and revoke connected apps
The Connected apps section of Workspace Settings lists third-party apps you allowed to access your Mammoth data: "Each connection is limited to the project you chose, or covers all your projects." Everyone can open it. The Connect an AI assistant card sits below the list, always open.
Each row shows the app, its access (Read only or Read and change), its projects and when you connected it. With none, you see "You haven't connected any apps yet." Click Revoke to remove an app's access: "The app loses access immediately, including to anything it is doing right now. You can connect it again from the app."
Limits
| Item | Limit |
|---|---|
| API token secret | Shown once only |
Related
- Add your own AI provider key: OpenAI, Anthropic, Google or xAI keys.
- Register an OAuth app: Sign in with Mammoth.
- Security: how tokens and sessions are protected.
- Workspace settings: General and Email groups: the other Settings sections.
Something wrong? support@mammoth.io