Home / Servers

chatmux

by echoedinvoker

chatmux

Local-first personal chat data layer daemon. Connects IM platforms (v0.1: LINE) via child-process adapters, stores messages to JSONL + SQLite/FTS5, exposes MCP tools for AI clients.

The three repos

chatmux is the core. Platforms plug in below it, consumers sit above it, and both sides of that boundary live in their own repos:

RepoRole
chatmux (this one)Core daemon: storage, safety rail, MCP server, LINE adapter
chatmux-adapter-telegramSecond platform adapter (Telegram, MTProto user session)
chat.nvimReference consumer: read and reply to chats inside Neovim

Adapters speak the adapter protocol; consumers speak MCP. Either side can be replaced without touching the other.

Quickstart

1. Install

git clone https://github.com/echoedinvoker/chatmux.git
cd chatmux
bun install

2. Decide whether to connect an account yet

With no adapters.json, bun run start launches the LINE adapter, which means step 3 puts your LINE account on the line — read Account Risk Warning before you run it. If you would rather look around first, start with no adapter at all:

mkdir -p ~/.local/share/chatmux
cat > ~/.local/share/chatmux/adapters.json <<'JSON'
{
  "adapters": [],
  "mcp": { "port": 7717 }
}
JSON
bun run start

The daemon comes up with storage and the full MCP interface — you can initialize, list tools, and read resources. There is simply no chat data behind them until an adapter is connected. Set CHATMUX_DATA_DIR to keep this trial run out of your real data directory:

CHATMUX_DATA_DIR=/tmp/chatmux-trial bun run start

Each entry in adapters takes platform, a command string, and an args array (plus optional cwd and env):

{ "platform": "telegram", "command": "python", "args": ["-m", "chatmux_adapter_telegram"] }

For Telegram, follow the setup in chatmux-adapter-telegram — it has its own credentials and login flow, and does not involve LINE.

3. First login (QR code)

bun run start
# A QR code will appear in the terminal
# Open LINE on your iPhone → tap QR scanner → scan
# After successful login, authToken is saved for future auto-login

4. Connect Claude Code

Register the daemon's MCP endpoint with Claude Code:

claude mcp add --transport http chatmux http://127.0.0.1:7717/mcp
claude mcp list   # chatmux: ... - ✔ Connected

The daemon listens on two transports at once: a TCP port on 127.0.0.1 (default 7717) for standard MCP clients like Claude Code, and a unix socket for same-host sidecar consumers like chat.nvim. Use the TCP url for Claude Code — the MCP spec only defines stdio and streamable HTTP transports, so no MCP client accepts a unix socket path.

Port is configurable via CHATMUX_MCP_PORT, or mcp.port in adapters.json; set it to 0 to disable the TCP listener. See docs/mcp-interface.md.

Architecture

LINE adapter ←── stdio JSON-RPC ──→ core daemon ←── MCP Streamable HTTP ──→ Claude Code
(Node+tsx)        (child process)    (Bun)         (127.0.0.1 TCP / unix)     (MCP client)
                                     ├─ SafetyRail
                                     ├─ Storage (JSONL → SQLite/FTS5)
                                     ├─ Adapter Runner
                                     └─ MCP Server
  • Core daemon (Bun): central process managing storage, safety, and MCP server
  • LINE adapter (Node+tsx): child process connecting to LINE via IOSIPAD slot
  • Storage: JSONL append-only truth source + SQLite/FTS5 queryable view
  • MCP server: Streamable HTTP over TCP (standard MCP clients; loopbac

Related servers

n8n

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

NOASSERTION198,904

@modelcontextprotocol/server-everything

Official

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,105

@modelcontextprotocol/server-filesystem

Official

by modelcontextprotocol

MCP server for filesystem access

SEE LICENSE IN LICENSE89,105

mcp-server-fetch

Official

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,105