communication
Matrix MCP, CLI, and Lua Integration for AI Agents
Matrix integration docs for AI agents: MCP gateway setup, Matrix CLI commands, Lua API reference, credentials, and function schemas.
7 functions 5 read 2 write Bearer token auth
Matrix for agents
Credentials can be configured manually in web or CLI hosts.
Use this integration from Lua code mode, the headless integrations CLI, or the KosmoKrator MCP gateway. The same package metadata powers all three surfaces.
Machine-Readable Metadata
- integration_slug
matrix- route_slug
matrix- package
matrix- auth_strategy
bearer_tokenBearer token- cli_setup_supported
true- cli_runtime_supported
true- mcp_gateway_supported
true- lua_supported
true- supports_multi_account
true
Quick Links
Lua APIAgent-facing namespace and function reference. Matrix CLIHeadless setup and direct function calls. Matrix MCPMCP gateway setup for external clients. Submit feedbackReport missing tools, auth problems, wrong docs, or runtime issues. ContributeAdd tools or improve metadata in the integrations repo.
Matrix MCP Client Matrix
Use these pages when a specific agent client or framework needs copy-pasteable MCP setup for Matrix.
Claude Code Matrix MCP setup for Claude Code. Cursor Matrix MCP setup for Cursor. Codex Matrix MCP setup for Codex. OpenAI Agents Matrix MCP setup for OpenAI Agents SDK. Claude Agent SDK Matrix MCP setup for Claude Agent SDK. Vercel AI SDK Matrix MCP setup for Vercel AI SDK. LangChain Matrix MCP setup for LangChain. LangGraph Matrix MCP setup for LangGraph. CrewAI Matrix MCP setup for CrewAI. MCP clients Matrix MCP setup for Generic MCP Clients.
Matrix CLI Matrix
Use these pages for direct Matrix CLI workflows in scripts, CI, cron, and agent wrappers.
CI Matrix CLI for CI. Cron Jobs Matrix CLI for cron jobs. Shell Scripts Matrix CLI for shell scripts. Headless Automation Matrix CLI for headless automation. Coding Agents Matrix CLI for coding agents.
Function Catalog
| Function | Type | Parameters | Description |
|---|---|---|---|
matrix.matrix_list_rooms | Read read | 2 | List rooms the authenticated user has joined on Matrix. Returns room IDs, names, and aliases. |
matrix.matrix_get_room | Read read | 1 | Get details of a specific Matrix room, including name, topic, members, and aliases. |
matrix.matrix_create_room | Write write | 4 | Create a new room on the Matrix homeserver. Returns the newly created room ID. |
matrix.matrix_send_message | Write write | 4 | Send a text message to a Matrix room. Uses a unique transaction ID to prevent duplicate messages. |
matrix.matrix_list_members | Read read | 2 | List members of a Matrix room. Returns user IDs, display names, and avatar URLs. |
matrix.matrix_get_profile | Read read | 1 | Get a Matrix user's profile information, including display name and avatar URL. |
matrix.matrix_get_current_user | Read read | 0 | Get the currently authenticated Matrix user's information, including user ID and device ID. |