> For the complete documentation index, see [llms.txt](https://docs.gaiodataos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gaiodataos.com/settings/mcp-api-keys.md).

# MCP API Keys

The **MCP API Keys** section lets you create and manage secure access keys used by MCP tools and integrations within Gaio DataOS. These keys control which projects can access MCP-enabled capabilities and external integrations.

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FYjnG66QULsUTFTnDM3OT%2Fmcp-api-keys.png?alt=media&amp;token=27e52ddc-07cf-4712-b063-44541a5c8222" alt=""><figcaption></figcaption></figure>

***

## What is an MCP API Key?

An **MCP API Key** is a project-scoped authentication token used to:

* Authorize MCP tools
* Enable secure communication between Gaio and external MCP-compatible services
* Control access at the project level

Each key can be:

* Enabled or disabled individually
* Renewed (rotated)
* Assigned to one or more projects (API Tool) or to a single project (Studio Tools)

## Key types

When creating a key, choose the **Type**:

| Type             | Projects                                                                 |
| ---------------- | ------------------------------------------------------------------------ |
| **API Tool**     | One or more projects, assigned through the badge **Projects**            |
| **Studio Tools** | A single project, chosen at creation. The key only accesses that project |

The **Type** column in the list shows the type of each key.

***

## Viewing Existing MCP API Keys

Go to:

**Settings → MCP API Keys**

On this screen, you will see the following columns:

#### ID

Internal identifier of the key.

#### Status

Indicates whether the key is:

* **Active** – It can be used normally
* **Inactive** – It is disabled

#### Name

Descriptive name of the key (e.g. OpenAI, Internal MCP, Automation Key).

#### Type

Key type: **API Tool** or **Studio Tools**.

#### Token

Secret value used for authentication.

* Tokens are hidden by default
* You can click **Renew** to generate a new token

#### Projects

Number of projects where the key is enabled.

***

## Creating a New MCP API Key

1. Click **New**.
2. Enter the **MCP API Key Name**, a descriptive name for the key.
3. Leave the status toggle on if you want the key to be active immediately.
4. Choose the **Type**: **API Tool** or **Studio Tools**.
5. If the type is **Studio Tools**, choose the **Project**. The key only accesses that project.
6. Click **Add**.

The key is generated automatically.

***

## Assigning Projects to an MCP API Key

<figure><img src="https://1671598980-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0muDd0LkZG6CmTQvGQ4D%2Fuploads%2FlAwqo55HH54hfTjp6Dl3%2Fimage.png?alt=media&amp;token=05b78a13-948c-4645-a163-eda4eb070a04" alt=""><figcaption></figcaption></figure>

After creating the key:

1. Click the badge **Projects**
2. Select one or more projects
3. Confirm the assignment

Only the selected projects will be able to use this MCP API Key.

{% hint style="info" %}
Assignment through the **Projects** badge applies to keys of type **API Tool**. A **Studio Tools** key stays tied to the project chosen at creation.
{% endhint %}

***

## Renewing an MCP API Key

If the token is compromised or needs rotation:

1. Find the key in the list
2. Click **Renew**
3. A new token is generated
4. Update the external systems that use this key

{% hint style="danger" %}
Renewing immediately invalidates the previous token.
{% endhint %}

***

## Connecting an agent (Studio Tools)

For keys of type **Studio Tools**, click the key's link icon to open the **Connect an agent** window. It shows the **Connector URL**, in the format `https://<your-domain>/api/mcp/studio`, with a copy button.

{% hint style="warning" %}
The token is only shown when the key is created or renewed. To see the instructions with the token embedded, use **Renew**. Remember that this invalidates the previous token.
{% endhint %}

***

## Editing or Deleting a Key

### Edit

Lets you change:

* Key name
* Assigned projects

### Delete

Permanently removes the key.

Any integration using this key will stop working immediately.

***

## Best Practices

* Use one MCP API Key per integration or purpose
* Assign the key only to the projects that truly need access
* Rotate keys periodically using **Renew**
* Disable or delete unused keys
* Never share tokens in public repositories or client-side code

***

## Security

* MCP API Keys are stored securely and masked in the UI
* Tokens are only shown at creation or renewal time
* Access control is enforced at the project level
* Keys can be revoked instantly by disabling or deleting them

{% hint style="info" %}
The **MCP API Keys** provide a controlled, auditable and secure way to connect Gaio DataOS with MCP tools and external systems.
{% endhint %}
