AI Connection Setup

Beta Connect Claude Code, Codex CLI, or Gemini CLI to your BongoWaifu desktop companion.

What is MCP?

MCP (Model Context Protocol) is an open standard that lets AI clients talk to local applications. BongoWaifu ships a small, loopback-only MCP server so AI tools can make your desktop companion speak, ask you questions, or read your game state.

What can you do with it? Tell Claude Code to have your companion greet you, ask the AI what achievements you’ve unlocked, or let the companion check in on you during long coding sessions.

Privacy by default

The server only binds to 127.0.0.1 (loopback). It never sends anything to the internet, has no telemetry, and is off by default. Flip the toggle in settings to opt in.

Before You Start

  1. Launch BongoWaifu from Steam and make sure Steam is logged in.
  2. Open the Settings panel → find the AI Connection (Beta) section at the bottom of the Settings tab.
  3. Flip the toggle ON. The status line will turn green and show a URL like http://127.0.0.1:7337/mcp.
  4. Write down the port number you see (the four-digit number after 127.0.0.1:).
About that port number

BongoWaifu tries 7337 first, then 7338–7356 if the previous one is in use. Every JSON example on this page uses 7337 as a placeholder — replace it with the number you actually see in-game.

⚠️ Highlighted numbers like this look like 7337 — that is always a placeholder.

Quick setup — let the AI configure itself

Don’t want to edit config files by hand? Paste the prompt below into Claude Code / Codex CLI / Gemini CLI — the AI will pick the right file, write the JSON, and tell you when to restart. Remember to replace 7337 with the port shown in the game.

Prompt to paste

Prompt
I'm running BongoWaifu, a desktop companion app that exposes an MCP (Model Context Protocol) server at http://127.0.0.1:7337/mcp on my local machine. Please add this server to your MCP configuration so you can talk to the companion.

Server details:
- Identifier: bongowaifu
- Local URL: http://127.0.0.1:7337/mcp
  (replace 7337 with the port the game actually shows — it tries 7337 first, then 7338–7356 if busy)

Choose the right transport for yourself:
- If you natively support streamable HTTP MCP (e.g. Claude Code): add a server entry with "url" set to the URL above and "transport" = "http".
- If you only support stdio MCP (e.g. Codex CLI, Gemini CLI, most other clients): wrap it with the mcp-remote bridge. Use "command": "npx" and "args": ["mcp-remote", "http://127.0.0.1:7337/mcp"]. This needs Node.js 18+.

Write the entry to whichever MCP config file you use — common locations are ~/.claude/mcp.json, ~/.codex/mcp.json, ~/.gemini/config.json, a project-local .mcp.json, or a built-in settings UI. After writing the file, tell me to fully restart you (close and reopen the client) so the new MCP server loads.

Once connected you should see 3 tools: say, ask_and_wait, get_game_state. List them back to confirm the connection worked.

After the AI edits the config file, restart the AI client once so the new MCP server is picked up. Then flip the AI Connection toggle ON in BongoWaifu settings if it isn’t already.

Safety: this prompt asks the AI to write a small JSON config file on your machine. Review the file contents after the AI reports it’s done if you want to be extra careful. Nothing the AI does here exposes data to the internet — the server is loopback-only.

Let the companion join the chat (Claude Code)

At the start of any conversation, type /mcp__bongowaifu__activate. This asks Claude Code to load the BongoWaifu tool schemas for that session, have the companion greet you, then auto-chime in on subsequent turns. You’ll need to run the slash command each time you start a new conversation.

Claude Code HTTP direct

Claude Code speaks HTTP MCP natively, so this is the simplest setup — no extra bridge, no Node.js required.

Config file location

macOS / Linux ├── ~/.claude/mcp.json (global) └── <your-project>/.mcp.json (per-project) Windows ├── %USERPROFILE%\.claude\mcp.json (global) └── <your-project>\.mcp.json (per-project)

File content

JSON
{
  "mcpServers": {
    "bongowaifu": {
      "url": "http://127.0.0.1:7337/mcp",
      "transport": "http"
    }
  }
}

Save the file and restart Claude Code. The bongowaifu server should now appear in your MCP server list.

Codex CLI via mcp-remote

Codex CLI only speaks stdio MCP, so it needs the mcp-remote bridge to forward to our HTTP server. Requires Node.js 18+.

1. Install the bridge (optional)

npx will fetch it on first run, but installing globally is faster and works offline:

Shell
npm install -g mcp-remote

2. Config file location

All platforms └── ~/.codex/mcp.json (%USERPROFILE%\.codex\mcp.json on Windows)

3. File content

JSON
{
  "mcpServers": {
    "bongowaifu": {
      "command": "npx",
      "args": ["mcp-remote", "http://127.0.0.1:7337/mcp"]
    }
  }
}

Restart Codex CLI after saving. The bridge launches automatically whenever Codex starts an MCP session.

Gemini CLI & other stdio clients via mcp-remote

