# Install the DiceyTable MCP bridge

> You need Node.js 20.19 or newer, an API key and an MCP app. Your app runs the bridge from npm with npx; save your key once with login, then add the bridge.

- Question: What do I need to install the DiceyTable MCP bridge?
- Source: https://diceytable.com/docs/ai-agents/setup/install
- Last verified: 2026-10-09

You need Node.js 20.19 or newer, a DiceyTable API key and an MCP app. There's nothing to download by hand. Your app runs the bridge from npm with `npx -y @diceytable/mcp-bridge@1`, so you save your key once with `login` and then tell your app about the bridge.

The bridge is the small program that links your agent to a DiceyTable tab. [How the DiceyTable MCP bridge works](https://diceytable.com/docs/ai-agents/concepts/how-it-works) shows what it does once it's running.

## What you'll need

- **Node.js 20.19 or newer.** The bridge is a Node.js program, and `npx` comes with Node.js. Run `node --version` to check.
- **A DiceyTable account.** Sign in at `diceytable.com` in the browser you'll pair.
- **An API key.** Make one in [Settings ▸ AI agents](https://diceytable.com/play/settings#ai-agents). [Create an API key for your AI agent](https://diceytable.com/docs/ai-agents/setup/api-keys) walks through it.
- **An MCP app** that can run a local MCP server. The next section lists the ones we've tested.
- **A supported browser.** Chrome or Edge 147 or newer, or Firefox 153 or newer, connect straight to the bridge. Safari connects through DiceyTable's relay.

Agent access is free on every plan.

## Save your key with `login`

Run this in a terminal:

```sh
npx -y @diceytable/mcp-bridge@1 login
```

Paste your key at the hidden prompt and press Enter. The bridge checks the key with DiceyTable. Then it prints your account, the key's name, its permissions and when it expires. If the key is wrong or revoked, it says so and saves nothing.

The bridge saves the key in your user folder, where only you can read it:

- **Windows:** `%APPDATA%\diceytable\credentials.json`
- **macOS and Linux:** `~/.config/diceytable/credentials.json`, or under `$XDG_CONFIG_HOME` if you set it

Because the key lives there, your app's settings never need to hold it. You can use the `DICEYTABLE_TOKEN` environment variable instead, and it wins over the file.

> **⚠ Never paste a key into a config file.** Settings files often end up in a shared repository, and a key there is a leaked key. Use `login`, or your app's own way of reading a variable.

## Which MCP apps does it work with?

Pick your app for its exact setup steps:

- [Claude Code](https://diceytable.com/docs/ai-agents/setup/claude-code): one `claude mcp add` command.
- [Claude Desktop](https://diceytable.com/docs/ai-agents/setup/claude-desktop): one entry in `claude_desktop_config.json`.
- [Cursor](https://diceytable.com/docs/ai-agents/setup/cursor): one entry in `.cursor/mcp.json`.
- [VS Code with Copilot](https://diceytable.com/docs/ai-agents/setup/vs-code): one entry in `.vscode/mcp.json`.

Name the server `diceytable` in every app. Claude Code then shows the tools as `mcp__diceytable__<tool>`, and our [agent instructions](https://diceytable.com/docs/ai-agents/workflows/agent-instructions) use that name.

### Any other MCP app

Other apps that run local MCP servers work too, such as Codex, Windsurf, Gemini CLI and Kiro. Set up a **stdio** server, which means the app starts a program and talks to it through its text input and output. The program to run is:

```sh
npx -y @diceytable/mcp-bridge@1
```

The bridge writes its logs to the error stream only, so its logs can't get mixed into the agent's messages. It reads the key from the `login` file or from `DICEYTABLE_TOKEN`. Any options go after the package name. The [bridge command line reference](https://diceytable.com/docs/ai-agents/reference/bridge-cli) lists them all.

## Do I need to turn on WebMCP?

No. WebMCP is a browser feature for AI agents built into the browser itself. The bridge doesn't use it, so leave any WebMCP flag alone. [In-browser AI agents (WebMCP)](https://diceytable.com/docs/ai-agents/setup/webmcp) covers that other path.

## Staying up to date

The `@1` in the command means "the newest 1.x release". Every 1.x bridge works with the current DiceyTable site. If the site ever needs a newer bridge, the tab says *Your DiceyTable bridge is too old* and names the command to run.

## If it doesn't work

Run the bridge's self-check:

```sh
npx -y @diceytable/mcp-bridge@1 doctor
```

It checks your Node.js version, the five ports the bridge uses, your key, the connection to DiceyTable and your computer's clock. It also prints tips for each browser. Then see [Fix an agent that won't connect](https://diceytable.com/docs/ai-agents/troubleshooting/connection).

## Next steps

- [Pair a DiceyTable tab with your agent](https://diceytable.com/docs/ai-agents/setup/pairing): type the code and allow the agent in.
- [Allow local network access for the bridge](https://diceytable.com/docs/ai-agents/setup/local-network-access): the browser prompt you'll see the first time.
- [Check your agent is connected](https://diceytable.com/docs/ai-agents/setup/verify): three quick calls that prove it all works.
