Skip to main content
Glama
Probably Stolen MCP

Probably Stolen MCP

by ctsquire
README.md
# Probably Stolen MCP

A local companion for [Probably Stolen – Cyberpunk Shopkeeper Sim](https://store.steampowered.com/app/4348910/). It works with MCP clients that launch local servers over standard input and output. Reference tools work while the game is closed. Live tools communicate with an installed mod through the game's `ModData` folder and use the game's own methods.

| Tool | What it does |
| --- | --- |
| `search_wiki` | Finds items, characters, mechanics, and guides on the [Probably Stolen Wiki](https://probablystolen.wiki.gg/). |
| `get_wiki_page` | Returns item facts, section links, excerpts, and sample table rows. Pass `section` to focus on a heading such as `Obtaining`. |
| `get_install_info` | Checks the configured game folder, finds Steam, and reports where achievement definitions will be read from. |
| `list_achievements` | Reads achievement definitions from Steam’s local cache. Set `includeHidden` to `true` to allow hidden entries. |
| `get_live_shop` | Reads day, credits, customer, available actions, and after-hours status, including departure blockers and search risks. |
| `call_next_customer` | Calls a customer when the game allows it. Requires the active shop token from `get_live_shop`. |
| `dismiss_current_customer` | Dismisses the customer at the counter. Requires the shop and customer tokens from `get_live_shop`. |
| `report_current_customer` | Uses the counter alarm on the current customer. An optional reason checks for stolen goods or serious contraband first. |
| `shotgun_action` | Equips, fires, or holsters the shop shotgun. Equipping and firing require the current customer token. |
| `list_live_inventory` | Lists owned shop items and containers, or ground loot, pockets, and backpack storage at the Dumping Ground. |
| `move_item` | Moves a whole item stack or a specified quantity to a different listed container when a legal slot is available. |
| `shop_day_action` | Closes the morning report, opens or closes the shop, or sleeps and saves. |
| `complete_trade` | Completes the currently negotiated purchase or sale, guarded by customer token and expected price. |
| `select_customer_offer` | Moves a seller’s offered item to the scale or selects an item already on the scale. |
| `dialogue_action` | Advances the current line or selects a displayed response. |
| `pay_rent` | Selects the Landlord’s pay-rent response at the quoted amount. |
| `buy_property` | Selects the Landlord’s buyout response at the quoted price. |
| `phone_action` | Lists in-game contacts, dials a contact, or hangs up. |
| `wild_network_action` | Lists available upgrades, buys at the quoted price, or closes Wild’s Network. |
| `select_outing_backpack` | Selects an owned backpack to equip on departure. |
| `afterhours_action` | Visits the Dumping Ground, the Commissary, or Dr. Jackson. It also searches once at the Dumping Ground or returns to the shop. |
| `fish_tank_action` | Inspects, opens, or closes an owned aquaculture system and reports water, power, live stock, and storage slot IDs. |
| `set_game_status` | Shows a short progress message at the top center of the screen. It clears automatically or when passed empty text. |
| `load_save_slot` | Loads an existing slot from the main menu. |
| `return_to_main_menu` | Returns from the game's ending screen to the main menu. |
| `quit_game` | Exits the loaded game on explicit request. Changes since the last save are discarded. |

Wiki tools need internet access and may describe a different game build. Achievement results describe unlock requirements and contain no player progress.

Achievements come from the schema Steam caches at `<Steam>\appcache\stats\UserGameStatsSchema_4348910.bin`. Steam downloads it the first time you launch the game through Steam. The server finds Steam through the registry and the usual install folders; set `STEAM_DIR` if yours is elsewhere. If the schema is missing, it falls back to a `steam_settings\achievements.json` file in the game folder when one exists.

Use the included version 11 bridge for the current tool set. `get_live_shop` reports the running version. Replace the installed bridge DLL and restart the game after upgrading.

## Enable live controls

1. Put `manifest.xml` and `ProbablyStolenMcpBridge.dll` from `game-bridge` into `Mods\ProbablyStolenMcpBridge` under the game install. The included DLL was tested with the Windows build that reports version `0.46D`. Rebuild against your local game assemblies if the APIs differ.
2. In the game, open **Mods** and enable **Probably Stolen MCP Bridge**, then restart the game. This uses the normal [mod activation flow](https://github.com/dragonpan2/probably-stolen-modding#run-the-game-and-activate-the-mod).
3. Load a shop and start a new Codex chat so it picks up the new MCP tools. Ask it to read the live shop. To try an action, ask it to call the next customer when the counter is ready.

You can turn off live controls from the game's **Mods** menu. The bridge operates inside the game and uses its own mod data folder for short-lived requests and replies.

To try an item transfer, ask Codex to list your live inventory. Then name an item and where it should go, such as “Move one water filter to the front counter.” The game picks a legal slot in the destination. The tool returns the number of units it moved. Read the inventory again before each move because item and container IDs belong to the latest inventory snapshot.

## Scavenge after closing

1. Close the shop and check `canVisitDumpingGround` in `get_live_shop`. Pick an item marked `canBeOutingBackpack` with `select_outing_backpack` if you want more carrying space.
2. Call `afterhours_action` with `visit_dumping_ground`. Read the live shop until `outingLocation` is `dumping_ground` and the transition has finished.
3. Check `canSearchDumpingGround`, `searchesLeft`, and the wound chances. Use `search_dumping_ground` for each search. List the inventory and move useful finds from **After-hours / Ground** to a pocket or your backpack’s storage.
4. Use `return_to_shop` and confirm arrival in `get_live_shop`. If you choose to leave items behind, pass the current `groundStacks` count as `leaveGroundCount`.

For other outings, check `canVisitCommissary` or `canVisitDoctor`. The matching blocker fields explain when a route is unavailable. The game decides when each location is discovered and open.

## Inspect a fish tank

List `ras` in the live inventory and use the selected Recirculating Aquaculture System's item ID and snapshot with `fish_tank_action`. The `inspect` action reads tank status. The `open` and `close` actions update the actual window and report its visibility. One inventory snapshot can identify several tanks until another inventory listing or item move replaces it.

## Use the alarm or shotgun

Check `canReportCustomer` in `get_live_shop` before using the alarm. Omit the reason to let the game evaluate the report. Pass `stolen_goods` to require `offerStolenItem` or `contraband` to require `offerSeriousContrabandItem` on the counter. The game handles the customer's response, the reward, and any false-report fine.

For a suspected Aug, equip the unlocked shotgun with `shotgun_action` and the current customer token. Wait until `canFireShotgun` is true, then use the same token to fire. The game resolves the shot and its consequences. Use `holster` to put the shotgun away.

## Handle visitors and rent day

Read `dialogueChannel`, `dialogueLine`, and `dialogueChoices` in `get_live_shop`. Use `dialogue_action` with the current `dialogueToken` to advance a counter or phone line or choose a displayed response. If a seller has several items, use the current offer token and item ID to select one on the scale, then read its negotiated price before buying.

`rentAmount`, `daysUntilRent`, and mortgage status come from the loaded save. On a rent visit, advance the Landlord’s dialogue until `canPayRentNow` or `canBuyProperty` is true. Send the exact amount shown in `get_live_shop`. For a Loan Shark visit, use the responses the game displays. A buyout is complete when the game sets `propertyPaid`.

Use `phone_action` to list answering contacts and dial a number. After calling Joe Wild’s assistant on `8376`, choose the response for browsing services. Once the Network is open, `wild_network_action` returns its upgrade list and prices. Purchases spend Wild’s favor first and pay any remainder in credits.

## Connect to Codex

Install Node.js 22.18 or newer and run these commands in PowerShell from the cloned repository. `npm install` also compiles the TypeScript sources into `dist`. Provide the folder containing `Probably Stolen.exe`, then start a new Codex session after registration. [Codex MCP documentation](https://learn.chatgpt.com/docs/extend/mcp?surface=cli)

```powershell
npm install
$gameDir = (Resolve-Path -LiteralPath (Read-Host 'Probably Stolen install directory')).Path
$serverPath = (Resolve-Path -LiteralPath 'dist\main.js').Path
$nodePath = (Get-Command node.exe).Source
codex mcp add probably-stolen --env "PROBABLY_STOLEN_GAME_DIR=$gameDir" -- $nodePath $serverPath
```

Try asking “Use the Probably Stolen MCP to find where I can buy a Water Purifier” or “Show me the achievements in my install.”

## Connect to Claude Desktop

Run `npm install` as above, then add the server to `claude_desktop_config.json` (**Settings → Developer → Edit Config** in Claude Desktop) and restart Claude. Use your own paths; backslashes must be doubled in JSON.

```json
{
  "mcpServers": {
    "probably-stolen": {
      "command": "node",
      "args": ["C:\\path\\to\\probably-stolen-mcp\\dist\\main.js"],
      "env": { "PROBABLY_STOLEN_GAME_DIR": "C:\\path\\to\\Probably Stolen" }
    }
  }
}
```

## Use another client or move the server

On a fresh copy, install Node.js 22.18 or newer and run `npm install` from the project folder. Configure your client to launch `node` with the absolute path to `dist/main.js` as its sole argument. Set `PROBABLY_STOLEN_GAME_DIR` in the server environment to the folder containing `Probably Stolen.exe`. Leave it unset if you only need the wiki and achievements. Set `STEAM_DIR` if Steam is not in its usual folder.

The server finds the bridge's request folder under `%USERPROFILE%\AppData\LocalLow\Questing Goose Studio\Probably Stolen\ModData`. Set `PROBABLY_STOLEN_BRIDGE_DIR` to use a different folder, for example when the game runs under Proton.

## Develop

The server is written in TypeScript (`src/`) with strict compiler settings, linted with ESLint and typescript-eslint, and tested with the Node.js test runner. GitHub Actions runs every check on each push.

| Command | What it does |
| --- | --- |
| `npm run build` | Compiles `src` into `dist`. |
| `npm run typecheck` | Type-checks the sources and tests. |
| `npm run lint` | Lints with the strict type-checked rule set. |
| `npm test` | Runs the unit tests and an in-memory MCP session against a fake game bridge. Probably Stolen does not need to be running. |
| `npm run check` | Runs the type check, lint, and tests together. |

| Module | Responsibility |
| --- | --- |
| `src/main.ts` | Entry point: wires real dependencies and serves over stdio. |
| `src/server.ts` | Registers every MCP tool. |
| `src/game-tools.ts` | Live tool schemas and their mapping to bridge commands. |
| `src/bridge-client.ts` | File-based request queue shared with the game mod. |
| `src/wiki.ts` | Wiki search and page parsing. |
| `src/install.ts` | Local install and achievement lookups. |

Rebuild the game mod on Windows from your installed game assemblies. Run the following from the repository root with `$gameDir` set as above.

```powershell
.\game-bridge\build.ps1 -GameDirectory $gameDir
```

Change dependencies in `package.json`, then run **Update lockfile** from the repository's Actions tab to refresh `package-lock.json`.

## License

MIT. See [LICENSE](LICENSE). Probably Stolen and its assets belong to their respective owners; this project ships no game files.

TDQS

B3.4/5.0

Scored across 26 tools

Disambiguation4/5

Most tools target a clearly distinct game interaction (customers, rent, trade, phone, wiki, inventory), and descriptions reinforce preconditions like required tokens and flags. Some boundaries blur between lifecycle tools (quit_game vs return_to_main_menu vs load_save_slot) and between the 'action' wrappers (shop_day_action vs afterhours_action vs fish_tank_action), which an agent could misorder, but each remains largely identifiable.

Naming Consistency3/5

The surface is snake_case throughout with a verb-first majority (list_live_inventory, move_item, pay_rent, buy_property). However a sizeable minority use a noun_action pattern (shotgun_action, shop_day_action, afterhours_action, fish_tank_action, dialogue_action, phone_action, wild_network_action), so the verb_noun convention is not reliably predictable.

Tool Count3/5

26 tools is heavy for a single-game bridge and pushes past the comfortable 3-15 band, especially since several are thin wrappers over one shared state read. The depth of the simulated shop (inventory, customers, outings, phone, network, property) justifies breadth, but consolidation of the action wrappers would help.

Completeness4/5

The surface covers the core loop well: live state read, inventory movement, customer calling/dismissal/reporting/shotgun, trade negotiation, rent, property, phone, network, outings, day cycle, save/load, and quit, plus wiki lookups. The main gap is the fish tank, which can only be inspected (no feeding, stocking, or harvesting operations), and achievements are read-only definitions with no progress tooling.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues