palace-mcp
palace-mcp
MCP 服务器,通过 Local REST API 插件将 Obsidian 仓库暴露给 AI 助手。
基于 FastMCP 构建。代理可以列出、读取、写入、搜索和删除笔记,并读取当前在 Obsidian 中打开的任意笔记。
先决条件
安装了 Local REST API 插件并正在运行的 Obsidian
Python 3.12+
uv(推荐)或 pip
继续之前,请先从 Obsidian 的插件设置中复制你的 API 密钥。
Related MCP server: obsidian-local-mcp
安装
git clone <repo-url> palace-mcp
cd palace-mcp
uv sync配置
变量 | 必填 | 默认值 | 描述 |
| 是 | — | 来自 Local REST API 插件的 Bearer 令牌 |
| 否 |
| Obsidian REST API 监听的主机 |
| 否 |
| REST API 的端口 |
| 否 |
|
|
| 否 |
| 以逗号分隔的路径,在这些路径下 |
当通过 HTTPS 使用插件的自签名证书时,会自动跳过证书验证。
运行
通过 stdio 启动服务器(MCP 客户端的默认传输方式):
export OBSIDIAN_API_KEY="your-api-key"
uv run python server.py或者通过 FastMCP:
uv run fastmcp run server.pyCursor 配置
添加到你的 MCP 配置中(例如 ~/.cursor/mcp.json):
{
"mcpServers": {
"obsidian-palace": {
"command": "uv",
"args": ["run", "python", "server.py"],
"cwd": "/path/to/palace-mcp",
"env": {
"OBSIDIAN_API_KEY": "your-api-key-here"
}
}
}
}保存后重启 Cursor 或重新加载 MCP 服务器。
工具
工具 | 描述 |
| 列出文件和文件夹。传入子目录路径,或留空以表示仓库根目录。 |
| 按仓库相对路径读取笔记的完整内容(例如 |
| 创建新笔记或覆盖现有笔记。 |
| 将文本追加到笔记末尾。如果笔记不存在则创建它。 |
| 全文搜索;返回按相关性排序的匹配文件名。 |
| 返回当前在 Obsidian 中打开的笔记内容。 |
| 永久删除笔记。不可逆——请谨慎使用。 |
追加保护
某些仓库路径被视为 仅覆盖。向这些路径追加内容可能会在单个笔记中静默地堆叠重复内容,日后很难察觉。
默认情况下,append_note 会拒绝匹配以下路径的请求:
/Context/(Context文件夹下的任何笔记)/System/(System文件夹下的任何笔记)Index.md(任何名为Index.md的文件)
请改用 write_note 替换这些笔记。可通过 PALACE_APPEND_DENY 环境变量覆盖拒绝列表。
许可证
MIT
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
- Alicense-qualityDmaintenanceProvides an MCP server that allows AI assistants to interact with Obsidian vaults, enabling reading/writing notes, managing metadata, searching content, and working with daily notes.36MIT
- Flicense-qualityDmaintenanceA local MCP server that wraps the Obsidian CLI to give AI assistants direct access to read, edit, and manage notes within an Obsidian vault. It enables advanced operations such as frontmatter property management, context-aware searching, and the execution of internal Obsidian commands.2
- AlicenseBqualityDmaintenanceAn MCP server that enables AI assistants to access and manage your local Obsidian vault through a standardized protocol.142,4721Apache 2.0
- Alicense-qualityDmaintenanceA lightweight MCP server that enables AI assistants to securely read, create, and modify notes in an Obsidian vault, with support for semantic search and web scraping.2,472MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
An MCP server that gives your AI access to the source code and docs of all public github repos
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/anis-meliti/palace-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server