MM

mjknowles/matrix-mcp-server

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

57 stars 26 forks Качество 69 Тренд 0MIT

mjknowles/matrix-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/mjknowles/matrix-mcp-server.

Обзор

mjknowles/matrix-mcp-server - кандидат на сервер MCP, импортированный из https://github.com/mjknowles/matrix-mcp-server.

Обзор (машинный перевод)

Всеобъемлющий сервер Model Context Protocol (MCP), обеспечивающий безопасный доступ к функциям домашнего сервера Matrix. Этот сервер, построенный с помощью TypeScript, позволяет клиентам MCP взаимодействовать с комнатами Matrix, сообщениями, пользователями и т.д. через стандартизированный интерфейс.

Особенности

OAuth 2.0 Authentication с поддержкой обмена токенами 15 Matrix Tools организованы по функциональным уровням ** Поддержка нескольких серверов** с настраиваемыми конечными точками ** Операции в режиме реального времени** с эфемерным управлением клиентами Производство готово с полной обработкой ошибок ** Богатые ответы** с подробными данными Матрицы

Быстрый старт

Предпосылки

Node.js 20+ и npm Матричный домашний сервер доступ (Synapse, Dendrite и др.) MCP клиент (Claude Desktop, VS Code с расширением MCP и др.)

###Установка

Режим разработки

Доступные инструменты

Tier 0: Инструменты только для чтения

####Инструменты

list-joined-rooms — Получить все номера, к которым присоединился пользователь

  • Не требуется никаких параметров
  • Возвращает имена комнат, идентификаторы и количество членов

get-room-info - Получить подробную информацию о номере

  • [[Т2]] (струна): Идентификатор номера матрицы (например, [[Т3]])

Эта страница переведена автоматически. Технические детали смотрите в оригинале.

README

Показан фрагмент оригинального README. Открыть оригинал.

Matrix MCP Server

A comprehensive Model Context Protocol (MCP) server that provides secure access to Matrix homeserver functionality. Built with TypeScript, this server enables MCP clients to interact with Matrix rooms, messages, users, and more through a standardized interface.

Features

  • 🔐 OAuth 2.0 Authentication with token exchange support
  • 📱 15 Matrix Tools organized by functionality tiers
  • 🏠 Multi-homeserver Support with configurable endpoints
  • 🔄 Real-time Operations with ephemeral client management
  • 🚀 Production Ready with comprehensive error handling
  • 📊 Rich Responses with detailed Matrix data

Quick Start

Prerequisites

  • Node.js 20+ and npm
  • Matrix homeserver access (Synapse, Dendrite, etc.)
  • MCP client (Claude Desktop, VS Code with MCP extension, etc.)

Installation

# Clone the repository
git clone 
cd matrix-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

# Configure environment
cp .env.example .env
# Edit .env with your settings

# Start the server
npm start

Development Mode

# Start with hot reload (OAuth disabled for easier testing)
npm run dev

# Or start with OAuth enabled
ENABLE_OAUTH=true npm run dev

Available Tools

📖 Tier 0: Read-Only Tools

Room Tools

  • list-joined-rooms - Get all rooms the user has joined

    • No parameters required
    • Returns room names, IDs, and member counts
  • get-room-info - Get detailed room information

    • roomId (string): Matrix room ID (e.g., !roomid:domain.com)
    • Returns name, topic, settings, creator, and member count
  • get-room-members - List all members in a room

    • roomId (string): Matrix room ID
    • Returns display names and user IDs of joined members

Message Tools

  • get-room-messages - Retrieve recent messages from a room

    • roomId (string): Matrix room ID
    • limit (number, default: 20): Maximum messages to retrieve
    • Returns formatted message content including text and images
  • get-messages-by-date - Filter messages by date range

    • roomId (string): Matrix room ID
    • startDate (string): ISO 8601 format (e.g., 2024-01-01T00:00:00Z)
    • endDate (string): ISO 8601 format
    • Returns messages within the specified timeframe
  • identify-active-users - Find most active users by message count

    • roomId (string): Matrix room ID
    • limit (number, default: 10): Maximum users to return
    • Returns users ranked by message activity

User Tools

  • get-user-profile - Get profile information for any user

    • targetUserId (string): Target user’s Matrix ID (e.g., @user:domain.com)
    • Returns display name, avatar, presence, and shared rooms
  • get-my-profile - Get your own profile information

    • No parameters required
    • Returns your profile, device info, and room statistics
Открыть полный README на GitHub

Установка

npx @modelcontextprotocol/inspector
Новичок в MCP? Начните с руководства на mcpskill.org →