Model Context Protocol allows external chat applications such as Claude Code to have access to the Trilium database.

## Built-in MCP

v0.103.0 comes with a built-in MCP server that is not active by default. To activate it, go to Options → AI/LLM and toggle the MCP server option.

Once the MCP is active, simply add the MCP server to your AI assistant. The URL to use is displayed in the Endpoint URL information underneath the MCP toggle.

Only the HTTP transport is supported, the `stdio` method is not supported. If that is a blocker, consider using a third-party alternative listed below.

The tools exposed to the MCP are the same tools that are supported by the internal chat (see the Note access section).

### Authentication

To protect your notes from unauthorized access, the MCP server requires authentication. Generally MCP servers need to support OAuth for authentication, but Trilium uses a simpler mechanism using Bearer tokens.

To configure authentication, first create an ETAPI (REST API) token by going to Options → ETAPI. Then follow the instructions in Options → AI / LLM, by looking at the How to connect an assistant section under MCP.

## Third-party alternatives

The following are alternatives to Trilium's built-in MCP feature. Since Trilium's AI implementation is still experimental, its tooling might not be as mature as external tools.

- perfectra1n/triliumnext-mcp
- tan-yong-sheng/triliumnext-mcp
- eliassoares/trilium-fastmcp

These solutions are third-party and thus not endorsed or supported directly by the Trilium Notes team. Please address questions and issues on their corresponding repository instead.