> ## Documentation Index
> Fetch the complete documentation index at: https://developers.ailunapro.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create, rotate and revoke MCP keys

> Create, store, rotate and revoke AiLunaPro MCP keys from Settings → Organization, with one key per person and device.

MCP keys are managed by organisation **owners** in **Settings → Organization → AI client access (MCP)**.

![The AI client access (MCP) card with no active keys](https://mintlify.s3.us-west-1.amazonaws.com/ailunapro-mcp/images/mcp/card-empty-light.png)

> [!NOTE]
>
> If you do not see the card, either you are not an owner, or MCP is not enabled for your organisation yet. Contact [AiLunaPro support](https://developers.ailunapro.com/developers/support.md) to request access.

## Create a key

**1. Open the card**

Sign in at [audit.ailunapro.com](https://audit.ailunapro.com) and open **Settings → Organization**. Scroll to **AI client access (MCP)**.

**2. Create and copy**

Click **Create key**, then **Copy key**. The key starts with `alp_mcp_`.

![A newly created key with the Copy key button](https://mintlify.s3.us-west-1.amazonaws.com/ailunapro-mcp/images/mcp/card-key-created-light.png)

**3. Store it, then click Done**

Paste the key into your client's secret storage or an environment variable (see the [client guides](https://developers.ailunapro.com/developers/index.md#connect-a-client)). Click **Done**: the key disappears from the screen and cannot be shown again.

The key then appears in the list with its id (`mk_…`) and creation date.

![The key list showing one active key and its Revoke button](https://mintlify.s3.us-west-1.amazonaws.com/ailunapro-mcp/images/mcp/card-key-listed-light.png)

## Revoke a key

Click **Revoke** next to the key. You see "Key revoked." and the key disappears from the active list. Any client using it receives `401 Invalid or revoked MCP key` on its next request.

Revoke a key when:

* it appeared in a chat, log, screenshot, ticket or repository;
* the device it was on is lost, sold or reinstalled;
* the person using it leaves the organisation or no longer needs it;
* you are not sure which client uses it.

## Rotate a key

Rotation means replacing a key without downtime:

1. **Create** a new key.
2. **Update** the client to use the new key and check it connects.
3. **Revoke** the old key.

You can hold up to **5** active keys, so there is room for the new key before you revoke the old one.

## Recommended setup

| Situation | Recommendation |
| - | - |
| One person, two computers | Two keys, one per computer |
| Several clients on one computer | One key is fine; revoke and rotate them together |
| A teammate needs MCP | They need their own owner access, or you create a key that acts as you; a key always reads the audits of the owner who created it |
| Shared repository | Commit configuration with a placeholder (`${AILUNAPRO_MCP_KEY}`, `${input:…}`), never a key |

## Lost a key?

AiLunaPro cannot show a key again. Create a new one, update your client, and revoke the key you lost.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.