> For the complete documentation index, see [llms.txt](https://docs.podigee.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/create-and-use-a-personal-access-token.md). Agents can also search and read this documentation through its [MCP server](https://docs.podigee.com/~gitbook/mcp).

# Create and use a personal access token

Create an MCP personal access token for a CLI, script, or agent that cannot sign in through a browser.

A Model Context Protocol (MCP) personal access token lets a client work with one Podigee account without a browser sign-in. Use a token for an unattended script, or on a computer without a browser. For an interactive assistant, use the browser sign-in. See [Connect your assistant](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/connect-your-assistant.md).

## Before you start

* Have a Podigee account on a Podigee 2026 plan. MCP tokens are part of every Podigee 2026 plan, Launch included.
* Know which Podigee account the token is for. You can choose your own account, or an account that someone shared with you when the plan of that account includes MCP.
* Know which permissions the work needs. See [Choose the account and permissions](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/choose-the-account-and-permissions.md).
* Prepare protected secret storage, for example a password manager or the secret store of your system. Podigee shows the token one time only.

## Create the token

{% tabs %}
{% tab title="Classic view" %}

1. Open **My account** in Podigee.
2. Select **API**.
3. Find **Personal access tokens**.
4. Select **Create MCP token**.
5. In **Name**, enter a name that identifies the client or the script.
6. If **Podigee account** shows, select the account. The field shows only when you can use more than one account.
7. In **Permissions**, select only the permissions that the work needs.
8. Select **Create token**.
9. In the dialog **Token created**, copy the token into protected secret storage.
10. Close the dialog after you stored the secret.

**Expected result:** the token list shows the token with the type **MCP connector**. A token from the classic view stops working after 90 days.
{% endtab %}

{% tab title="Podigee workspace" %}

1. Select your name at the bottom of the sidebar to open the account menu.
2. Select **Data & integrations**, then the tab **API keys**.
3. Select **Create MCP token**.
4. In **What is it for?**, enter a name that identifies the client or the script.
5. Under **What should it be allowed to do?**, select **Read only** or **Read and write**. **Read only** gives the four read permissions. **Read and write** gives all seven permissions.
6. If **Which account?** shows, select the Podigee account. The field shows only when you can use more than one account.
7. Under **How long should it work?**, keep **Until I remove it**, or select **1 year**, **90 days**, or **30 days**.
8. Select **Create token**.
9. In the dialog **Your key is ready**, select **Copy key**. Put the token into protected secret storage. The dialog also shows the MCP server address.
10. Select **I have copied it** after you stored the secret.

**Expected result:** the token list shows the token with the type **MCP**. The column **Stops working** shows **Never** or the end date.
{% endtab %}
{% endtabs %}

The token starts with `pdg_pat_`. Podigee cannot show the complete token again.

To choose single permissions, for example only `mcp:analytics:read`, use the classic view. The Podigee workspace offers only **Read only** and **Read and write**.

## Use the token with an MCP client

Send the token as a bearer token to `https://mcp.podigee.com/mcp`. The client sends this HTTP header with each request:

```
Authorization: Bearer pdg_pat_your_token
```

Codex reads the token from an environment variable:

```sh
export PODIGEE_TOKEN=pdg_pat_your_token
codex mcp add podigee --url https://mcp.podigee.com/mcp --bearer-token-env-var PODIGEE_TOKEN
```

Claude Code reads the token from a stored header:

```sh
claude mcp add --transport http podigee https://mcp.podigee.com/mcp \
  --header "Authorization: Bearer pdg_pat_your_token"
```

A stored header keeps the secret in a configuration file of the client. Use an environment variable or a secret manager when the client supports one. Restart the client after you set the secret.

## Check the token

Ask the client to call `get_me`.

**Expected result:** `auth_method` is `personal_access_token`. `tenant_id` identifies the account that you selected. `scopes` lists the permissions of the token and no others.

**If the result is wrong:** remove the token and create a new one with the correct account and permissions.

## Replace a token before it stops

Podigee sends an email 14 days and 3 days before the end date of an MCP token. Replace a token before its end date. Also replace it when a person or a system that knew it must no longer have access.

1. Create a replacement with the same or fewer permissions.
2. Update the protected secret that the client uses.
3. Make one read-only request with the replacement, for example `get_me`.
4. Remove the old token. See [Manage connected assistants](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/manage-connected-assistants.md).

The permissions of a token do not change after you create it. For more permissions, create a new token.

A browser sign-in does not use a personal access token. It renews through refresh tokens, and the end date of a token does not affect it.

## If the token does not work

* Make sure that you created an MCP token. A REST API key or a REST API token cannot connect to the MCP server.
* Check the end date of the token. An expired token does not work.
* Check the selected account and its plan. The plan of the selected account must include MCP.
* Check the subscription. While the subscription is suspended or canceled, only `doctor` and `find_in_podigee` work.
* A tool refuses the call with `insufficient_scope`: the token does not have a permission that the tool needs. Create a new token with that permission. See [Choose the account and permissions](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/choose-the-account-and-permissions.md).

If a token was exposed, remove it at once and create a replacement. Do not paste a token into a chat message.

## Next step

[Choose the account and permissions](https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/choose-the-account-and-permissions.md) for the smallest useful set of permissions.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.podigee.com/documentation/start-here/ai-agents/connect-and-authorize/create-and-use-a-personal-access-token.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
