---
title: Use BPM from your AI
project: BPM
version: 1.0
section: guides
language: en
license: Total.js Enterprise
url: https://totaljs.es/docs/bpm/1-0/guides/use-bpm-from-your-ai/
updated: 2026-11-20T18:44:31.290Z
---

# Use BPM from your AI

> Connect your AI app to BPM with a personal token and work with your tasks from it.

Connect your AI app to BPM and ask it about your work: what waits for you, what a request says, who has a task. The AI can also claim tasks, start processes and fill in forms for you. It works with your tasks and your permissions, through BPM's MCP server.

## Before you start

You need the permission **MCP access** (`mcp`), or to be the administrator. Then **MCP access** appears in the menu. With Total.js OpenPlatform, the administrator of OpenPlatform gives the permission. See [Permissions](../permissions/).

Your AI app also needs to reach the address of BPM, for example `https://bpm.example.com`.

## Create a personal token

1. Open **MCP access**.
2. Select **Create token**.
3. Enter a **Name** that tells you where you use it, for example `My laptop`.
4. Choose the **Expiration**: 7 days, 30 days, 90 days or 1 year.
5. Select **CREATE**.
6. Select **Copy token** and keep the token in a safe place. BPM shows it only once.

![The Create token window](/files/JauEt31gV61f.webp)

The screen shows the address of the MCP server of your BPM and your tokens, with the date when each one expires and when it was last used.

![MCP access with the address of the MCP server and two tokens](/files/JauEt51hV60f.webp)

Create one token for each AI app, so that you can revoke one without touching the others.

## Revoke a token

1. Open **MCP access**.
2. Select **Revoke** next to the token and confirm.

The AI app that uses it stops working with BPM at once. An expired token stops working too: create a new one.

A token gives the AI your permissions of the moment when you created it. With OpenPlatform, BPM updates them every time you sign in to BPM, so a permission that you lose also leaves your tokens. If you lose the permission **MCP access**, your tokens stop working.

## Add BPM to your AI app

Every app needs two things:

- The address of the server: the address of your BPM followed by `/$mcp/`, for example `https://bpm.example.com/$mcp/`. **MCP access** shows yours.
- The header `Authorization: Bearer <your token>`.

In the examples, replace the address with yours and `YOUR_TOKEN` with your token.

### Claude Code

In a terminal, inside your project:

```bash
claude mcp add --transport http bpm https://bpm.example.com/$mcp/ --header "Authorization: Bearer YOUR_TOKEN"
```

Then run `/mcp` in Claude Code to check the connection.

### Claude

In Claude, open **Customize**, then **Connectors**, and choose **Add custom connector**. Paste the MCP address of your BPM, choose **No sign in** under Authentication, and add your token under **Request headers**:

```text
Authorization: Bearer YOUR_TOKEN
```

BPM then appears in the tools of your conversations.

### Codex CLI

Add it to `~/.codex/config.toml`:

```toml
[mcp_servers.bpm]
url = "https://bpm.example.com/$mcp/"
http_headers = { "Authorization" = "Bearer YOUR_TOKEN" }
```

The Codex IDE extension shares this configuration.

### Cursor

Add it to `.cursor/mcp.json` in your project, or to `~/.cursor/mcp.json` for every project:

```json
{
  "mcpServers": {
    "bpm": {
      "url": "https://bpm.example.com/$mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}
```

### GitHub Copilot in VS Code

In VS Code, add it to `.vscode/mcp.json` in your project. VS Code asks for the token the first time and keeps it for you:

```json
{
  "inputs": [
    { "type": "promptString", "id": "bpm-token", "description": "BPM token", "password": true }
  ],
  "servers": {
    "bpm": {
      "type": "http",
      "url": "https://bpm.example.com/$mcp/",
      "headers": {
        "Authorization": "Bearer ${input:bpm-token}"
      }
    }
  }
}
```

Then ask your questions in the Copilot chat.

### Copilot CLI

Create the file `~/.copilot/mcp-config.json` with this content:

```json
{
  "mcpServers": {
    "bpm": {
      "type": "http",
      "url": "https://bpm.example.com/$mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}
```

Then start Copilot CLI in a terminal and ask your questions.

### Gemini CLI

Add it to `~/.gemini/settings.json`, or to `.gemini/settings.json` in your project:

```json
{
  "mcpServers": {
    "bpm": {
      "httpUrl": "https://bpm.example.com/$mcp/",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}
```

Run `gemini mcp list` to check the connection.

### Zed

Write it in your settings file:

```json
"context_servers": {
  "bpm": {
    "url": "https://bpm.example.com/$mcp/",
    "headers": {
      "Authorization": "Bearer YOUR_TOKEN"
    }
  }
}
```

