# Connect an AI assistant with the MCP server

> Create a personal access token in Settings, then connect the Jogan MCP server to Claude, Cursor or another AI assistant so it can read and update your workspace for you — from Jogan's hosted server, or one running on your own machine.

_Category: Integrations · Updated 2026-10-18 · Canonical: https://jogan.cloud/help/connect-ai-assistant-with-mcp_

Jogan ships a Model Context Protocol (MCP) server, so an AI assistant can work with your workspace directly. Ask it to list low stock, record a purchase, run a recipe, or explain this month's profit, and it does it through the same API the app uses. You connect it once with a personal access token, and from then on it acts as your user with your role.

## What you can do with it

- Read items, recipes, stock movements, sales, production runs and batches.
- Ask for reports: sales, profit, inventory, stock movements and expiry.
- Record a sale, a purchase, a stock adjustment, a production run or a batch write-off.
- Create and update items and recipes.
- Check and change the workspace name, currency and language.

It cannot delete anything. Removing an item, recipe, sale or production run cascades through your stock history, so it stays in the app, where an admin confirms it first.

A token also cannot touch your account or billing: it cannot create more tokens, add or change team members, change passwords, or pay for or change your plan. Those need you signed in to Jogan itself, so a token that leaks can be shut off for good by revoking it.

Your plan's limits apply the same as in the app: creating an item or recipe past the limit is refused with a "Plan limit reached" message the assistant passes on.

## Create a token

1. Open **Settings** and switch to the **API tokens** tab.
2. Click **Create token** and give it a name, for example `Claude Desktop`.
3. Copy the value it shows. It starts with `jgn_`.

That value is shown once. Jogan stores only a scrambled fingerprint of it, so if you lose it, revoke it and create another.

A token belongs to the workspace you created it in, so the same token works with both ways of connecting below.

## Use the hosted server (nothing to install)

Jogan runs the MCP server for you at `https://mcp.jogan.cloud`. Point a client that supports a remote server at it with your token and there is nothing to install — no Node.js, no `npx`. The token already says which workspace the request belongs to, so the address is the same for everyone.

The hosted endpoint forwards each call to your workspace's API, which is rate-limited per workspace (shared across every token and account in it) to keep one tenant from crowding out the shared API. Calls are also scoped to Jogan origins in the browser.

### Cursor

Add this to `.cursor/mcp.json`, then reload Cursor.

```json
{
  "mcpServers": {
    "jogan": {
      "url": "https://mcp.jogan.cloud",
      "headers": {
        "Authorization": "Bearer jgn_your_token_here"
      }
    }
  }
}
```

### Claude Code

```bash
claude mcp add --transport http jogan https://mcp.jogan.cloud \
  --header "Authorization: Bearer jgn_your_token_here"
```

The exact keys differ between clients, but it is always the same two values: the address, and an `Authorization` header carrying the token. If your assistant only supports a server it starts itself, use the next section.

## Add the server to your assistant (local)

Use this when the assistant has to start the server itself. You need two things: your workspace address, for example `https://yourworkspace.jogan.cloud`, and the token you just copied. The examples install the server on demand, so Node.js has to be on the machine.

### Claude Desktop

Open **Settings**, then **Developer**, then **Edit Config**, and add this to `claude_desktop_config.json`. Restart Claude afterwards.

```json
{
  "mcpServers": {
    "jogan": {
      "command": "npx",
      "args": ["-y", "@jogancloud/mcp"],
      "env": {
        "JOGAN_URL": "https://yourworkspace.jogan.cloud",
        "JOGAN_TOKEN": "jgn_your_token_here"
      }
    }
  }
}
```

### Cursor

Put the same server in `.cursor/mcp.json`, then reload Cursor.

```json
{
  "mcpServers": {
    "jogan": {
      "command": "npx",
      "args": ["-y", "@jogancloud/mcp"],
      "env": {
        "JOGAN_URL": "https://yourworkspace.jogan.cloud",
        "JOGAN_TOKEN": "jgn_your_token_here"
      }
    }
  }
}
```

### Claude Code

Run this once, with your own address and token.

```bash
claude mcp add jogan \
  --env JOGAN_URL=https://yourworkspace.jogan.cloud \
  --env JOGAN_TOKEN=jgn_your_token_here \
  -- npx -y @jogancloud/mcp
```

### OpenCode

Add this to `opencode.json`, then restart OpenCode.

```json
{
  "mcp": {
    "jogan": {
      "type": "local",
      "command": ["npx", "-y", "@jogancloud/mcp"],
      "enabled": true,
      "environment": {
        "JOGAN_URL": "https://yourworkspace.jogan.cloud",
        "JOGAN_TOKEN": "jgn_your_token_here"
      }
    }
  }
}
```

## Check the connection

The MCP Inspector lists the server's tools and lets you call one by hand. Pass your address and token with `-e` so the Inspector hands them to the server.

```bash
npx @modelcontextprotocol/inspector \
  -e JOGAN_URL=https://yourworkspace.jogan.cloud \
  -e JOGAN_TOKEN=jgn_your_token_here \
  npx -y @jogancloud/mcp
```

Open the address it prints, then try `list_items`.

For the hosted server instead, pick **Streamable HTTP** as the transport and enter `https://mcp.jogan.cloud` with an `Authorization` header of `Bearer jgn_your_token_here`.

## What each role can do

The token carries your role, and Jogan enforces it on every request.

| Your role | Through the assistant |
| --- | --- |
| Admin | Read and write |
| Member | Read and write |
| Read-only | Read only |

A member and an admin get the same tools here.

## For admins

The **API tokens** tab also lists every token in the workspace, whoever created it. If a teammate leaves or a token is exposed, revoke it there and that tool loses access immediately. The hosted server is shared, but a token only ever reaches the workspace it was created in.

If you ever change your workspace's address, its tokens are revoked and you will need to create a new one.

## Keep the token safe

Treat a token like a password, because that is what it is. Do not paste it into a shared document or a public repository. You can revoke it any time from **Settings → API tokens**, and the tools stop working at once. The last used time is shown next to each token, so you can spot one that has gone quiet.

If you are unsure what a role can do, see [Team roles explained](https://jogan.cloud/help/team-roles-explained).
