Siyuan Note MCP Server logo

Siyuan Note MCP Server

Community
Fromsko

为 Claude Desktop 提供思源笔记集成的 Model Context Protocol 服务器

PublisherFromsko
Repositorysiyuan-mcp-server
LanguageTypeScript
Forks
9
Stars
40
Available tools
0
Transport typestdio
Categories
LicenseISC
Links
  • Connect tools to AI workflows

    Siyuan Note MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    40 stars and 9 forks from the linked repository.

🧠 思源笔记 MCP 服务器

让 AI 助手直接操作思源笔记的 Model Context Protocol 服务器

npm version License: ISC SiYuan API


适配版本

项目版本
思源笔记>= 3.0.0(已验证 3.7.1)
SiYuan APIdocs/API.md(50 个非 Database 端点)
Node.js>= 18.0.0
MCP SDK@modelcontextprotocol/sdk ^1.8.0

快速开始

bash
# 直接运行
SIYUAN_TOKEN=your-api-token npx @fromsko/siyuan-mcp-server

# 全局安装
npm install -g @fromsko/siyuan-mcp-server
SIYUAN_TOKEN=your-api-token siyuan-mcp-server
环境变量必需说明默认值
SIYUAN_TOKEN✅思源笔记 API Token(设置 → 关于)—
SIYUAN_API_URL❌思源 API 地址http://localhost:6806

给 LLM 的配置说明

如果你是 AI 助手,请将以下配置添加到你的 MCP 客户端配置中:

json
{
  "mcpServers": {
    "siyuan": {
      "command": "npx",
      "args": ["-y", "@fromsko/siyuan-mcp-server"],
      "env": {
        "SIYUAN_TOKEN": "<用户提供的 API Token>",
        "SIYUAN_API_URL": "http://localhost:6806"
      }
    }
  }
}

配置文件位置:

  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows)
  • Cursor: .cursor/mcp.json

配置完成后重启客户端,即可使用 50 个思源笔记操作工具(笔记本管理、文档操作、块级编辑、全文搜索、SQL 查询等)。

功能概览

类别命令空间端点数能力
📓 笔记本notebook.*8创建/删除/重命名/配置
📄 文档filetree.*11创建/删除/移动/重命名(支持 hpath 自动解析)
🧱 块操作block.*11插入/更新/删除/移动/折叠/展开
🔍 搜索search.* / sql.*3全文搜索/SQL 查询/事务刷新
📎 属性attr.*2设置/获取块属性
📁 文件file.*5读写/删除/重命名/列目录
📋 模板template.*2渲染模板/Sprig
📤 导出export.*2导出 Markdown/导出资源包
🔄 转换convert.*1Pandoc 格式转换
🔔 通知notification.*2推送消息
🌐 网络network.*1正向代理
⚙️ 系统system.*3版本/启动进度/当前时间

开发

bash
git clone https://github.com/Fromsko/siyuan-mcp-server.git
cd siyuan-mcp-server
npm install && npm run build && npm test

详细开发文档:

文档说明
docs/development.md开发指南、项目结构、添加端点流程
docs/mcp-usage.mdMCP 使用指南
docs/ref/siyuan-api.md官方 SiYuan API 文档
llms.txtLLM 导向的项目简介
AGENTS.md提交规范和开发约束

问题排查

无法连接思源笔记 → 检查:思源是否运行、Token 是否正确、端口是否正确(默认 6806)

命令执行失败 → 确认笔记本/文档存在、Token 权限足够

连接远程思源 → 设置 SIYUAN_API_URL=http://your-server:6806

开源协议

ISC — 详见 LICENSE

致谢

Installation

TypingMind
{
  "mcpServers": {
    "siyuan-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@fromsko/siyuan-mcp-server"
      ],
      "env": {
        "SIYUAN_TOKEN": "<SIYUAN_TOKEN>"
      }
    }
  }
}

Use Siyuan Note MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Siyuan Note MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Siyuan Note MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Siyuan Note MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "siyuan-mcp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@fromsko/siyuan-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Siyuan Note MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Siyuan Note MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Siyuan Note MCP Server to help me with this task?
Siyuan Note MCP Server
Sure. I read it.
Here is what I found using Siyuan Note MCP Server.

Frequently asked questions

What is the Siyuan Note MCP Server MCP server used for?

Siyuan Note MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Siyuan Note MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Siyuan Note MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Siyuan Note MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Siyuan Note MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Siyuan Note MCP Server MCP to TypingMind?

Siyuan Note MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Siyuan Note MCP Server MCP provide in TypingMind?

Siyuan Note MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Siyuan Note MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Siyuan Note MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