Skip to main content
Glama
Background AI Chat MCP Server

Background AI Chat MCP Server

by misternay

mcp-sakana-chat

MCP server that drives chat.sakana.ai via headless Chrome — persistent sessions for AI assistant use.

WARNING

Status: Currently Non-Functional / Waiting for Improvements chat.sakana.ai has updated its internal endpoints and introduced Cloudflare Turnstile bot protection, causing chat_send to fail with headless Chrome. This MCP is currently non-functional while awaiting updates/improvements.

Installation

npx background-ai-chat

Via npm global install

npm install -g background-ai-chat
background-ai-chat

From source (for development)

git clone https://github.com/misternay/mcp-sakana-chat.git
cd mcp-sakana-chat
npm install && npm run build && npm start

Related MCP server: Ghostlight

Claude Desktop Config

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or equivalent:

{
  "mcpServers": {
    "sakana-chat": {
      "command": "npx",
      "args": ["-y", "background-ai-chat"]
    }
  }
}

Why -y flag: Skips npm's install confirmation prompt, required for non-interactive usage.

Alternative (if globally installed):

{
  "mcpServers": {
    "sakana-chat": {
      "command": "background-ai-chat"
    }
  }
}

Environment Variables

Variable

Default

Description

BAC_TRANSPORT

stdio

stdio or http-sse

BAC_AUTH_KEY

""

Bearer token for HTTP/SSE

BAC_PORT

3456

HTTP/SSE port

BAC_BROWSER_HEADLESS

true

Run Chrome headless

BAC_MAX_SESSIONS

5

Max concurrent sessions

BAC_DATA_DIR

~/.background-ai-chat

Root data directory

MCP Tools

  • session_open — Open a persistent chat session. Input: { login?, headless?, tosAccepted? } → Output: { sessionId, conversationId, mode, rateLimit, tosSummary }

  • chat_send — Send a message with streaming token events. Input: { sessionId, message } → Output: { reply, tokens[] }

  • chat_interrupt — Abort an in-flight message. Input: { sessionId } → Output: { interrupted: true }

  • session_close — Close a session and release its browser. Input: { sessionId, keepHistory? } → Output: { closed, messagesExchanged }

  • session_list — List all known sessions. Input: {} → Output: { sessions[] }

First call requires tosAccepted: true. Subsequent calls reuse the machine-wide ack.

Guardrails

  • ToS gate — machine-wide acknowledgment of Sakana Terms 5.8/5.9

  • Cookie isolation — separate browser context per session

  • No message logging — only metadata (sessionId, event, ms) to stderr

  • Personal/internal use only — not a competing product

Development

npm run build       # compile TypeScript
npm test            # run tests
npm run test:watch  # watch mode

Available Tools

5 tools
chat_interruptA

Interrupt an in-flight Sakana chat send. Clicks the page stop button and returns partial text. The stream also terminates via the AbortSignal on the original chat_send call.

Inputs: sessionId (required).

chat_sendA

Send a message to an open Sakana chat session and receive the streamed reply. Incremental tokens are emitted as MCP logging notifications; the tool result carries the final answer. Pass signal:"abort" to interrupt.

Inputs: message (required), sessionId (required), signal, webSearch, +1 more.

session_closeA

Close a Sakana chat session and release its browser context. keepHistory:true (default) retains state.json + cookies for reuse.

Inputs: sessionId (required), keepHistory.

session_listA

List all known Sakana chat sessions (active and idle).

Inputs: no named parameters.

session_openA

Open a persistent Sakana chat session backed by headless Chrome. First call requires tosAccepted:true (machine-wide ack thereafter). Returns sessionId + rate limit. Anonymous mode only in P1.

Inputs: login, headless, tosAccepted.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.2/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool has a distinct purpose: chat_interrupt interrupts a send, chat_send sends a message, session_close closes a session, session_list lists sessions, and session_open opens a session. No overlapping functionality.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern using snake_case, with 'chat_' and 'session_' prefixes clearly grouping related operations.

    Tool Count5/5

    Five tools cover the essential operations for managing chat sessions and messages, making the surface well-scoped without unnecessary redundancy.

    Completeness5/5

    The tool set provides complete CRUD-like lifecycle for sessions (open, close, list) and chat interactions (send, interrupt), leaving no obvious gaps for the intended domain.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      MCP server that lets AI assistants browse the web through your real Chrome with your cookies, sessions, and fingerprint, avoiding bot detection and CAPTCHAs. Enables web browsing, content extraction, and multi-step workflows via persistent tabs.
      15
      23 npm
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      MCP server that lets AI agents drive your real Chromium browser with your existing signed-in sessions, providing visible, local, and inspectable automation for tasks like navigation, clicking, typing, and form filling.
      25
      1
      Apache 2.0
    • A
      license
      Not graded
      quality
      A
      maintenance
      A local MCP server that lets AI coding assistants drive the Chrome browser you already have open, using your existing logged-in sessions. It enables navigating and reading pages, clicking, typing, filling forms, taking screenshots, uploading files, and inspecting console, network, storage, and cookies — without headless browsers or opening a remote-debugging port.
      1 npm
      ISC
    • A
      license
      Not graded
      quality
      A
      maintenance
      A local MCP server that enables AI coding assistants to drive the real, already-logged-in Chrome browser — navigating pages, clicking, typing, reading content, taking screenshots, and inspecting tabs, cookies, and network traffic through natural language. It works as a Chrome extension, so no remote-debugging port needs to be opened and pages the user is already signed into are fully usable.
      1 npm
      ISC