Logo Syplugin AnMCPServer

Syplugin AnMCPServer

Cộng đồng
OpaqueGlass

A plugin that provide simple MCP service for Siyuan-note

Nhà phát hànhOpaqueGlass
Kho mãsyplugin-anMCPServer
Ngôn ngữTypeScript
Bản fork
8
Sao
44
Công cụ có sẵn
0
Phương thức truyền tảistdio
Giấy phépAGPL-3.0
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Syplugin AnMCPServer cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    44 sao và 8 bản fork từ kho mã được liên kết.

An MCP server for siyuan-note

中文

A plugin that provides MCP service for Siyuan Note.

🌻 Features

  • Most tools support the exclude document function.
  • It includes certain input parameter validation and is not a direct API wrapper for SiYuan Note.
  • Ready to use once the plugin is installed and enabled on the desktop client; Docker and mobile platforms are not supported.

✨ Quick Start

  • Download from the marketplace or 1. unzip the package.zip in Release, 2. move the folder to workspace/data/plugins/, 3. and rename the folder to syplugin-anMCPServer;
  • Enable the plugin;
  • The plugin listens on port 16806 by default (Host: 127.0.0.1), please use http://127.0.0.1:16806/sse as the server access address;

⭐ If this is helpful to you, please consider giving it a star!

🛠 Supported Tools (Summary)

For detailed tools, supported excluded documents, and other notes, please refer to the Supported Tools section.

  • Document and block operations: create, read, update, and delete;
  • Database operations:
    • Create databases, add/delete/update database rows, add/delete database columns, and retrieve database structure information;
  • Attribute operations: create, read, update, and delete;
  • Flashcard operations: create flashcards from Markdown content, create flashcards by block ID, delete flashcards by block ID;
  • Template operations: retrieve existing templates, get raw template file content, preview template rendering results, preview Sprig rendering results, create or overwrite templates, render templates and insert at the beginning of a document, delete existing templates;
  • Notebook operations: list notebooks, rename notebooks;

❓ Frequently Asked Questions

  • Q1: How to use it in an MCP client? Please refer to the subsequent sections.

  • Q2: What are some common MCP clients?

  • Q3: Does the plugin support authentication?

    • Version v0.2.0 and above support authentication. After setting an authentication token in the plugin settings, you must set the authorization request header in your MCP client with the value Bearer YourToken.
  • Q4: Can it be used in Docker?

    • No. The plugin depends on a Node.js environment and does not support running on mobile devices or within Docker.

      To support SiYuan deployed in Docker, it is recommended to switch to other MCP projects. Some projects are listed here.

      Alternatively, you can modify the code to decouple this plugin from the SiYuan frontend.

  • Q5: How can I view the configured authorization code?

    • Authorization codes are saved as hashes. You can only modify them; you cannot view the currently active authorization code.
  • Q6: When connecting an MCP client, I get an error Invalid Host: x.x.x.x or something similar. How do I fix it?

    json
    {
      "jsonrpc": "2.0",
      "error": {
        "code": -32000,
        "message": "Invalid Host: x.x.x.x"
      },
      "id": null
    }
    • By default, for security reasons, the service only handles requests from localhost. If you need to access it via a specific domain or connect to the MCP service in a non-local environment, you must manually declare it in Plugin Settings - Allowed Hosts.
    • Fill in this setting with the corresponding local network IP of the computer or the bound domain name.
    • Simply put: whatever IP or domain name you entered in the MCP client must also be entered here.
  • Q7: I only connected once, why does the settings page show a connection count greater than 1?

    • Delayed Statistics: Please click the refresh status button manually to get the latest results.
    • Connection Leak: Some MCP clients do not send a standard disconnect signal when closing, causing old connections to remain occupied in the background. When the function is restarted, the system establishes a new overlapping connection.
    • Multi-device Connection: Please confirm if other software is accessing the MCP service or the relevant port.
    • Still having issues? Please check the plugin logs or set an authorization code to prevent information leakage.
  • Q8: What is the "Vector Index Client Plugin - Query" tool?

    • This tool retrieves matching content blocks or answers questions directly via Knowledge Graph/Vector Search.
    • To use this tool, you need to download, enable, and correctly configure the syplugin-vectorIndexClient plugin.
    • Currently, this plugin only supports lightRAG-server.
  • Q9: How to better utilize the MCP services provided by the plugin?

    • Limit available tools for different tasks. For example, disable template-related tools when you don't need to manipulate templates.
    • The plugin provides Prompts suitable for certain task types. You need to use these related prompts in your MCP client; please refer to each client's documentation for specific operation methods.
  • Q10: Can I create an HTTPS-based service?

    • Yes. You need to place two files, server-key.pem and server-cert.pem, in the directory Workspace/data/storage/petal/syplugin-anMCPServer, then restart SiYuan Note. If the notification message when the MCP service starts ends with with HTTPS, it means it has been enabled.

    • Q10.1: MCP client shows net::ERR_CERT_AUTHORITY_INVALID

      • This is expected with self-signed certificates. Refer to the previous point: a) Delete the two certificate files and continue using HTTP; b) Replace them with certificates issued by an authoritative CA; c) Or add the self-signed certificate to your trust list (not recommended).
    • Q10.2: MCP client shows net::ERR_EMPTY_RESPONSE

      • Please check: if HTTPS is used, the client URL must start with https://. Otherwise, delete the two certificate files and continue using HTTP.
    • Q10.3: MCP client shows net::ERR_CERT_COMMON_NAME_INVALID

      • When generating the certificate, ensure the correctness of the CN (Common Name) field and add the subjectAltName (SAN) field. Using localhost as an example:
        openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes -keyout server-key.pem -out server-cert.pem -subj "/CN=localhost" -addext "subjectAltName=DNS:localhost,IP:127.0.0.1"

