dirextalk-message-server

MCP.Pizza Chef: YingSuiAI

This is the backend you run yourself for Dirextalk, a private messaging setup built on the Matrix standard. It owns the rooms, the memberships, the messages, the media, and the history, and it opens a separate door so an outside assistant can reach that same conversation data with a restricted credential that cannot touch owner-level actions. Running it needs Go or Docker plus your own PostgreSQL database, so this is firmly a build-it-yourself product for people who host their own tools.

Communication

Use This MCP server To

Run my own private chat server instead of renting one Let an assistant read my rooms with restricted access Search my message history on hardware I control Keep team conversations off someone else's servers Give an agent chat access without owner-level permissions

README

Dirextalk Message Server

Dirextalk Message Server is Dirextalk's backend contract authority. It combines a Matrix-compatible homeserver, the ProductCore action API, product policy, projections, Native Agent, external MCP access, and PostgreSQL-backed runtime storage in one Go monolith.

It is based on Element Dendrite, but this repository is maintained as a Dirextalk product server rather than a general-purpose Matrix homeserver distribution.

Dirextalk Message Server overview

中文说明

Each personal node keeps one contract boundary for Matrix, ProductCore, and Native Agent:

  • Matrix is the source of truth for rooms, membership, ordinary messages, media, history, search, unread state, and redaction.
  • ProductCore actions provide the authenticated product facade for validation, remote forwarding, Matrix write orchestration, and projection reads.
  • PostgreSQL-backed P2P tables are projection/read models unless a current contract explicitly makes a record authoritative.
  • Native Agent and POST /mcp are backend-owned capabilities. They are not installed, configured, or invoked through the plugin lifecycle. BYOK web search accepts a Tavily key only in the request-scoped tool_credentials.web_search object and never persists it.

Runtime

  • Production entry point: cmd/dirextalk-message-server
  • Compatibility entry point: cmd/dendrite
  • Docker image: dirextalk/message-server:latest
  • Default config path in Docker: /etc/dirextalk-message-server/message-server.yaml
  • Default data path in Docker: /var/dirextalk-message-server
  • Go module: github.com/YingSuiAI/dirextalk-message-server
  • Go version: 1.26.5
  • Server database: PostgreSQL only; SQLite and file DSNs are unsupported.
  • Docker development database: PostgreSQL 18

API Surface

Matrix protocol routes remain under:

  • /_matrix/*
  • /_synapse/*
  • /_dendrite/*
  • /.well-known/matrix/*

Dirextalk product APIs use the body-action surface:

  • GET /_p2p/health
  • POST /_p2p/query
  • POST /_p2p/command
  • GET /_p2p/ws
  • GET /.well-known/portal/owner.json

The generated ProductCore action metadata is docs/product-action-contract.json; it is the checkable action list and may change as capabilities are added. Owner clients prefer client.request/server.response over the realtime WebSocket and use HTTP query/command fallback when realtime is not ready. External MCP clients use JSON-RPC over POST /mcp with an agent_token.

Authentication and transport boundaries:

  • Owner ProductCore actions use Authorization: Bearer <access_token>.
  • realtime.ws_ticket.create issues a short-lived single-use owner ticket; GET /_p2p/ws accepts that ticket, not a bearer token.
  • agent_token is limited to agent.matrix_session.create and the standard POST /mcp endpoint; it cannot create an owner WebSocket ticket or call owner actions.

Product requests use this envelope:

{
  "action": "channels.public.get",
  "params": {
    "room_id": "!room:dendrite-a:8448",
    "remote_node_base_url": "https://dendrite-a:8448/_p2p"
  }
}

dirextalk-message-server FAQ

Which apps does this work in?
Any assistant that speaks MCP can connect to it. Ordinary chat apps connect over the Matrix standard instead.
Do I need a key or a password?
Yes. Outside assistants connect with a restricted agent credential, which is deliberately limited and cannot perform owner actions.
Can I use this to keep my team chat entirely private?
Yes — you run the whole server on your own hardware and everything is stored in your own PostgreSQL database.
How hard is setup?
This is for people who already run servers. You build a Go program or start a Docker stack, and you supply the database yourself.
Can I use SQLite or a plain file database?
No. PostgreSQL is the only supported option, and file-based databases will not start.
Is this a general-purpose Matrix server?
Not really. It began as a fork of Element Dendrite but is maintained as a Dirextalk product server rather than a general Matrix distribution.