Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
Read and write a self-hosted TriliumNext knowledge base over its ETAPI.
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
TRILIUM_URL, TRILIUM_TOKEN, TRILIUM_HTTP_TIMEOUT_SECONDS, TRILIUM_MCP_LOGค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"trilium": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TRILIUM_URL",
"-e",
"TRILIUM_TOKEN",
"-e",
"TRILIUM_HTTP_TIMEOUT_SECONDS",
"-e",
"TRILIUM_MCP_LOG",
"ghcr.io/ovden13/trilium-mcp:0.1.5"
],
"env": {
"TRILIUM_URL": "ใส่ค่าของคุณ",
"TRILIUM_TOKEN": "ใส่ค่าของคุณ",
"TRILIUM_HTTP_TIMEOUT_SECONDS": "ใส่ค่าของคุณ",
"TRILIUM_MCP_LOG": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add trilium --env TRILIUM_URL='ใส่ค่าของคุณ' --env TRILIUM_TOKEN='ใส่ค่าของคุณ' --env TRILIUM_HTTP_TIMEOUT_SECONDS='ใส่ค่าของคุณ' --env TRILIUM_MCP_LOG='ใส่ค่าของคุณ' -- docker run -i --rm -e TRILIUM_URL -e TRILIUM_TOKEN -e TRILIUM_HTTP_TIMEOUT_SECONDS -e TRILIUM_MCP_LOG ghcr.io/ovden13/trilium-mcp:0.1.5เติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"trilium": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TRILIUM_URL",
"-e",
"TRILIUM_TOKEN",
"-e",
"TRILIUM_HTTP_TIMEOUT_SECONDS",
"-e",
"TRILIUM_MCP_LOG",
"ghcr.io/ovden13/trilium-mcp:0.1.5"
],
"env": {
"TRILIUM_URL": "ใส่ค่าของคุณ",
"TRILIUM_TOKEN": "ใส่ค่าของคุณ",
"TRILIUM_HTTP_TIMEOUT_SECONDS": "ใส่ค่าของคุณ",
"TRILIUM_MCP_LOG": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"trilium": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"TRILIUM_URL",
"-e",
"TRILIUM_TOKEN",
"-e",
"TRILIUM_HTTP_TIMEOUT_SECONDS",
"-e",
"TRILIUM_MCP_LOG",
"ghcr.io/ovden13/trilium-mcp:0.1.5"
],
"env": {
"TRILIUM_URL": "ใส่ค่าของคุณ",
"TRILIUM_TOKEN": "ใส่ค่าของคุณ",
"TRILIUM_HTTP_TIMEOUT_SECONDS": "ใส่ค่าของคุณ",
"TRILIUM_MCP_LOG": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
TRILIUM_HTTP_TIMEOUT_SECONDS envTRILIUM_MCP_LOG envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 9 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub OVDEN13 ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: TRILIUM_URL, TRILIUM_TOKEN
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.1.5) เข้า registry 6 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Docker ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
An MCP server that lets AI agents (Claude Desktop, Claude Code, any MCP-compatible client) read and write a self-hosted TriliumNext knowledge base over its ETAPI.
Single static Go binary. No runtime dependencies. Talks to your local Trilium over HTTP(S) and to the client over stdio.
TriliumNext is a strong personal KB: tree-of-notes with attributes (labels, relations) that double as table columns / board lanes / calendar events. This MCP exposes the right slice of ETAPI so an agent can:
It is intentionally minimal: ten tools, ~600 lines of Go, zero clever abstractions.
| Tool | Purpose |
|---|---|
create_note | Create a note (optionally under a parent, with labels in one shot). |
batch_create_notes | Create many notes in one call — saves per-call schema overhead during restructuring. |
get_note | Fetch note metadata; optionally include body content. |
get_note_subtree | Recursively fetch a note + descendants up to N levels as a nested tree — replaces N+1 get_note calls. |
update_note | Partial update: include only the fields you want to change; omitted fields stay as-is. |
append_content | Append text to the body with a configurable separator. |
delete_note | Delete a note and its subtree. |
batch_delete_notes | Delete many notes; partial failures don't stop the rest. |
move_note | Re-parent a note in two ETAPI calls (vs the old read-recreate-delete dance). |
clone_note | Add the note under an additional parent — Trilium-native multi-parent links. |
delete_branch | Remove one parent-child link without deleting the note (un-clone). |
search_notes | Full-power Trilium search (#label, ~relation, note.title %= "regex", ancestor scoping, etc.). |
add_label | Attach a label (#key=value) — acts as a "column" in collection views. |
add_relation | Attach a relation (~name → noteId) — like a foreign key between notes. |
remove_attribute | Remove a label or relation by its attribute id. |
list_attributes | List all labels and relations on a note. |
If you don't already have one:
# docker-compose.yml
services: trilium: image: triliumnext/notes:latest ports:
docker compose up -d
Open http://localhost:8092/, finish the setup wizard, then Options → ETAPI → Create new ETAPI token. Copy the token (shown only once).
Pre-built binary (recommended) — grab the right archive from Releases.
From source with Go 1.23+:
go install github.com/OVDEN13/trilium-mcp@latest
With Docker (no Go on host):
git clone https://github.com/OVDEN13/trilium-mcp && cd trilium-mcp
docker build -t trilium-mcp .
Copy .env.example to .env next to the binary:
TRILIUM_URL=http://localhost:8092
TRILIUM_TOKEN=your-etapi-token-here
Or pass the same as real environment variables — the server reads either.
Claude Code (CLI):
claude mcp add --scope user trilium /path/to/trilium-mcp \
--env TRILIUM_URL=http://localhost:8092 \ --env TRILIUM_TOKEN=your-token
Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on your OS:
{
"mcpServers": { "trilium": { "command": "/absolute/path/to/trilium-mcp", "env": { "TRILIUM_URL": "http://localhost:8092", "TRILIUM_TOKEN": "your-token" } } } }
Restart the client. The ten tools should show up as trilium__*.
Trilium's collection views (Table / Board / Calendar) render any note's children based on shared labels. So a "table" is just a parent note + child notes + a consistent label schema:
Books (parent)
├── "Atomic Habits" #status=read #rating=9 #author=Clear ├── "Antifragile" #status=read #rating=8 #author=Taleb └── "Деньги" #status=reading #author=Жонсон
An agent populates it like this:
// 1. Create the row
create_note({ parent_note_id: " ", title: "Atomic Habits", labels: { "status": "read", "rating": "9", "author": "Clear" } })
// 2. Query rows later search_notes({ query: "#status=read #rating>=8", ancestor_note_id: " " })
Flip the parent's view to Table (or Board by status, or Calendar by a date label) in the Trilium UI and you have a database without ever leaving notes.
append_content({ note_id: "<journal id>", content: "Decided to ship v0.2 on Monday." })
append_content is non-destructive — handy for daily journals, decision logs, ideation dumps.
#tag — note has label tag.#status=active — label equals.#rating>=8 — numeric comparison.~author.title *= "Clear" — follow a relation, match relation target's title.note.title %= "^Re:" — regex on title.note.content *= "kubernetes" — substring in body.#status=active OR #status=pending — boolean.ancestor_note_id to scope to a subtree.Full reference: Trilium search docs.
| Var | Default | Notes |
|---|---|---|
TRILIUM_URL | *required* | Base URL of your Trilium instance, e.g. http://localhost:8092. The /etapi path is added automatically, but a trailing /etapi is tolerated and stripped (so http://localhost:8092/etapi also works). Accepts multiple URLs separated by commas — the server tries them in order and falls back to the next one on transport errors (DNS/connection/timeout). HTTP errors like 404 are returned immediately without retry. Example: http://192.168.0.10:8092,https://memo.example.com (fast LAN first, public fallback). |
TRILIUM_TOKEN | *required* | ETAPI token from Trilium settings |
TRILIUM_HTTP_TIMEOUT_SECONDS | 30 | Per-request timeout |
TRILIUM_MCP_LOG | info | off / info / debug. Logs are written to stderr (stdout is reserved for the MCP JSON-RPC stream). info shows one line per tool call with name + duration + ok/error. debug also shows the request arguments and a truncated preview of the response. |
git clone https://github.com/OVDEN13/trilium-mcp
cd trilium-mcp go build -ldflags="-s -w" -o trilium-mcp .
Cross-compile (e.g. for macOS from Linux):
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -o trilium-mcp-darwin-arm64 .
TRILIUM_TOKEN from env. Treat it like a password — anyone with it can read and write your entire KB. Keep .env out of git (it is in .gitignore).ca-certificates).PRs welcome. Useful directions:
move_note / clone_note tools.add_label_to_many).For substantive changes, please open an issue first to discuss the shape.
MIT.
trilium-mcp is an independent project; it is not endorsed by or affiliated with the TriliumNext project. TriliumNext itself is AGPL-3.0; this MCP server talks to it only over its public ETAPI.