Skip to content
Depra AI

Docs

Connect your AI app to the Depra AI MCP server

Create a token on the API Keys page, add the server to Claude Code, Cursor, VS Code, Claude Desktop, Codex or another MCP app, manage your tokens, and fix the common errors.

Updated

To connect an AI app, create a personal access token on the API Keys page in Depra AI, then give the app two things: the server address and the token. This page follows the six setup tabs on that page, in the same order: Claude Code, Cursor, VS Code, Claude Desktop, Codex and Other apps.

text
Server address:  https://api.depra.ai/mcp
Header:          Authorization: Bearer YOUR_DEPRA_TOKEN
The two values every app needs. Replace YOUR_DEPRA_TOKEN with your own token.

The server is a remote HTTP MCP server. It answers only while your trial or subscription is active. For what it can read, see the MCP overview.

Note: The commands and config files in the six setup sections below are the ones the API Keys page shows, where every code box has a Copy button. The Windows section is this site's addition, from Microsoft's documentation. Each named app's section also links to documentation for that app, as it read on 8 October 2026. If an app has changed since then and a sample does not work, follow that documentation.

How do I create a personal access token?

You create the token on the API Keys page of the Depra AI app. In the app's sidebar, API Keys sits under Company, next to Settings, Projects, Members and Billing.

  1. 1

    Open API Keys

    Sign in to Depra AI and click API Keys in the sidebar, under Company. The page has two parts: MCP server, with the setup tabs, and Personal Access Tokens.

  2. 2

    Click Create token

    Under Personal Access Tokens, click Create token and copy your new token.

  3. 3

    Keep it safe

    Store the token in a password manager. Use it wherever this page says YOUR_DEPRA_TOKEN.

Warning: A token can read only the projects its creator can access. Keep it secret and do not commit it to git, which means never save it in a code repository. Anyone who has the token can read your Depra AI data through the MCP server, so do not paste it into a chat or a shared file either.

How do I see, revoke or limit tokens?

The Personal Access Tokens part of API Keys lists the tokens. Each token has an expiry date and a Revoke link.

  • The token list: it has the columns Name, Token, Created by, Created, Expires and Last used. Only the start of each token is shown, and every token begins with dpr_pat_. Last used also names the app that last used the token.
  • Expiry: the Expires column shows the date a token stops working. Before then, create a new token and put it in each app that uses the old one.
  • Revoke: the Revoke link on a row revokes that token. The Revoke all my tokens link, under the list, revokes all of your own tokens at once.
  • Members: owners and admins can switch off Members can create tokens and connect apps. When it is off, members cannot create tokens and their tokens stop working. Owners and admins keep access.

If a token may have leaked, revoke it, create a new one and update each app that used it. Roles in a workspace are on workspace and team.

How do I connect Claude Code?

The Claude Code command takes your token from an environment variable named DEPRA_TOKEN. An environment variable is a named value your computer keeps for programs to read.

  1. 1

    Create a token

    Create one on the API Keys page, as described above.

  2. 2

    Add DEPRA_TOKEN to your shell profile

    Add the export line below to your shell profile, for example ~/.zshrc, with your token in place of YOUR_DEPRA_TOKEN. Then open a new terminal. On Windows, see how to set DEPRA_TOKEN on Windows.

  3. 3

    Run the command

    Run the claude mcp add command below in that new terminal, so DEPRA_TOKEN is set when the command runs.

  4. 4

    Test it

    Start Claude Code and ask: List my Depra AI projects.

bash
export DEPRA_TOKEN=YOUR_DEPRA_TOKEN
Step 2: your shell profile on macOS or Linux, for example ~/.zshrc.
bash
claude mcp add --transport http --scope user depra https://api.depra.ai/mcp --header "Authorization: Bearer $DEPRA_TOKEN"
Step 3: run this in a new terminal.

The --scope user option makes the server available in all your projects. Without it, Claude Code adds a server to the current project only. Run claude mcp list to see your servers. Inside Claude Code, type /mcp to check the server status (Claude Code MCP documentation, checked 8 Oct 2026).

How do I connect Cursor?

Cursor reads MCP servers from a file named mcp.json. The app uses ~/.cursor/mcp.json, the copy in your home folder, so the server works in every project.

  1. 1

    Create a token

    Create one on the API Keys page, as described above.

  2. 2

    Open ~/.cursor/mcp.json

    Open the file in a text editor. Create the file if it does not exist.

  3. 3

    Add the server

    Add the block below, with your token in place of YOUR_DEPRA_TOKEN. If mcpServers already exists, add the "depra" block inside it.

  4. 4

    Test it

    Save the file and ask Cursor: List my Depra AI projects.

json
{
  "mcpServers": {
    "depra": {
      "url": "https://api.depra.ai/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_DEPRA_TOKEN"
      }
    }
  }
}
~/.cursor/mcp.json

