
perfectra1n/triliumnext-mcp
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
perfectra1n/triliumnext-mcp - кандидат на сервер MCP, импортированный из T0
Обзор
perfectra1n/triliumnext-mcp - кандидат на сервер MCP, импортированный из T0
Обзор (машинный перевод)
Сервер Model Context Protocol (MCP) для взаимодействия с TriliumNext через ETAPI. Позволяет LLM создавать, читать, обновлять и организовывать заметки, включая встраивание изображений и файлов непосредственно в содержимое заметок.
Содержимое
- Особенности
- Установка
- Конфигурация - CLI, env vars, конфигурационный файл
- Logging - что регистрируется, куда идет, как настроить
Метрики — Prometheus
/metricsконечная точка, режимы аута, открытые серии Доступные инструменты - Встраивание изображений и файлов Многопользовательское развертывание HTTP - запустите один сервер для многих пользователей
- Архитектура
- Быстрый старт (Docker) / (местный)
- HTTP конечные точки · ответы на ошибки · Запрос ограничений размера тела Подключение клиентов — Claude Desktop, Claude Code, SDK
- JWT / OIDC gateway auth · CORS · Ограничение скорости
- StreamableHTTP transport - новый транспорт MCP наряду с
/sse - Аудиторский аудит + метрики
- конфигурация SSRF · обратный прокси Модель безопасности · Устранение неполадок Отладка с помощью MCP Inspector
- Разработка - сборка, тестирование, докер Получение токена ETAPI
Особенности
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
TriliumNext MCP Server
A Model Context Protocol (MCP) server for interacting with TriliumNext via its ETAPI. Enables LLMs to create, read, update, and organize notes — including embedding images and files directly into note content.
Contents
- Features
- Installation
- Configuration — CLI, env vars, config file
- Logging — what gets logged, where it goes, how to tune it
- Metrics — Prometheus
/metricsendpoint, auth modes, exposed series - Available Tools
- Embedding Images and Files
- Multi-tenant HTTP deployment — run one server for many users
- Architecture
- Quick start (Docker) / (local)
- HTTP endpoints · Error responses · Request body size limits
- Connecting clients — Claude Desktop, Claude Code, SDK
- JWT / OIDC gateway auth · CORS · Rate limiting
- StreamableHTTP transport — newer MCP transport alongside
/sse - Per-tenant audit + metrics
- SSRF configuration · Reverse-proxy
- Security model · Troubleshooting
- Debugging with MCP Inspector
- Development — build, test, docker
- Getting an ETAPI Token
Features
- 20 tools across 8 categories for full note management, search, organization, attachments, revisions, and system operations (consolidated from 35 in v1 — see Migrating from v1)
- Server-built note links — write `` or
[text](note:abc123)and the server emits a proper Trilium reference link (path,class,data-note-path), rejecting links to notes that don’t exist - Note context on demand —
get_notecan return tree breadcrumbs (include_path) and backlinks (include_backlinks);search_notescan attach plain-text content previews (content_preview_chars) - Revision restore —
restore_revisionrolls a note back, snapshotting the current state first so the restore is reversible - Resilient ETAPI client — per-request timeouts, automatic retry of idempotent requests on network errors and 502/503/504, and clear
TRILIUM_UNREACHABLE/TRILIUM_TIMEOUTerrors - MCP tool annotations (
readOnlyHint,destructiveHint,idempotentHint,title) on every tool for better approval-dialog UX in clients that surface them - Inline image and file embedding — attach images and files when creating or updating notes in a single tool call
- Data URL support — pass image/file data as raw base64 or
data:URLs
Установка
npx -y mcp-remote https://mcp.example.com/sse --header Authorization: Bearer YOUR_GATEWAY_TOKEN --header X-Trilium-Url: https://notes.example.com --header X-Trilium-Token: YOUR_ETAPI_TOKENКонфигурация
{
"mcpServers": {
"trilium": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://mcp.example.com/sse",
"--header", "Authorization: Bearer YOUR_GATEWAY_TOKEN",
"--header", "X-Trilium-Url: https://notes.example.com",
"--header", "X-Trilium-Token: YOUR_ETAPI_TOKEN"
]
}
}
}