Skip to content

Your Trilium notes, as tools for Claude

trilium-mcp runs next to your Trilium server and lets Claude, IDEs and other MCP clients search, read and write your notes from anywhere, through every documented ETAPI endpoint.

Set it up Connect a client

Once the container is reachable, connecting Claude Code from any machine takes one command, then /mcp to log in with your Trilium password:

claude mcp add trilium --scope user --transport http \
  https://trilium-mcp.example.com/mcp

Running more than one Trilium? Add one container and one named connection per instance, see Multiple Trilium instances.

What it does

  • Works from any device. Trilium's built-in MCP server only answers on localhost, so your client has to run on the Trilium machine. trilium-mcp is served over HTTP, so Claude on your laptop, phone or the web can reach it through a reverse proxy.
  • Covers the whole ETAPI. All 38 tools (createNote, getNoteById, searchNotes, exportNoteSubtree, …) are generated at startup from Trilium's OpenAPI spec, so nothing is hand-picked or left out.
  • Runs as a sidecar. One small container on the same Docker network as Trilium. Only trilium-mcp is exposed; Trilium's ETAPI never has to be reachable on its own.
  • Two ways to sign in. Log in once in the browser with your Trilium password (OAuth, for remote and app clients), or send an ETAPI token with each request (for scripts and the local network). See Choosing an auth method.
  • Stores nothing in token mode. Each client's token is forwarded to Trilium per request, so one sidecar serves many clients.
flowchart LR
  app["App client<br>OAuth login"]
  headless["Headless client<br>ETAPI token"]
  lan["Client on a trusted LAN<br>ETAPI token"]
  proxy["Reverse proxy<br>TLS"]
  subgraph host["Docker host"]
    mcp["trilium-mcp<br>:8081 /mcp"]
    oauth[("mcp-oauth<br>encrypted")]
    trilium["Trilium<br>:8080 /etapi"]
    data[("trilium-data")]
  end
  app -- HTTPS --> proxy
  headless -- HTTPS --> proxy
  lan -- HTTP --> mcp
  proxy --> mcp
  mcp -- OAuth logins --> oauth
  mcp -- ETAPI --> trilium
  trilium --> data
  classDef accent fill:#98D486,stroke:#2f7a27,color:#10200c,stroke-width:1.5px
  class mcp accent

Using Claude Code?

Pair this server with trilium-plugin, the client-side counterpart. It bundles the .mcp.json wiring plus ready-made skills (create, move, rename and search notes, manage attributes, work with templates and journal notes, export a subtree) that call these tools for you.