A file at .cursor/mcp.json inside one project adds the server to that project only. To keep the token out of the file, Cursor can read it from an environment variable: write the header value as Bearer ${env:DEPRA_TOKEN}. By default, Cursor asks for your approval before it uses an MCP tool (Cursor MCP documentation, checked 8 Oct 2026).

How do I connect VS Code?

In VS Code, you ask Copilot Chat about your Depra AI data. The config below does not hold the token: VS Code asks for it when you start the server.

  1. 1

    Create a token

    Create one on the API Keys page, as described above.

  2. 2

    Open your user configuration

    Open the Command Palette and run MCP: Open User Configuration. This opens the mcp.json file in your user profile, so the server works in every workspace.

  3. 3

    Add the server

    Add the config below and save. If servers or inputs already exist, add the "depra" entries inside them.

  4. 4

    Start the server and test it

    Start the "depra" server and paste your token when VS Code asks. Then ask Copilot Chat: List my Depra AI projects.

json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "depra-token",
      "description": "Depra token",
      "password": true
    }
  ],
  "servers": {
    "depra": {
      "type": "http",
      "url": "https://api.depra.ai/mcp",
      "headers": {
        "Authorization": "Bearer ${input:depra-token}"
      }
    }
  }
}
mcp.json in your VS Code user profile

To start the server, use the inline actions VS Code shows above it in mcp.json, or run MCP: List Servers, select the server and choose an action. In chat, the Configure Tools button shows its tools (Add and manage MCP servers in VS Code, checked 8 Oct 2026).

Note: VS Code keeps the token in its secret storage, not in the file. On Copilot Business or Enterprise, an admin may need to allow MCP servers first. VS Code says organisations can manage access to MCP servers centrally (Add and manage MCP servers in VS Code, checked 8 Oct 2026).

How do I connect Claude Desktop?

Claude Desktop connects through mcp-remote, an open-source bridge that lets an app that runs local MCP servers reach a remote one. It runs with npx, a tool that comes with Node.js, so you need Node.js 18 or later.

  1. 1

    Create a token

    Create one on the API Keys page, as described above. Check that Node.js 18 or later is installed.

  2. 2

    Open the config file

    In Claude Desktop, open Settings, then Developer, then Edit Config. This opens claude_desktop_config.json.

  3. 3

    Add the server

    Add the block below, with your token in place of YOUR_DEPRA_TOKEN. If mcpServers already exists, add the "depra" block inside it.

  4. 4

    Restart and test it

    Quit and reopen Claude Desktop, then ask: List my Depra AI projects.

json
{
  "mcpServers": {
    "depra": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote@0.14.3",
        "https://api.depra.ai/mcp",
        "--header",
        "Authorization:${DEPRA_AUTH}"
      ],
      "env": {
        "DEPRA_AUTH": "Bearer YOUR_DEPRA_TOKEN"
      }
    }
  }
}
claude_desktop_config.json, the same on macOS and Windows

This one form works on every operating system. There is no space after Authorization:, and the word Bearer sits in env with the token. The mcp-remote README gives this form because Claude Desktop on Windows does not escape spaces inside args, and suggests -y so that npx installs mcp-remote without asking (mcp-remote on GitHub, checked 8 Oct 2026).

Edit Config creates the file if it is missing. On macOS the file is ~/Library/Application Support/Claude/claude_desktop_config.json, and on Windows it is %APPDATA%\Claude\claude_desktop_config.json. Quit Claude Desktop completely before you open it again, so it loads the new config (Model Context Protocol documentation, checked 8 Oct 2026).

Note: mcp-remote is an open-source bridge. It is not made by Depra AI or Anthropic.

Warning: If Claude shows spawn npx ENOENT, put the full path that which npx prints in place of npx. Run which npx in a terminal, then paste the path it prints into the "command" line of the config.

How do I connect Codex?

Codex reads your token from the DEPRA_TOKEN environment variable, the same one the Claude Code command uses. The Codex config names the variable and does not hold the token.

  1. 1

    Create a token and set DEPRA_TOKEN

    Create one on the API Keys page. Add the export line below to your shell profile, with your token in place of YOUR_DEPRA_TOKEN. On Windows, see how to set DEPRA_TOKEN on Windows.

  2. 2

    Add the server to config.toml

    Add the lines below to ~/.codex/config.toml.

  3. 3

    Test it

    Open a new terminal, start Codex and ask: List my Depra AI projects.

bash
export DEPRA_TOKEN=YOUR_DEPRA_TOKEN
Step 1: your shell profile on macOS or Linux, for example ~/.zshrc.
toml
[mcp_servers.depra]
url = "https://api.depra.ai/mcp"
bearer_token_env_var = "DEPRA_TOKEN"
~/.codex/config.toml

Note: bearer_token_env_var takes the name of the variable, not the token.