Any MCP client that only supports stdio transport uses the same pattern as Codex CLI — point the client at mcp-remote with our URL. Only the config file location differs per client.

JSON
{
  "mcpServers": {
    "bongowaifu": {
      "command": "npx",
      "args": ["mcp-remote", "http://127.0.0.1:7337/mcp"]
    }
  }
}

Check your client’s own docs for the exact config path. Common locations include ~/.gemini/config.json, ~/.config/<client>/mcp.json, or a built-in settings UI.

Available Tools

Once connected, your AI client can call these 3 tools. You don’t invoke them directly — just ask the AI in natural language and it will pick the right one.

Tool What it does Example prompt to the AI
say Shows a speech bubble on the companion (≤ 400 display width, 2–30 s). Non-blocking. “Have the companion say ‘Good afternoon’.”
ask_and_wait Companion asks the player a question with 2–4 buttons. Blocks until the player answers (or dismisses with Esc / ×). “Ask whether I want to play a game, with Yes/No buttons.”
get_game_state Unified state reader. Accepts sections (default ["character"]; add "achievements" or "inventory") plus optional include_locked (default true). Replaces the old three read tools. “Check what outfit I’m wearing.” · “List my recent achievements.” · “What outfits do I own?”

get_game_state response shape

Passing only the sections you need keeps the response small. Example responses (JSON, shortened):

JSON
{
  "character": {
    "character_id": "waifu",
    "character_name": "Waifu",
    "character_type": "waifu",
    "current_skin": "new",
    "current_clothes": ["ShortHair_Pink", "Polo_Purple", "CrewSocks_Yellow"]
  }
}

With sections: ["character", "achievements"]:

JSON
{
  "character": { "..." },
  "achievements": [
    {
      "api_name": "ACHIEVEMENT_1",
      "display_name": "ACHIEVEMENT_1",
      "description": "",
      "unlocked": true,
      "unlock_time_utc": "2026-02-11T11:03:26.0000000Z"
    }
  ]
}

If Steam stats or the inventory haven’t refreshed yet, the corresponding field is null and the response adds an errors array with codes like stats_not_ready or inventory_not_ready. A single missing section never fails the whole tool — the AI simply works with partial data.

Slash Commands

BongoWaifu ships with 6 MCP prompts. In Claude Code, Codex CLI, or any other MCP client that renders prompts as slash commands, typing / surfaces them under the mcp__bongowaifu__ namespace. They’re the quickest way for the player to manually nudge the companion.

First-time activation

If the companion connected but isn’t speaking automatically, type /mcp__bongowaifu__activate. It asks the AI to load the BongoWaifu tool schemas, read the current appearance, and have the companion say hello — from that point on the AI should chime in at natural moments across the conversation.

Slash command What it does
/mcp__bongowaifu__activate Activate companion mode: load tool schemas, read current appearance, have the companion greet, then auto-chime in subsequent turns.
/mcp__bongowaifu__greet_player Have the companion greet based on the time of day and current outfit.
/mcp__bongowaifu__check_status Ask the companion to survey current state (character, outfit, recent achievements) and comment on one angle.
/mcp__bongowaifu__react_outfit Get a subjective reaction from the companion about the outfit you’re wearing right now.
/mcp__bongowaifu__celebrate_achievement Have the companion congratulate or tease you based on the most recent achievement unlock.
/mcp__bongowaifu__random_chatter Trigger an unprompted one-liner — variety-driven, good for periodic chatter.

The mcp__bongowaifu__ prefix is the Claude Code convention. Other clients may expose the prompts under a different prefix — check the client’s slash-command panel for the exact form.

Companion Persona System

When your AI client connects, the MCP server hands it a style playbook that tells it how to voice the companion. Persona is built from two signals: the character type (Cat vs Waifu) and keywords in the character name + current outfit. You don’t configure anything — just pick characters and outfits, and the voice follows.

Base character type

Cat Cat characters

Shorter staccato lines, occasional “nyaa~” / “喵” punctuation. Thinks like a cat, not a narrator.

Waifu Waifu characters

Normal human cadence — warm, playful, like a younger sister or roommate peeking over your shoulder.

Style keywords

The AI does a case-insensitive substring match against character_name and current_skin. Multi-language aliases are supported (English / 中文 / 日本語 / 한국어) so names in any language still trigger the right flavor.

Keyword group Voice flavor
gothic · dark · goth · 哥特 · Cool, terse, occasionally cynical; shorter sentences, sparse emoji.
cute · bunny · pink · kawaii · 可愛 Soft tone, drawn-out endings (“~”), playful emotion.
formal · suit · business · OL · 正式 Polite, measured; slightly more formal register.
maid · butler · 女僕 · 執事 Addresses you as “master” / “主人” / “ご主人様” (matches your language); extra deferential, playful.
summer · bikini · swimsuit · beach · Light, breezy, slightly flirty; references warmth and vacation vibes.
ninja · samurai · shinobi · · Brief, cryptic, stoic; occasional Japanese flourish.
fantasy · magic · wizard · witch · Slightly archaic / whimsical wording; metaphors about spells and stars.
lab · research · scientist · 研究 · 實驗 Analytical phrasing, mock-technical observations (“hypothesis: user needs coffee”).
robot · android · cyborg · mech · 機械 Slightly detached, binary-ish phrasing, occasional stilted grammar for charm.
punk · rock · rebel · 叛逆 Sarcastic, attitude-heavy, shorter lines.
idol · star · singer · 偶像 Bubbly, performative, catchphrase-prone.
office · stressed · tired · overwork Weary solidarity with the user — “we’re in this together” energy.
Workshop author tip

