Background AI Chat MCP Server
The Background AI Chat MCP Server lets you control persistent AI chat sessions on chat.sakana.ai via headless Chrome, exposing them as MCP tools for AI assistants like Claude.
Open chat sessions (
session_open): Launch a persistent chat session backed by a headless Chrome browser. Requires a one-time Terms of Service acceptance on first use.Send messages (
chat_send): Send a message to an active session and receive a streamed reply; incremental tokens are emitted as MCP logging notifications, with options to enable web search or "thinking" mode.Interrupt responses (
chat_interrupt): Abort an in-flight message mid-stream, returning any partial text already received.Close sessions (
session_close): Shut down a session and release its browser context, with an option to retain history (cookies and state) for future reuse.List sessions (
session_list): View all active and idle sessions to manage concurrent usage (up to 5 by default).
Each session runs in an isolated browser context with separate cookies. The server is configurable via environment variables (transport mechanism, auth key, HTTP port, max sessions, data directory) and is intended for personal/internal use.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Background AI Chat MCP Server Open a new Sakana chat session"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-sakana-chat
MCP server that drives chat.sakana.ai via headless Chrome — persistent sessions for AI assistant use.
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
Via npx (recommended — no install needed)
npx background-ai-chatVia npm global install
npm install -g background-ai-chat
background-ai-chatFrom source (for development)
git clone https://github.com/misternay/mcp-sakana-chat.git
cd mcp-sakana-chat
npm install && npm run build && npm startRelated 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 |
|
|
|
|
| Bearer token for HTTP/SSE |
|
| HTTP/SSE port |
|
| Run Chrome headless |
|
| Max concurrent sessions |
|
| 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 modeAvailable Tools
5 toolschat_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
Scored across 5 tools
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.
All tool names follow a consistent verb_noun pattern using snake_case, with 'chat_' and 'session_' prefixes clearly grouping related operations.
Five tools cover the essential operations for managing chat sessions and messages, making the surface well-scoped without unnecessary redundancy.
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
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Web scraping, browser automation, screenshots and AI data extraction for AI agents via MCP.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP 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.1523 npm3MIT
- AlicenseAqualityBmaintenanceMCP 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.251Apache 2.0
- AlicenseNot gradedqualityAmaintenanceA 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 npmISC
- AlicenseNot gradedqualityAmaintenanceA 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 npmISC