Matrix

Matrix

Interact with a Matrix homeserver.

27
Stars
9
Forks
1
Releases

Overview

Matrix MCP Server is a TypeScript-based MCP server that provides secure, standardized access to Matrix homeserver functionality via the MCP interface. It enables MCP clients to interact with Matrix rooms, messages, users, and related data while isolating each operation with ephemeral Matrix clients. The server supports two authentication modes: OAuth 2.0 with token exchange for production deployments, and a development mode that uses direct Matrix access tokens. It includes multi-homeserver support with configurable endpoints and a suite of tools organized by tiers: Tier 0 read-only tools (room, message, user, search, and notification inquiries) and Tier 1 action tools (messaging, room lifecycle, and room administration). The architecture is three-layer: an HTTP layer (Express-based) with OAuth integration, an MCP layer that registers tools and routes requests, and a Matrix layer that handles homeserver communication. Each tool creates ephemeral Matrix clients, performs the requested operation, and cleans up automatically. The README also covers environment configuration (.env), client integration examples (Claude and VS Code), and development workflows.

Details

Owner
mjknowles
Language
TypeScript
License
MIT License
Updated
2025-12-07

Features

OAuth 2.0 Authentication with token exchange support

Full OAuth 2.0 integration with token exchange to authenticate Matrix clients securely in production.

15 Matrix Tools organized by functionality tiers

A broad set of tools split into Tier 0 read-only and Tier 1 action tools for rooms, messages, users, and more.

Multi-homeserver Support with configurable endpoints

Supports multiple Matrix homeservers with configurable endpoints for flexible deployments.

Real-time Operations with ephemeral client management

Operations are performed with ephemeral Matrix clients, enabling real-time interactions while ensuring cleanup.

Production Ready with comprehensive error handling

Robust error handling and validation to support reliable production deployments.

Rich Responses with detailed Matrix data

Returns structured, detailed Matrix data including rooms, messages, and user information.

Audience

MCP client developersDevelopers building MCP clients (e.g., Claude Desktop, VS Code MCP extension) to interact with Matrix homeserver functionality via the MCP server.

Tags

MCP serverMatrixMatrix homeserverOAuth 2.0TypeScriptmulti-homeserverephemeral clientsreal-time operationsroom toolsmessaging toolsroom administrationpermissions