{"_id":"@aimbitgmbh/trillium-mcp","_rev":"2-ca8eec10e34f11969dfa6f1c4c809391","name":"@aimbitgmbh/trillium-mcp","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@aimbitgmbh/trillium-mcp","version":"0.1.0","keywords":["mcp","model-context-protocol","llm","ai-assistant","ai-integration","trilium","triliumnext","notes","knowledge-base","knowledge-management","etapi","note-taking","personal-knowledge"],"author":{"url":"https://aimbit.de","name":"aimbit GmbH","email":"info@aimbit.de"},"license":"MIT","_id":"@aimbitgmbh/trillium-mcp@0.1.0","maintainers":[{"name":"aimbit-ni","email":"ni@aimbit.de"}],"homepage":"https://github.com/aimbitgmbh/trillium-mcp#readme","bugs":{"url":"https://github.com/aimbitgmbh/trillium-mcp/issues"},"bin":{"trillium-mcp":"dist/index.js"},"dist":{"shasum":"8e7d4ca27eb851c051efd62f56c8b672524a6d06","tarball":"https://registry.npmjs.org/@aimbitgmbh/trillium-mcp/-/trillium-mcp-0.1.0.tgz","fileCount":52,"integrity":"sha512-cPZM/4BQQb0O9Zx3BxY9NogbdFZpRKEQlE1//cYvtkTvbaNuQtwTXORAfImiH4U0bEzm6WR0620fYVsk9P39yg==","signatures":[{"sig":"MEUCIF0Ume02RfrAg10UCwW2iAu+LcKAhKORtSe9YOteplbyAiEAqcOpQJ53Q2w2BELkCLZNPaG8h9ZKJCDJZRrSevxoqEc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":337191},"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"b18df1029320ba350dbbd1ab54a9da04a3e62ddc","scripts":{"dev":"tsx --import dotenv/config src/index.ts","test":"echo \"Error: no test specified\" && exit 1","build":"node node_modules/typescript/bin/tsc && chmod +x dist/index.js","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"aimbit-ni","email":"ni@aimbit.de"},"repository":{"url":"git+https://github.com/aimbitgmbh/trillium-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for Trilium Notes - Provides LLM access to your notes","directories":{},"_nodeVersion":"20.19.6","dependencies":{"zod":"^4.3.4","dotenv":"^16.4.7","marked":"^17.0.1","turndown":"^7.2.2","@modelcontextprotocol/sdk":"^1.25.1"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","ts-node":"^10.9.2","typescript":"^5.9.3","@types/node":"^25.0.3","@types/marked":"^5.0.2","@types/turndown":"^5.0.6"},"_npmOperationalInternal":{"tmp":"tmp/trillium-mcp_0.1.0_1767893917807_0.35783883088955326","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@aimbitgmbh/trillium-mcp","version":"0.2.0","description":"Model-neutral MCP server for TriliumNext Notes via ETAPI","main":"dist/index.js","type":"module","bin":{"trillium-mcp":"dist/index.js"},"scripts":{"dev":"tsx src/index.ts","build":"npm run clean && node node_modules/typescript/bin/tsc && node -e \"require('node:fs').chmodSync('dist/index.js', 0o755)\"","clean":"rm -rf dist","typecheck":"node node_modules/typescript/bin/tsc -p tsconfig.tests.json --noEmit","test":"tsx --test test/**/*.test.ts","test:live":"tsx scripts/live-test.ts","test:model":"tsx scripts/model-eval.ts","check":"npm run typecheck && npm test && npm run build","prepare":"npm run build","prepublishOnly":"npm test"},"keywords":["mcp","model-context-protocol","llm","ai-assistant","ai-integration","trilium","triliumnext","notes","knowledge-base","knowledge-management","etapi","note-taking","personal-knowledge"],"author":{"name":"aimbit GmbH","email":"info@aimbit.de","url":"https://aimbit.de"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aimbitgmbh/trillium-mcp.git"},"homepage":"https://github.com/aimbitgmbh/trillium-mcp#readme","bugs":{"url":"https://github.com/aimbitgmbh/trillium-mcp/issues"},"engines":{"node":">=22.19.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.30.0","dotenv":"^17.4.2","marked":"^18.0.11","turndown":"^7.2.4","undici":"^8.10.1","zod":"^4.5.4"},"devDependencies":{"@types/node":"^22.20.1","@types/turndown":"^5.0.6","ajv":"^8.20.0","tsx":"^4.23.1","typescript":"^7.0.0"},"overrides":{"fast-uri":"3.1.5"},"_id":"@aimbitgmbh/trillium-mcp@0.2.0","gitHead":"817499bcc2cd099becbe477861de08510de7b93b","types":"./dist/index.d.ts","_nodeVersion":"22.23.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-7mOwCuoc/Sq09JUjJzQVen6tmTT7bTaiuL+TScmJjfUq6EX4JctAwbDcpCIf8NgbA8LNF8Ha698GqTnV1okxgg==","shasum":"7e8bd1c19d3020fcde4f243efd9ee9f4ab47384d","tarball":"https://registry.npmjs.org/@aimbitgmbh/trillium-mcp/-/trillium-mcp-0.2.0.tgz","fileCount":58,"unpackedSize":221959,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCJafDn9EZmoQE5HV9D12VDgX7ezy60cSIFXHWMhlYWtwIhAN3uRdAyXRFmvS0Ohal3qO0FS06Z5PS4BCLz/vBVqgID"}]},"_npmUser":{"name":"aimbit-ni","email":"ni@aimbit.de"},"directories":{},"maintainers":[{"name":"aimbit-ni","email":"ni@aimbit.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/trillium-mcp_0.2.0_1788358081923_0.8768057582913416"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-08T17:38:37.713Z","modified":"2026-09-02T14:08:02.331Z","0.1.0":"2026-01-08T17:38:37.986Z","0.2.0":"2026-09-02T14:08:02.055Z"},"bugs":{"url":"https://github.com/aimbitgmbh/trillium-mcp/issues"},"author":{"name":"aimbit GmbH","email":"info@aimbit.de","url":"https://aimbit.de"},"license":"MIT","homepage":"https://github.com/aimbitgmbh/trillium-mcp#readme","keywords":["mcp","model-context-protocol","llm","ai-assistant","ai-integration","trilium","triliumnext","notes","knowledge-base","knowledge-management","etapi","note-taking","personal-knowledge"],"repository":{"type":"git","url":"git+https://github.com/aimbitgmbh/trillium-mcp.git"},"description":"Model-neutral MCP server for TriliumNext Notes via ETAPI","maintainers":[{"name":"aimbit-ni","email":"ni@aimbit.de"}],"readme":"# TriliumNext MCP Server\n\n[![npm version](https://img.shields.io/npm/v/@aimbitgmbh/trillium-mcp)](https://www.npmjs.com/package/@aimbitgmbh/trillium-mcp)\n[![CI](https://github.com/aimbitgmbh/trillium-mcp/actions/workflows/ci.yml/badge.svg)](https://github.com/aimbitgmbh/trillium-mcp/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n\nA compact, model-neutral [Model Context Protocol](https://modelcontextprotocol.io/) server for [TriliumNext Notes](https://github.com/TriliumNext/Trilium). It exposes notes, revisions, attachments, branches, attributes, calendar notes, and inbox access through Trilium's ETAPI.\n\nVersion 0.2.0 is validated against TriliumNext 0.105.0 and with a Qwen 3.8 27B model. It does not depend on any particular model vendor.\n\n## Requirements\n\n- Node.js 22.19 or newer\n- A reachable TriliumNext instance\n- An ETAPI token from Trilium's settings\n\n## Run with npx\n\n```json\n{\n  \"mcpServers\": {\n    \"trilium\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@aimbitgmbh/trillium-mcp@latest\"],\n      \"env\": {\n        \"TRILLIUM_API_URL\": \"https://notes.example.com/etapi\",\n        \"TRILLIUM_API_TOKEN\": \"your-etapi-token\",\n        \"TRILLIUM_PERMISSIONS\": \"READ\"\n      }\n    }\n  }\n}\n```\n\nThe server only connects to Trilium. A model base URL, model name, and model API key belong in your MCP host or model gateway configuration, not in this server.\n\n## Configuration\n\n| Variable | Default | Purpose |\n| --- | --- | --- |\n| `TRILLIUM_API_URL` | required | Full ETAPI base URL ending in `/etapi` |\n| `TRILLIUM_API_TOKEN` | required | ETAPI token; keep it secret |\n| `TRILLIUM_PERMISSIONS` | `READ` | Exactly `READ` or `READ;WRITE` |\n| `TRILLIUM_VERIFY_SSL` | `true` | Set to `false` only for a trusted self-signed endpoint |\n| `TRILLIUM_REQUEST_TIMEOUT_MS` | `30000` | Request timeout, 100–300000 ms |\n| `TRILLIUM_MAX_ATTACHMENT_BYTES` | `26214400` | Maximum upload size, 25 MiB by default |\n| `TRILLIUM_EXPORTS_DIR` | `~/Downloads/trillium-exports` | Destination for downloaded attachment/revision bytes |\n\nSee [.env.example](.env.example). `READ` is the safe default. Calendar and inbox GET endpoints can create notes and are therefore only exposed with `READ;WRITE`.\n\n## Tools\n\nThe complete `READ;WRITE` surface contains 38 tools:\n\n- Notes and content: `notes_search`, `note_get`, `note_create`, `note_overwrite`, `note_delete`, `note_undelete`, `note_create_revision`, `note_reorder`, `note_list_children`, `note_reorder_children`, `note_edit`, `note_prepend`, `note_append`, `note_grep`, `note_get_lines`\n- History and revisions: `notes_history`, `note_list_revisions`, `revision_get`\n- Attachments: `note_list_attachments`, `attachments_get`, `attachments_get_content`, `attachments_create`, `attachments_update`, `attachments_update_content`, `attachments_delete`\n- Tree branches: `branches_get`, `branches_create`, `branches_update`, `branches_delete`\n- Attributes: `attributes_get`, `attributes_create`, `attributes_update`, `attributes_delete`\n- Calendar and inbox: `calendar_get_day`, `calendar_get_week`, `calendar_get_month`, `calendar_get_year`, `inbox_get`\n\nWith `READ`, 13 non-mutating Trilium tools are exposed. Attachment downloads write only to the configured local export directory. Week notes require Trilium's `enableWeekNote` calendar-root label.\n\nDeletion follows Trilium semantics: `note_delete` soft-deletes the note and its descendants. Deleting a note's last strong branch can do the same. `note_undelete` restores a deleted note.\n\n## Development\n\n```bash\nnpm install\nnpm test\nnpm run build\nnpm audit --omit=dev\n```\n\nLive and model tests are opt-in and never run in CI:\n\n```bash\nTRILLIUM_API_URL=... TRILLIUM_API_TOKEN=... TRILLIUM_PERMISSIONS=READ\\;WRITE npm run test:live\nOPENAI_BASE_URL=... OPENAI_API_KEY=... OPENAI_MODEL=... npm run test:model\n```\n\nThe model test uses the common OpenAI-compatible chat-completions interface only as an evaluation harness. No credentials are stored.\n\n## Reliability and security\n\n- Request bodies use explicit JSON, text, or binary content types.\n- Attachment bytes are preserved exactly and download paths are sanitized.\n- Requests time out; only transport-failed GET requests are retried once. Writes are never retried automatically.\n- API error bodies are capped before being returned.\n- TLS certificate validation is enabled by default.\n\n## License\n\nMIT © [aimbit GmbH](https://aimbit.de). The vendored Trilium ETAPI OpenAPI document retains its upstream license metadata.\n","readmeFilename":"README.md"}