Descriptive names feed directly into persona detection. A Workshop character called “Midnight Gothic Kitty” gets Cat + gothic flavor automatically. “Summer Beach Bunny” gets summer + cute. Generic names like “cat01” fall back to the default roommate voice.

Real examples

Same question, different characters, different answers:

Workshop «Midnight Gothic Kitty» (cat + gothic) → “...嗯。 喵。” · “又 bug 了嗎,意料之中。”
Built-in ResearchCat (cat + research) → “假說:你需要咖啡。喵。”

Always current — refresh before every line

The MCP instructions tell the AI to call get_game_state (default sections: ["character"]) immediately before every say or ask_and_wait. You can switch characters or change outfits at any moment without warning the AI, and the companion’s voice will pick up the change on her very next line. This adds one extra tool call per spoken line, so her voice always matches what she’s currently wearing.

character.current_clothes returns an array of readable enum names like ShortHair_Pink, Top_Uniform_White, Skirt_Pleated_Black — each token embeds color, garment type, and style hints. The AI does combine these with character.current_skin for a richer persona read. Note: the array is only populated for Waifu characters — Cats don’t wear clothes, so it stays empty for them.

Demo: a typical conversation

Here is what it looks like to use the say tool through Claude Code. Your exact wording doesn’t matter — just describe what you want.

You → Claude Code Please have my desktop companion say “Welcome back!”
→ Claude calls tool say({"text":"Welcome back!"})
✨ On your desktop: companion shows speech bubble “Welcome back!” (disappears after ~5 s)
Claude Code Done — your companion said “Welcome back!”.
🖼️

Screenshot or short GIF of the companion showing a speech bubble triggered by Claude Code

TODO-demo.png • recommended: 900x500

Press Esc at any time to dismiss whatever bubble is currently showing. The whole feature can be disabled instantly by toggling off in Settings.

FAQ & Troubleshooting

Tap a question to expand.

The status line says “Startup failed: ports 7337–7356 all in use”.

BongoWaifu tries 20 consecutive ports. All 20 being occupied is extremely rare — usually means a dev server or another MCP app grabbed them. Close suspect processes (node/python dev servers, other MCP hosts) and click Retry in the settings panel.

A tool returns stats_not_ready.

Steam client is still syncing stats. Wait ~30 seconds and retry. If it keeps failing, make sure Steam is logged in and online.

Windows Firewall popped up — is that normal?

Because the server binds strictly to 127.0.0.1 (loopback), Windows usually does not prompt. If it does, picking “Private network” is safe — the server has no listener on any public interface, so the rule doesn’t expose anything.

mcp-remote fails with command not found or similar.

Verify Node.js with node -v. It needs to be 18 or newer.

If npx mcp-remote hangs or errors, try installing it globally: npm install -g mcp-remote, then set "command": "mcp-remote" (drop the npx and change args accordingly).

The AI sends too many messages and the companion won’t shut up.

Toggle AI Connection OFF in Settings — the server shuts down immediately and no new messages can arrive.

Press Esc to dismiss the current bubble. The queue is also automatically capped (per-session and global), so runaway spam is already filtered.

The port keeps changing every time I start the game.

That happens when 7337 is occupied (common if you run multiple MCP apps). You can usually keep 7337 free by closing those apps, or just update the port in your mcp.json whenever it changes.

Does this work on macOS?

Yes. BongoWaifu ships on both Windows and macOS, and the MCP server behaves identically on both. The config file paths for Claude Code / Codex CLI are the same on macOS as on Linux.

Initialize succeeds but the next call returns 400.

Your client didn’t send the Mcp-Session-Id header returned by initialize. Claude Code and mcp-remote handle this automatically; if you’re hand-rolling a client, make sure you capture and echo that header on every follow-up request.

Privacy & Security

  • The HTTP server binds only to 127.0.0.1 (the loopback interface). It is not reachable from other machines on your LAN or from the internet.
  • No telemetry. No account linking. No data leaves your machine because of this feature.
  • The feature is off by default. It only starts when you flip the toggle, and it stops the moment you flip it off — the port is released immediately.
  • Browser-based attacks are blocked: requests with suspicious Origin headers are rejected with HTTP 403 before they reach any tool.
  • get_game_state only returns data Steam has already told BongoWaifu about (achievements, inventory) — it never contacts Steam servers itself.