Matrix integration
Matrix client-server API for a self-hosted homeserver such as Synapse: send messages into a room, create, join and leave rooms, invite members, read and write room state, page through room history, poll for new events with sync, read and update a profile, list joined rooms and members, redact an event, search the user directory and upload media. Authentication uses an access token sent as a bearer token.
Say what should happen.
The workflow builds itself.
Common Matrix use cases
- branding a bot account
- spinning up a room per incident
- summarising the last hour of a room
- validating credentials before a run
- discovering which rooms a bot serves
- sending build alerts into a team room
- sharing a generated report into a room
- expanding the message a reply points at
- removing a message that leaked a secret
- cleaning up rooms a bot no longer serves
What you can do with Matrix
Each of these is one operation on one endpoint, available both as a workflow step and as a tool an AI agent can call on its own. Nothing bundles several operations into one action, so what a run did stays readable afterwards.
Most endpoints run on the free plan. A few, mainly the ones that publish on your behalf, need a paid plan.
Room, 7 operations
create_roomCreate roomPOSTCreates a room and returns its room identifier.get_room_stateGet room stateGETReturns the current state of a room as a list of state events.invite_userInvite userPOSTSends a room invitation to one user.join_roomJoin roomPOSTMakes the authenticated account a member of a room.leave_roomLeave roomPOSTRemoves the authenticated account from a room.list_joined_roomsList joined roomsGETReturns the room identifiers the account is currently a member of.set_room_stateSet room statePUTSets one piece of room state and returns the resulting event identifier.
Event, 3 operations
get_eventGet eventGETReads one event by identifier.redact_eventRedact eventPUTRemoves the content of a message or state event from a room.syncSyncGETReturns everything new for the account since a given sync token.
Message, 2 operations
get_room_messagesGet room messagesGETReturns a page of room history with tokens for the next page.send_messageSend messagePUTPosts a message into a room and returns the event identifier.
Profile, 2 operations
get_profileGet profileGETReads the display name and avatar of a user.set_display_nameSet display namePUTChanges the display name shown next to the account in every room.
Account, 1 operation
whoamiWhoamiGETReturns the user identifier behind the current access token.
Media, 1 operation
upload_mediaUpload mediaPOSTStores a file and returns the mxc content URI that identifies it.
Member, 1 operation
list_joined_membersList joined membersGETReturns the joined members of a room with their display names.
User, 1 operation
search_user_directorySearch user directoryPOSTFinds users by display name or by user identifier.
Use Matrix from Claude Code, Cursor or Codex
Connect Matrix in LiveContext, create an API key in Settings, then add the LiveContext MCP server to your client. Its Matrix operations become tools the client can call, next to every other integration you connected.
claude mcp add --transport http livecontext https://livecontext.ai/mcp --header "X-API-Key: YOUR_API_KEY"[mcp_servers.livecontext]
url = "https://livecontext.ai/mcp"
[mcp_servers.livecontext.http_headers]
"X-API-Key" = "YOUR_API_KEY"{
"mcpServers": {
"livecontext": {
"type": "http",
"url": "https://livecontext.ai/mcp",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}How to connect Matrix
- Create your workspace
Sign up free. Nothing to install.
- Connect Matrix once
Add your Matrix connection in Settings. Every tool from this integration reuses it, and secrets are encrypted at rest and visible only to you.
- Describe the job in chat
The workflow builds itself in front of you and picks the endpoints it needs. Drag the steps yourself on the canvas whenever you would rather be explicit.
Matrix integration FAQ
What can you do with the Matrix integration?
LiveContext exposes 18 operations on Matrix, covering room, event, message and profile. Common uses include branding a bot account, spinning up a room per incident and summarising the last hour of a room.