How to Configure in an MCP Client?

Different MCP clients require different configuration methods. Please refer to the MCP client documentation.

MCP clients are continuously updated, so the configuration or usage instructions here may not be directly applicable and are for reference only.

Here, we assume: the plugin’s port is 16806, and the authorization token is abcdefg.

Modify the MCP application’s configuration, select the Streamable HTTP type, and configure the endpoint.

Clients Supporting Streamable HTTP

The following configuration uses Cherry Studio as an example. Different MCP clients may require different configuration formats—please refer to the MCP client documentation.

Plugin Without Authorization Token

  1. Type: Select Streamable HTTP (streamablehttp);
  2. URL: http://127.0.0.1:16806/mcp;
  3. Headers: Leave empty;

Plugin With Authorization Token

  1. Type: Select Streamable HTTP (streamablehttp);
  2. URL: http://127.0.0.1:16806/mcp;
  3. Headers: Authorization=Bearer abcedfg;

Clients Supporting Only Stdio

If the MCP client does not support HTTP-based communication and only supports stdio, a conversion method is needed.

Here, we use node.js + mcp-remote@next.

  1. Download Node.js: https://nodejs.org/en/download

  2. Install mcp-remote@next:

bash
npm install -g mcp-remote@next  

The following configuration uses 5ire as an example. Different MCP clients may require different configuration formats—please refer to the MCP client documentation.

Plugin Without Authorization Token

Command:

npx mcp-remote@next http://127.0.0.1:16806/mcp  

Plugin With Authorization Token

Command:

npx mcp-remote@next http://127.0.0.1:16806/mcp --header Authorization:${AUTH_HEADER}  

Environment Variable:

Name: AUTH_HEADER
Value: Bearer abcdefg

🔧 Supported Tools

[!WARNING]

Not all tools enforce strict excluded document validation. Before using excluded documents or after updating MCP tools, please read the tool support list carefully and consider disabling some tools.

TargetR/WDestructive / Manual review availableTool FunctionExcluded DocStatus / Notes
Documents & Blocks
ReadSearch using SQL⚠️Excluded documents are only checked if the result contains IDs and the number of returned items < 300
Get document Markdown by ID✅—
Get block Kramdown by ID✅—
List child documents of a document✅—
List child blocks✅—
Vector Retrieval Client Plugin - Query❌Requires downloading and properly configuring the syplugin-vectorIndexClient pluginExcluded documents are not yet supported for this tool
Get backlinks by ID✅—
WriteAppend content to daily note✅—
Append content to specified document by ID✅domstring not supported
Create new document at specified position by ID✅domstring not supported
Insert child block (before / after)✅domstring not supported
Insert block at specified position✅domstring not supported
Yes / YesUpdate block✅domstring not supported
Rename document✅—
Yes / NoMove document✅—
Yes / NoMove block✅⚠️ Moving headings requires folding first, which will cause folding state to be lost
Yes / YesDelete document✅—
Yes / YesDelete block✅—
DatabaseOnly basic database operations are supported, see reference
ReadGet database schema✅—
Get database view schema✅—
Query database results✅—
Get block ID where database is located✅—
Search Existing Databases✅—
WriteCreate database✅—
Add new database row✅—
Modify database row✅Rollup, template and relation column types are not supported
Yes / YesDelete database row✅—
Add database column✅—
Yes / YesDelete database column✅—
Attributes
ReadRead attributes✅—
WriteModify attributes (add / delete / update)✅—
Flashcards
WriteCreate flashcard from Markdown content✅—
Create flashcard by block ID✅—
Yes / NoDelete flashcard by block ID❌—
Templates
ReadList existing templates❌—
Raw template file content❌—
Preview template rendering result⚠️Only kramdown is returned; checks may be bypassed via getBlock
Preview Sprig rendering result❌Does not involve user documents
WriteCreate or overwrite template❌Does not involve user documents
Render template and insert at document start⚠️Insertion is fixed at document start and cannot be specifiedSince functions like getBlock can be used in templates, this tool may bypass checks to access excluded documents
Delete existing template❌—
Notebooks
ReadList notebooks❌Does not involve user documents
WriteRename notebook✅—

🙏 References & Acknowledgements

Some dependencies are listed in package.json.

Developer/ProjectProject DescriptionCitation
thuanpham582002/tabby-mcp-serverProvides MCP service within the terminal software Tabby; MIT LicenseImplementation method of MCP service
wilsons / FrostimeSystem Prompt CC BY-SA 4.0System Prompts etc. which locate at static/

Dùng MCP Syplugin AnMCPServer với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Syplugin AnMCPServer, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Syplugin AnMCPServer làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Syplugin AnMCPServer.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "syplugin-anmcpserver": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Syplugin AnMCPServer, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Syplugin AnMCPServer.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Syplugin AnMCPServer giúp tôi làm việc này không?
Syplugin AnMCPServer
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Syplugin AnMCPServer.

Câu hỏi thường gặp

Máy chủ MCP Syplugin AnMCPServer dùng để làm gì?

Syplugin AnMCPServer là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Syplugin AnMCPServer với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Syplugin AnMCPServer với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Syplugin AnMCPServer với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Syplugin AnMCPServer, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Syplugin AnMCPServer với TypingMind?

Syplugin AnMCPServer hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Syplugin AnMCPServer cung cấp những công cụ nào trong TypingMind?

Syplugin AnMCPServer cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Syplugin AnMCPServer không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Syplugin AnMCPServer yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