Codex reads the token from the variable you name and sends it in the Authorization header. In the Codex terminal app, type /mcp to see your active servers (Codex MCP documentation, checked 8 Oct 2026).

How do I connect another MCP app?

The Other tab on the API Keys page covers apps without a tab of their own. You add the server address and one request header.

  1. 1

    Create a token

    Create one on the API Keys page, as described above.

  2. 2

    Add a remote MCP server

    In your app, add a remote MCP server with the server address https://api.depra.ai/mcp. If it asks for a transport, pick Streamable HTTP.

  3. 3

    Add the header

    Add the request header below, with your token in place of YOUR_DEPRA_TOKEN.

  4. 4

    Test it

    Ask your app: List my Depra AI projects.

text
Authorization: Bearer YOUR_DEPRA_TOKEN
The request header

Note: In Windsurf, the URL key is serverUrl.

claude.ai on the web and ChatGPT cannot connect yet.

How do I set DEPRA_TOKEN on Windows?

The export line on the API Keys page is for macOS and Linux shells. On Windows, the setx command saves the same variable for your user account (setx, Microsoft Learn, checked 8 Oct 2026).

text
setx DEPRA_TOKEN YOUR_DEPRA_TOKEN
Run once in a Command Prompt window, with your token in place of YOUR_DEPRA_TOKEN.

Microsoft says a variable set with setx is available in future command windows only, not in the current one. So open a new terminal before you run the Claude Code command or start Codex, and restart any app that should read the variable.

You can also add the variable by hand. Open the System Control Panel, select System, then Advanced System Settings, the Advanced tab and Environment Variables, and add DEPRA_TOKEN as a User variable. Windows keeps these values across sessions and restarts (about_Environment_Variables, Microsoft Learn, checked 8 Oct 2026).

In PowerShell, an environment variable is written $Env:DEPRA_TOKEN, and PowerShell fills it in inside a double-quoted string (about_Environment_Variables, Microsoft Learn, checked 8 Oct 2026). So if you run the Claude Code command in PowerShell, write $Env:DEPRA_TOKEN where it says $DEPRA_TOKEN. In Command Prompt, write %DEPRA_TOKEN% instead, because Command Prompt replaces a variable name written between percent signs with its value (set, Microsoft Learn, checked 8 Oct 2026). The Codex config needs no change, because Codex reads the variable by its name.

How do I check that it works?

Ask the assistant to list your Depra AI projects. Every other question starts from this list, because every other tool except list_models needs a project id from it.

text
List my Depra AI projects.

The assistant should call the list_projects tool and show each project with its name, domain, markets, own brand, active prompt count and last successful scan. A project with setup_finished false is still in setup and has no tracked data yet.

After that, try a prompt from MCP recipes.

What if it does not connect?

Find what you see in the table below.

Common problems when connecting to the Depra AI MCP server
What you seeLikely causeWhat to do
The app shows a sign-in or authorisation errorThe server did not accept the tokenCheck that the whole token was pasted, and that the header reads Authorization: Bearer, a space, then the token. On API Keys, check that the token has not expired or been revoked. The server also works only while your trial or subscription is active.
A member's token stopped workingAn owner or admin switched off Members can create tokens and connect appsAsk an owner or admin of the workspace. Owners and admins keep access while the switch is off.
claude.ai on the web or ChatGPT cannot add the serverThese two apps cannot connect yetUse Claude Code, Cursor, VS Code, Claude Desktop, Codex or another MCP app.
Claude Code shows the server as failedA wrong or missing token, for example when DEPRA_TOKEN was not set in the terminal where you ran claude mcp addRun claude mcp get depra to see its details. To replace the token, run claude mcp remove depra, open a new terminal where DEPRA_TOKEN is set, then run the add command again.
The Depra AI tools do not appear in VS CodeThe server has not been started, or your organisation has not allowed MCP serversStart the server from mcp.json or with MCP: List Servers. On Copilot Business or Enterprise, ask an admin to allow MCP servers.
Claude Desktop shows spawn npx ENOENTClaude Desktop did not find npxPut the full path that which npx prints in place of npx.
npx shows another error in Claude DesktopNode.js is missing or older than version 18Install Node.js 18 or later, then quit and reopen Claude Desktop.
Codex does not sign inDEPRA_TOKEN is not set where Codex runs, or bearer_token_env_var holds the token instead of the variable nameCheck that config.toml reads bearer_token_env_var = "DEPRA_TOKEN". Set the variable, open a new terminal and start Codex again.
Another MCP app does not connectThe app needs a transport or a different URL keyPick Streamable HTTP if the app asks for a transport. In Windsurf, the URL key is serverUrl.
A project returns no dataIts setup is still open: setup_finished is falseFinish the project setup in Depra AI.
The assistant cannot change a prompt or start a scanThe server is read-onlyChange prompts in the Depra AI app. Scans run on their normal schedule.

Keep reading