### ChatGPT

ChatGPT cannot send a token to a custom server, so it cannot connect to BPM for now.

## What the AI can do

The AI sees only the tools that your permissions allow, and every tool checks your permissions again.

| Tool | What it does | Permission |
|---|---|---|
| `Tasks_mine` | Your open tasks, with the step and the expiration. | `inbox` |
| `Tasks_waiting` | The open tasks that nobody has yet and that you may claim. Together with `Tasks_mine`, the same tasks as your [Inbox](../inbox/). | `inbox` |
| `Tasks_read` | A task: its process, its step, who has it, when it expires and the values of its forms. | `inbox` or `tasks` |
| `Tasks_history` | The history of a task. | `inbox` or `tasks` |
| `Tasks_search` | Search tasks by words (also in the values of their forms), process, status and dates. | `inbox` or `tasks` |
| `Tasks_claim` | Take a task, as **Assign** in the Inbox. | `inbox` |
| `Tasks_release` | Give back a task that you have, so that it waits again for everybody who may work on it. With `tasks`, any task. | `inbox` |
| `Tasks_people` | The people to whom you may give a task. See [Assign a task to a person](../assign-tasks/). | `inbox` or `tasks` |
| `Tasks_assign` | Give a task to a person. | `inbox` or `tasks` |
| `Tasks_comment` | Add a comment to a task. See [Comments and attachments](../comments-and-attachments/). | `inbox` or `tasks` |
| `Tasks_attachments` | The files of a task, with the link where you download each one in BPM. | `inbox` or `tasks` |
| `Tasks_form` | The fields and the buttons of the form where a task waits. | `inbox` |
| `Tasks_submit` | Send the form of a task that you have, with a button and the values. | `inbox` |
| `Tasks_approve` | Approve a task that you have at an [approval step](../approvals/), with a comment. | `inbox` |
| `Tasks_reject` | Reject a task that you have at an approval step, with a comment. | `inbox` |
| `Tasks_cancel` | Cancel an open task. | `tasks` |
| `Processes_startable` | The processes that you may start, with the fields of their first form. | `inbox` |
| `Processes_start` | Start a process with the values of its first form. | `inbox` |
| `Substitutes_list` | Your substitutes, and the people for whom you are the substitute. See [Substitutes](../substitutes/). | `inbox` |
| `Substitutes_create` | Set a substitute for the days when you are away. | `inbox` |
| `Substitutes_remove` | Remove one of your substitutes. | `inbox` |
| `Reports_summary` | The [report](../reports/) of the tasks that you may read: started, closed, open, overdue, the time per process and per step, where tasks wait. It only reads. | `reports` |

With the permission `tasks`, the AI reads and searches all tasks, as in [Tasks](../tasks/). Without it, the AI reads the tasks that you have, created or worked on, and the tasks that wait for you. While you are the substitute of a person who is away, the AI also sees and takes their open tasks, as your Inbox does.

The AI cannot design processes, forms, templates or components, and cannot change settings.

Everything that the AI does appears in the history of the task with the badge **via MCP**, next to your name. See [Tasks](../tasks/).

![The history of a leave request that was created, approved and closed from an AI](/files/JauEt71iV61f.webp)

Examples of what you can ask:

```plaintext
What is waiting for me in BPM?
Show me the leave requests that I approved this month.
Which step of the purchase requests took the longest last month?
Claim the oldest leave request, approve it with the comment "Enjoy" and tell me what happens next.
Start a leave request for a family visit.
```

## Forms that a person sends

The designer of each process decides, form by form, whether an AI may send it. See **An AI may send this form** in [Workflow actions](../workflow-actions/).

The same choice applies to the approvals with `Tasks_approve` and `Tasks_reject`.

When a form needs a person, the AI does not send it. It gives you a link instead:

1. Open the link in the browser where you use BPM.
2. The form opens in the [Inbox](../inbox/) with the values that the AI prepared.
3. Check the values, change them if you want, and send the form with its button.

A link works only for you and for 7 days.

## MCP Code Mode

Your AI can answer big questions in one go: it writes a small program that calls the tools of BPM for it, and only the result reaches the conversation. Answers come faster and spend far fewer tokens, for example when you ask for a summary of all your tasks by process and step.

It works with AI agents that can run code on your computer, for example Claude Code, Codex CLI, Cursor or Gemini CLI. Nothing to set up: when your AI connects, BPM tells it how to use it. If you want to ask for it, one sentence is enough:

```plaintext
Use MCP Code Mode of BPM to count my open tasks by process and step.
```

The program uses `https://bpm.example.com/$mcp/client.js`, which BPM builds for your token with the tools that you may use. Your AI downloads it with the same token.
