Ygdria MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Ygdria MCP Serversearch my notes for project ideas"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Ygdria MCP Server
一个轻量的 MCP ↔ Ygdria ETAPI 适配器。AI 客户端通过标准 MCP 协议搜索、读取和编辑 Ygdria 笔记;本项目不实现笔记数据库,也不会绕过 Ygdria ETAPI。
AI Client ── MCP/stdio ──> Ygdria MCP Server ── HTTP ETAPI ──> Ygdria Desktop要求与安装
Node.js 18 或更高版本
正在运行且已启用 ETAPI 的 Ygdria Desktop
用户自己创建的 ETAPI Token
git clone <this-repository-url> ygdria-mcp
cd ygdria-mcp
npm install
npm run build
Copy-Item ygdria-mcp.example.ini ygdria-mcp.ini # PowerShell不要把 Token 写入代码、提交到 Git,或放进 MCP 客户端配置。Token 过期后只需更新 INI,并重启 MCP 服务进程。
Related MCP server: triliumnext-mcp
配置
推荐复制 INI 模板并填写:
[etapi]
token = 你的 ETAPI Token
url = http://127.0.0.1:4318
allowWrite = false模板文件是 ygdria-mcp.example.ini,复制后实际配置文件名为 ygdria-mcp.ini,且已经加入 .gitignore。默认会读取项目根目录中的该文件。
环境变量主要保留给自动化或临时调试使用,优先级高于 INI。日常使用请把短期 Token 放在 ygdria-mcp.ini,不要放在 MCP 客户端配置中:
环境变量 | 必需 | 默认值 | 说明 |
| 条件必需 | INI 中的 | 用户提供的 ETAPI Token |
| 否 |
| Ygdria ETAPI origin,只允许 HTTP(S) origin,不接受路径 |
| 否 |
| 设为 |
| 否 | 项目根目录的 | 指定另一个 INI 文件路径 |
默认是只读模式。只有显式设置 YGDRIA_ALLOW_WRITE=true 并重启服务后,写工具才会注册到 MCP 客户端。建议日常保持只读,仅在确实需要编辑时临时开启。
填写 INI 后可直接启动:
npm startstdio 的 stdout 专用于 MCP 消息;启动错误只会写到 stderr。本项目不启动 HTTP Server。
MCP Tools
Tool | 模式 | ETAPI | 说明 |
| 只读 |
| 搜索笔记;可选 |
| 只读 |
| 按精确 tag 搜索;可选 |
| 只读 |
| 列出 ETAPI 可用的全部 tag |
| 只读 |
| 分页读取顶层 placement;树导航的唯一入口,不提供完整根树 |
| 只读 |
| 读取单个 placement 的最小导航信息 |
| 只读 |
| 分页读取直接子节点;依据 |
| 只读 |
| 在显式深度和节点上限内读取子树 |
| 只读 |
| 通过标题片段定位候选 placement,再使用其 ID 导航 |
| 只读 |
| 读取正文和 |
| 需写授权 |
| 仅在用户明确要求创建时调用;网络异常后不得自动重试 |
| 需写授权 |
| 必须传 |
| 需写授权 |
| 首选的最小编辑工具:以字面 |
| 需写授权 |
| 以 Markdown 替换全文,并用 |
| 需写授权 |
| 移动 placement,而不是 note |
服务还提供动态 MCP Resource:
ygdria://note/{noteId}读取 Resource 时固定通过 GET /etapi/notes/:noteId?format=markdown 返回 Markdown 正文。
安全模型
默认只注册五个只读工具;写入需要进程级显式授权。
只访问
/etapi/*。配置 URL 不允许携带路径,因此不能被配置成/api/v1/*。认证请求只发送
Authorization: Bearer <ETAPI_TOKEN>,不使用X-Ygdria-Local-Token。不访问 SQLite,不实现删除笔记或清空回收站,不添加缓存、同步或新的认证系统。
ETAPI 不返回受保护笔记正文时,本服务直接保留权限边界,不尝试获取主密码、设备 Token 或 Local Token。
401要求停止并重新配置 Token;403停止且不绕过权限;404报告目标不存在;写操作的409重新读取最新状态;415提示检查 Content-Type;422表示精确编辑无法唯一、完整地定位目标,须重新读取后生成补丁。
客户端配置
下面示例中的绝对路径请替换成你的 dist/index.js 路径。Windows JSON 路径中的反斜杠需要写成 \\。Token 和写权限均从项目根目录的 ygdria-mcp.ini 读取,不写入 MCP 客户端配置。
Claude Desktop
编辑 Claude Desktop 的 MCP 配置并重启客户端:
{
"mcpServers": {
"ygdria": {
"command": "node",
"args": ["D:\\path\\to\\ygdria-mcp\\dist\\index.js"]
}
}
}Cursor
在项目的 .cursor/mcp.json 或 Cursor 的用户级 MCP 配置中添加:
{
"mcpServers": {
"ygdria": {
"command": "node",
"args": ["D:\\path\\to\\ygdria-mcp\\dist\\index.js"]
}
}
}OpenAI Codex CLI(本地 stdio)
Codex CLI、IDE 扩展和桌面端共用 MCP 配置。可通过 CLI 注册本地 stdio 服务:
codex mcp add ygdria -- node /absolute/path/to/ygdria-mcp/dist/index.js也可在 Codex 的 config.toml 中配置等价的 [mcp_servers.ygdria] 项。可参考 OpenAI Codex MCP 文档。
VS Code Codex 扩展
VS Code 中的 Codex 扩展与 Codex CLI 共用 MCP 配置,因此不需要维护另一份 JSON 文件。推荐使用以下任一方式。
方式一:在扩展界面添加。
打开 VS Code 中的 Codex 面板。
点击齿轮菜单,选择 MCP servers。
点击 Add server。
名称填写
ygdria,类型选择STDIO。如果界面分别提供命令和参数字段,填写:
Command:
nodeArguments:
D:\path\to\ygdria-mcp\dist\index.js
如果界面只提供一个命令字段,填写:
node "D:\path\to\ygdria-mcp\dist\index.js"保存,然后选择 Restart extension。
这里不要填写 YGDRIA_ETAPI_TOKEN。Token 继续保存在项目根目录的 ygdria-mcp.ini 中。
方式二:编辑 Codex 配置文件。全局配置默认位于 C:\Users\<用户名>\.codex\config.toml;也可以在受信任的项目中使用 .codex/config.toml:
[mcp_servers.ygdria]
command = "node"
args = ["D:\\path\\to\\ygdria-mcp\\dist\\index.js"]
cwd = "D:\\path\\to\\ygdria-mcp"
enabled = true
default_tools_approval_mode = "writes"default_tools_approval_mode = "writes" 会让 Codex 对非只读工具请求确认;Ygdria MCP 本身仍以 ygdria-mcp.ini 中的 allowWrite 为最终写入开关。修改配置后重启 Codex 扩展。在 VS Code 集成终端运行以下命令可以检查是否已注册:
codex mcp list官方说明见 Codex MCP:IDE extension 配置。
ChatGPT Web
ChatGPT Web 的自定义 MCP App 连接远程 MCP 服务,不能直接启动本地 stdio 进程。因此本项目遵守“不实现 HTTP Server”的要求,不能直接粘贴到 ChatGPT Web 的 App endpoint 中。若账户和组织已提供 Secure MCP Tunnel,可用它把本地服务安全接入;否则需要一个独立、受控的远程传输桥接层(不属于本项目范围)。参见 OpenAI 关于 ChatGPT Developer Mode 与 MCP Apps 的说明。
开发与验证
npm run typecheck
npm test测试覆盖只读默认值、禁止 /api/v1 风格 base URL、Bearer 认证、不发送 Local Token、受保护搜索结果过滤、Markdown If-Match,以及创建请求网络失败不重试。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseBqualityDmaintenanceA Model Context Protocol server enabling AI assistants to interact with TriliumNext notes, providing tools for creating, searching, reading, and updating notes in your knowledge base.Last updated41
- Flicense-qualityAmaintenanceA 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.Last updated10861
- Alicense-qualityDmaintenanceMCP server that provides standardized tools for querying and retrieving notes from Joplin personal knowledge manager through its API, enabling AI assistants to access and reference personal notes contextually.Last updated9MIT
- Alicense-qualityCmaintenanceMCP server for AI agents to read, write, and organize notes in a local-first, human-in-the-loop note-taking app.Last updated41MIT
Related MCP Connectors
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Search, read, and write your Apple Notes from ChatGPT/Claude via a local Mac agent + MCP relay.
Your memory, everywhere AI goes. Build knowledge once, access it via MCP anywhere.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Seraphoenixy/Ygdria-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server