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

# MCP keys

> Create, use and revoke the personal keys that connect AI assistants to your Prefer workspace.

An MCP key connects an AI assistant to your Prefer workspace. It reads Prefer data as you, with your access, and never changes anything.

## Create a key

**1. Open MCP**

In Prefer, open **MCP** under **Integrations** in the left navigation, then the **Keys** tab. The page is the same from every project in the workspace.

**2. Create the key**

Click **Create key**. Name it after where it goes, for example "v0 for the main site", so you can tell your keys apart. Choose when it expires: after 30, 90, 180 or 365 days, or never.

**3. Copy it now**

Prefer shows **Your new MCP key** once. Click **Copy key** and paste it into your assistant straight away. If you lose it, revoke it and create another.

Then follow the guide for your assistant: [Claude Code](https://tryprefer.com/docs/ai-assistants/connect-claude-code.md), [Cursor](https://tryprefer.com/docs/ai-assistants/connect-cursor.md) or [v0](https://tryprefer.com/docs/ai-assistants/connect-v0.md). Any client that sends a header uses it the same way:

```
Authorization: Bearer <MCP key>
```

## What a key can read

* **One workspace:** the workspace you created it in, and every project in it you can open in the console.
* **Your access:** if you leave the workspace, the key reads nothing more.
* **Read only:** assistants can ask about your data, never change it.

## Who can create keys

Anyone in the workspace who can manage integrations can create keys, on any Prefer plan or during the free trial. Each person can hold up to 20 active keys per workspace. Workspace owners and admins see every key in the workspace and can revoke any of them.

## Revoke a key

On the **MCP** page, **Keys** tab, click **Revoke** next to it, then **Revoke key**. The next request made with that key is refused. Revoke a key as soon as it is no longer needed, or if it may have been shared by mistake.

## Keep keys safe

* Treat a key like a password. Keep it out of shared documents, chat messages and screenshots.
* Never commit a key to a repository. Where a client supports it, keep the key in an environment variable and refer to it from the config, as the [Cursor guide](https://tryprefer.com/docs/ai-assistants/connect-cursor.md) shows.
* Use one key per place it lives, so revoking one never interrupts the others.


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