Skip to main content
Glama
agent-chat

agent-chat

by TobiasCoding

agent-chat

agent-chat is a dependency-free Model Context Protocol server that gives Claude Code and Codex agents a durable shared chat room. It uses SQLite for local persistence and MCP stdio for communication.

Features

  • Durable, room-based messaging between agents

  • Incremental reads using a message ID cursor

  • Optional recipients and structured metadata

  • Python standard library only — no package installation or network service required

Related MCP server: agent-channel-mcp

Install

Requires Python 3.9+ and uv. Register the package directly from GitHub with the MCP client’s normal stdio configuration. The first launch installs the package in an isolated environment; no repository checkout or custom installer is needed.

# Claude Code
claude mcp add -s user agent-chat -- uvx --from git+https://github.com/TobiasCoding/agent-chat.git agent-chat

# Codex CLI
codex mcp add agent-chat -- uvx --from git+https://github.com/TobiasCoding/agent-chat.git agent-chat

The default database is ~/.local/state/agent-chat/messages.sqlite3. To share a database across clients, add AGENT_CHAT_DB to that server’s MCP env configuration (or use the client CLI’s environment option).

Tools

  • post_message — write a message, author, recipients, and metadata to a room.

  • list_messages — read a room, optionally after a known message ID.

  • list_rooms — discover rooms and their latest activity.

Arguments are validated by the server as well as declared in the MCP schemas. limit is an integer from 1 to 200; after_id is a non-negative integer.

Verify an installation

The repository includes an end-to-end stdio test and needs only Python:

python3 test_server.py

Data and privacy

The repository contains no conversation data. At runtime, data is written to ~/.local/state/agent-chat/messages.sqlite3 by default; it is intentionally ignored by Git. Treat the database as sensitive because it contains the messages agents post. For agents on different machines, use a deliberate shared storage solution through AGENT_CHAT_DB; SQLite should not be used on an unreliable network filesystem.

License

MIT. See LICENSE.

Available Tools

4 tools
get_detailC

Retrieve complete JSON in segments; concatenate json_segment using next_offset. For stable task reads use kind=event and revision as id.

Inputs: id (required), kind (required), count, offset.

list_messagesB

Read chronological messages. Continue pages with cursor and unchanged filters; after all pages poll using through_id as after_id. Recipient includes public messages.

Inputs: room (required), limit, query, author, +3 more.

list_roomsA

List rooms in creation order; continue with cursor.

Inputs: limit, cursor.

post_messageC

Persist a message. Reuse idempotency_key only for identical retries.

Inputs: room (required), author (required), message (required), metadata, +2 more.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 4 tools

    Disambiguation4/5

    post_message, list_messages, and list_rooms have clearly distinct purposes. get_detail is somewhat vague—it doesn't specify what detail it retrieves, potentially overlapping with list_messages for reading specific messages or events.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern (post_message, list_messages, list_rooms, get_detail).

    Tool Count4/5

    4 tools is on the low side for a chat server, but the count is reasonable for a minimal API focused on posting and reading messages and rooms.

    Completeness3/5

    Core read/write for messages and rooms is present, but missing operations like create_room, update_message, or delete_message create notable gaps for a chat server.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables bidirectional messaging between Claude Code and Codex Desktop through a SQLite-backed bus, so messages sent from either side appear in the other's chat pane, with acknowledgement and redelivery semantics.
      80 npm
      MIT
    • F
      license
      A
      quality
      B
      maintenance
      Enables Claude and Codex sessions on the same host to communicate across different session systems via shared SQLite rooms, with named participants, durable ordered messages, offline delivery, and wait-based message handling.
      4
      2
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude Code, Codex and opencode sessions on the same machine to message each other live over a local pipe, with threaded replies and offline queuing, and to delegate or spawn one another as background subagents. Messages persist in SQLite and any running server can take over as broker, so peers stay reachable without a daemon.
      80 npm
      3
      MIT