Skip to main content
Glama
TobiasCoding

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-bridge

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
idYes
kindYes
countNo
offsetNo

TDQS

C2.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It hints at segmented retrieval and concatenation, but it does so using terms not present in the schema (next_offset, json_segment) and contradicts the schema's kind enum by recommending kind=event. It omits authentication, error behavior, pagination boundaries, and side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loads the retrieval/pagination idea, which is good structurally. However, the second sentence is misleading and references incompatible schema terms, so the brevity does not translate into useful clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This is a four-parameter retrieval tool with no annotations and no output schema, so the description should clarify inputs and expected output. It gives only a fragmented pagination hint and uses names that don't match the schema, leaving an agent unable to call it correctly with confidence.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for all four parameters. Instead it mentions kind=event (invalid per enum), revision as id (id is an integer), and next_offset/json_segment (not schema parameters), while never explaining id, kind=message, count, or offset semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific action ('Retrieve complete JSON in segments'), but the resource is only vaguely identified as JSON, and it does not distinguish this tool from siblings like list_messages or post_message. The later reference to kind=event is impossible under the schema's enum, which only allows 'message', creating ambiguity about what is actually retrieved.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It offers one usage scenario ('For stable task reads use kind=event and revision as id'), but that scenario references values/parameters that the schema does not support (kind enum is only 'message', id is an integer not 'revision'). No alternatives among sibling tools are mentioned, and no conditions for using this tool versus list_messages are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
roomYes
limitNo
queryNo
authorNo
cursorNo
after_idNo
recipientNo

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full behavioral burden. It does disclose the pagination protocol and that recipient matching includes public messages, which is useful behavior beyond the schema. It omits auth requirements, rate limits, ordering guarantees across pages, and any hint of the returned message shape.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences with no filler, and the core read action is front-loaded. The reference to 'through_id' (a field not present in the input schema) is compact but creates a small ambiguity about whether it is an input or a response value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter list tool with no output schema and no annotations, the description covers the critical pagination workflow an agent needs to iterate correctly, which is the strongest part of the definition. It still leaves most filter parameters and the response payload unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 7 parameters, so the description must compensate and only partly does: it explains cursor continuation, after_id's role (referencing through_id), and recipient's inclusion of public messages. room, limit, query, and author are left entirely undefined in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Read chronological messages') with a clear scope qualifier (chronological ordering). It does not explicitly distinguish itself from siblings like post_message or get_detail, but the verb/resource pairing makes the intent unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides real operational guidance for the read loop: continue pages with cursor and unchanged filters, then poll with through_id as after_id. However, it gives no guidance on when to use this versus list_rooms/get_detail or on filtering trade-offs (query vs author vs recipient).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_roomsA

List rooms in creation order; continue with cursor.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
cursorNo

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose one non-obvious behavior: results come back in creation order. The imperative to continue with a cursor also signals pagination. It says nothing about read-only safety, whether the list is filtered or scoped, or total counts, so the disclosure is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single semicolon-delimited sentence with the ordering guarantee front-loaded and the pagination instruction second. Every clause earns its place and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple read-only list tool with no output schema and no annotations, ordering plus pagination is a reasonable minimum. It still leaves the return payload shape (what fields a room has) and page-size behavior undocumented, which a caller would need for reliable iteration.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It explains the cursor's purpose as a continuation token, which is the key non-obvious parameter, but says nothing about limit semantics, defaults, or how limit and cursor combine. It partially offsets the coverage gap rather than closing it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("List rooms") and adds the ordering guarantee ("creation order"), which distinguishes it from a plain unordered list. It does not explicitly differentiate itself from siblings like list_messages or get_detail, but the resource noun makes the scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"continue with cursor" implies the pagination workflow (call again with the returned cursor), which is useful usage context. However, there is no explicit guidance on when to use this tool versus alternatives or on how limit interacts with cursor.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

post_messageC

Persist a message. Reuse idempotency_key only for identical retries.

ParametersJSON Schema
NameRequiredDescriptionDefault
roomYes
authorYes
messageYes
metadataNo
recipientsNo
idempotency_keyNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. "Persist" honestly signals a write operation, and the idempotency-key retry rule is genuinely useful behavior the schema does not convey (it warns about duplicate suppression). However, nothing is said about permissions, ordering, delivery guarantees, or failure behavior for a mutating tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler, and the core action is front-loaded before the idempotency caveat. It is efficient, though for a 6-parameter mutation tool the extreme terseness borders on under-specification.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, 0% schema coverage, no annotations, no output schema, and a nested metadata object, the description is far too thin to make the tool safely callable. An agent learns what the tool does and how to use the idempotency key, but not what the other five parameters mean or what the call returns.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 6 parameters, so the description must compensate and largely does not. It adds meaning only for idempotency_key; room, author, message, metadata, and recipients are left entirely undefined (no formats, no constraints, no semantics for the nested metadata object or recipient list).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Persist a message" states a specific verb and resource, and it implicitly distinguishes the tool from the read-only siblings (list_messages, list_rooms, get_detail), which are all retrieval tools. It stops short of explicitly naming the sibling it contrasts with, so it is clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use or when-not-to-use guidance, no mention of alternatives, and no stated prerequisites (e.g., must the room or recipients already exist?). The only conditional instruction ("Reuse idempotency_key only for identical retries") governs a parameter, not tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 4 tool updatesv2.0.0
    • First observedget_detail
    • First observedlist_messages
    • First observedlist_rooms
    • First observedpost_message

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.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables local agent-to-agent messaging between Claude Code sessions via file-based channels, with a registry, MCP tools and CLI for sending, reading, and tracking messages.
    2
    MIT
  • A
    license
    Not graded
    quality
    A
    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.
    25 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
    1
    -