# Add the DiceyTable MCP server to Cursor

> Add a diceytable entry to .cursor/mcp.json for one project or ~/.cursor/mcp.json for all of them, then switch it on under Customize in Cursor.

- Question: How do I add the DiceyTable MCP server to Cursor?
- Source: https://diceytable.com/docs/ai-agents/setup/cursor
- Last verified: 2026-10-09

Add a `diceytable` entry to `.cursor/mcp.json` in your project, and Cursor starts the DiceyTable bridge whenever its agent needs it. The entry is short, and it never holds your key.

The bridge is the small program that links Cursor's agent to a DiceyTable tab in your browser. It comes from npm, so there is nothing to download by hand.

## What you'll need

- **Cursor**, up to date.
- **Node.js 20.19 or newer.** Run `node --version` in a terminal to check.
- **A saved key.** Run `npx -y @diceytable/mcp-bridge@1 status`. It should name your account and your key. If it doesn't, follow [Create an API key for your AI agent](https://diceytable.com/docs/ai-agents/setup/api-keys), then save it with `login` as [Install the DiceyTable MCP bridge](https://diceytable.com/docs/ai-agents/setup/install) shows.

## Step 1: Add the entry to mcp.json

Create `.cursor/mcp.json` in your project folder, or open it if it's already there. Add `diceytable` inside `mcpServers`:

```json
{
  "mcpServers": {
    "diceytable": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@diceytable/mcp-bridge@1"]
    }
  }
}
```

Cursor needs the `"type": "stdio"` line, so keep it. If other servers are already listed, keep them too and add a comma between entries.

The file holds no key, because the bridge reads the one that `login` saved. That makes it safe to commit, so your team gets the same setup. Each person saves their own key.

## Should it work in one project or all of them?

`.cursor/mcp.json` inside a project works in that project only. To use DiceyTable everywhere, put the same entry in `~/.cursor/mcp.json` in your home folder instead.

## Step 2: Switch it on and check it

Open **Customize** in Cursor's sidebar and find `diceytable` in the list of MCP servers. Make sure its toggle is on. Its tools should appear under it.

Cursor's agent uses the tools when a task needs them. You can also ask for one by name. Cursor may ask before it runs a tool, depending on your Run Mode. DiceyTable adds its own check on top. Anything that can't be undone, such as publishing, waits for your click in the tab.

## Step 3: Connect a DiceyTable tab

In the agent chat, ask Cursor to "connect to DiceyTable". It shows you a pairing code. Type that code into a DiceyTable tab, as [Pair a DiceyTable tab with your agent](https://diceytable.com/docs/ai-agents/setup/pairing) shows. Then [check your agent is connected](https://diceytable.com/docs/ai-agents/setup/verify).

## Let the agent use your project's files

The bridge only reads and writes local files inside allowed folders. To be sure your project folder is one of them, add it with `--allow-dir`. Cursor fills in `${workspaceFolder}` with your project's path:

```json
"args": ["-y", "@diceytable/mcp-bridge@1", "--allow-dir", "${workspaceFolder}"]
```

Use this line in the project's `.cursor/mcp.json`. [Which local files an agent can read](https://diceytable.com/docs/ai-agents/concepts/local-file-access) explains the rules.

## Using an environment variable instead of login

`login` is the easiest choice. If you'd rather keep the key in an environment variable, add an `env` line to the entry. It names the variable and never holds the key:

```json
"env": { "DICEYTABLE_TOKEN": "${env:DICEYTABLE_TOKEN}" }
```

Cursor writes it as `${env:NAME}`. Claude Code writes it without `env:`, so don't copy one app's line into the other's file.

> **⚠ Never paste a key into mcp.json.** The file is easy to commit by accident, and a committed key is a published key.

## If it doesn't work

- **Read the log.** Open the Output panel (`Ctrl+Shift+U`, or `Cmd+Shift+U` on a Mac) and pick **MCP Logs** from the list.
- **`diceytable` doesn't show up.** Check the file for a JSON typo, such as a missing comma. Then restart Cursor.
- **You ran `login` after Cursor started.** The bridge reads the key when it starts. Turn the server off and on again in **Customize**.

Still stuck? Run `npx -y @diceytable/mcp-bridge@1 doctor` in a terminal, then see [Fix an agent that won't connect](https://diceytable.com/docs/ai-agents/troubleshooting/connection).

To remove DiceyTable, delete its entry from `mcp.json`. To pause it instead, turn it off in **Customize**. [Disconnect, revoke or remove the agent](https://diceytable.com/docs/ai-agents/setup/uninstall) covers your key too.

## Next steps

- [Pair a DiceyTable tab with your agent](https://diceytable.com/docs/ai-agents/setup/pairing): type the code and read the consent dialog.
- [Check your agent is connected](https://diceytable.com/docs/ai-agents/setup/verify): three quick calls that prove it all works.
- [Instructions to give your AI agent](https://diceytable.com/docs/ai-agents/workflows/agent-instructions): a starting prompt that keeps the agent on track.
