Get started
Use DiceyTable with Copilot in VS Code
Add the DiceyTable bridge to .mcp.json in your VS Code workspace, and GitHub Copilot's agent can build and play-test games in DiceyTable for you.
On this page8 sections
Add a diceytable entry to a .mcp.json file at the root of your workspace. VS Code then starts the DiceyTable bridge for GitHub Copilot's agent whenever it needs DiceyTable's tools.
The bridge is the small program that links Copilot to a DiceyTable tab in your browser. It comes from npm, so there is nothing to download by hand.
What you'll need#
- VS Code with GitHub Copilot, both up to date.
- Node.js 20.19 or newer. Run
node --versionin 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, then save it withloginas Install the DiceyTable MCP bridge shows.
Step 1: Add the entry#
Create .mcp.json in the top folder of your workspace, or open it if it's already there. Add diceytable inside mcpServers:
{
"mcpServers": {
"diceytable": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@diceytable/mcp-bridge@1"]
}
}
}
The file holds no key, because the bridge reads the one that login saved. It's safe to commit, so your team gets the same setup.
This is the shared format that VS Code now prefers. Claude Code reads the same file, so one entry serves both apps. VS Code also accepts its own format, .vscode/mcp.json. That file uses servers in place of mcpServers, with the same entry inside.
VS Code starts the bridge in your workspace folder, so the agent can import files from your project. For other folders, add "--allow-dir", "/full/path" to args. Which local files an agent can read explains the rules.
Can I use it in every workspace?#
Yes. Put the same entry in ~/.copilot/mcp-config.json in your home folder. It uses the same mcpServers format and works in every workspace.
You can also run MCP: Open User Configuration and add the entry there. That file uses VS Code's own format, so name the list servers.
Step 2: Start the server and check it#
VS Code runs servers from a workspace you trust. If the workspace is in Restricted Mode, the server won't start until you trust it.
Open the Command Palette and run MCP: List Servers. Pick diceytable and start it if it isn't running. Then open the Chat view and click Configure Tools in the chat box. The DiceyTable tools should be listed there.
Copilot may ask you to confirm each tool call. 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 Chat view, ask Copilot 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 shows. Then check your agent is connected.
Can VS Code store the key for me?#
It can, but login works in more places. VS Code can ask for the key once and keep it in its own secret storage. This needs VS Code's own format, in .vscode/mcp.json or your user configuration:
{
"inputs": [
{
"type": "promptString",
"id": "diceytable-token",
"description": "DiceyTable access key",
"password": true
}
],
"servers": {
"diceytable": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@diceytable/mcp-bridge@1"],
"env": { "DICEYTABLE_TOKEN": "${input:diceytable-token}" }
}
}
}
There's a catch. VS Code doesn't pass a server that asks for input to Copilot's Agent Host sessions. So with this setup, DiceyTable is missing from those sessions. With login, it works in all of them.
⚠ Never paste a key into an MCP config. Use login or the prompt above. A committed key is a published key.
If it doesn't work#
- Read the log. Run MCP: List Servers, pick
diceytable, and choose Show Output. - You ran
loginafter the server started. The bridge reads the key when it starts. Restart the server from MCP: List Servers.
Still stuck? Run npx -y @diceytable/mcp-bridge@1 doctor in a terminal, then see Fix an agent that won't connect.
To remove DiceyTable, delete its entry, or use MCP: List Servers to turn it off. Disconnect, revoke or remove the agent covers your key too.
Next steps#
- Pair a DiceyTable tab with your agent: type the code and read the consent dialog.
- Check your agent is connected: three quick calls that prove it all works.
- Instructions to give your AI agent: a starting prompt that keeps the agent on track.
