Bitburner MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install
npm run build
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add bitburner-mcp-server -- node "<FULL_PATH_TO_BITBURNER_MCP_SERVER>/dist/index.js"

Replace <FULL_PATH_TO_BITBURNER_MCP_SERVER>/dist/index.js with the actual folder you prepared in step 1.

README.md

MCP server and local HTTP API bridge for the Bitburner Remote API.

Bitburner MCP Server

MCP server and local HTTP API bridge for the Bitburner Remote API.

Features

  • WebSocket listener for Bitburner Remote API
  • REST API for remote method calls and file helpers
  • MCP stdio server with one tool per remote API method
  • MCP Streamable HTTP server
  • Local dashboard for connection status and events

Requirements

  • Node.js 20+
  • Bitburner Remote API configured to connect to this server:
    • Host: localhost
    • Port: 12525
    • TLS/WSS: disabled (ws)

Install

npm install
npm run build

Run

# REST API + dashboard
npm run start:api

# MCP stdio transport
npm run start:mcp

# MCP Streamable HTTP transport
npm run start:mcp:http

MCP Client Setup

For stdio clients, point your MCP config to:

dist/mcp-server.js

For Streamable HTTP clients, use:

http://localhost:3003/mcp

Environment Variables

  • BB_WS_HOST default: 0.0.0.0
  • BB_WS_PORT default: 12525
  • BB_API_PORT default: 3001
  • BB_API_BASE_URL default: http://localhost:3001
  • BB_DASHBOARD_HOST default: 127.0.0.1
  • BB_DASHBOARD_PORT default: 3002
  • BB_MCP_HTTP_HOST default: 127.0.0.1
  • BB_MCP_HTTP_PORT default: 3003
  • BB_MCP_HTTP_PATH default: /mcp
  • BB_API_TOKEN optional bearer token for API and MCP endpoints

API Overview

Health and dashboard:

  • GET /health
  • GET /dashboard
  • GET /api/dashboard/events
  • GET /api/dashboard/status
  • GET /api/docs/remote-api
  • GET /api/docs/globals

Remote API proxy endpoints:

  • POST /api/remote/pushFile
  • POST /api/remote/getFile
  • POST /api/remote/deleteFile
  • POST /api/remote/getFileNames
  • POST /api/remote/getAllFiles
  • POST /api/remote/calculateRam
  • POST /api/remote/getDefinitionFile
  • POST /api/remote/getSaveFile
  • POST /api/remote/getAllServers

Convenience file endpoints:

  • GET /api/file/:filename?server=home
  • POST /api/file/write
  • POST /api/file/append
  • POST /api/file/upload
  • DELETE /api/file/:filename?server=home
  • GET /api/files?server=home&path=.

Docs

  • docs/ARCHITECTURE.md
  • docs/MCP_AI_GUIDE.md
  • docs/REMOTE_API_TOOLS.md

Tools (5)

pushFilePushes a file to the Bitburner game environment.
getFileRetrieves the content of a file from the game.
deleteFileDeletes a file from the game environment.
getFileNamesLists all file names on a specific server.
calculateRamCalculates RAM usage for a script.

Environment Variables

BB_WS_HOSTWebSocket host for Bitburner Remote API
BB_WS_PORTWebSocket port for Bitburner Remote API
BB_API_TOKENOptional bearer token for API and MCP endpoints

Configuration

claude_desktop_config.json
{"mcpServers": {"bitburner": {"command": "node", "args": ["/path/to/bitburner-mcp-server/dist/mcp-server.js"]}}}

Try it

List all files currently stored on my home server in Bitburner.
Read the content of the script 'hack.js' from my home server.
Create a new script named 'auto-hack.js' with a basic hacking loop.
Calculate the RAM requirements for my current hacking script.
Delete the old log file 'debug.txt' from the home server.

Frequently Asked Questions

What are the key features of Bitburner MCP Server?

WebSocket listener for Bitburner Remote API. REST API for remote method calls and file helpers. MCP stdio server with one tool per remote API method. MCP Streamable HTTP server. Local dashboard for connection status and events.

What can I use Bitburner MCP Server for?

Automating script deployment and management within Bitburner. Using AI to debug or refactor game scripts directly from the IDE. Monitoring game state and events via a local dashboard. Programmatically interacting with game files using natural language.

How do I install Bitburner MCP Server?

Install Bitburner MCP Server by running: npm install && npm run build

What MCP clients work with Bitburner MCP Server?

Bitburner MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Bitburner MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare