SiYuan MCP Server — Control your databases with AI, without compromise
Context
SiYuan Note is a powerful knowledge management tool used by thousands of professionals to organize their projects, tasks, and data in the form of relational databases (Attribute Views).
The MCP (Model Context Protocol) from Anthropic allows AI assistants like Claude, Cursor, etc. to interact directly with third-party applications. The goal: to make SiYuan fully controllable by AI.
Problem
Existing MCP servers for SiYuan manage documents and text blocks, but none support Attribute Views, SiYuan's relational database system.
Specifically:
it is impossible to ask Claude to read, create, or update an entry in a SiYuan database. The most structured part of the tool remained invisible to the AI.
it is impossible to ask Claude to read, create, or update an entry in a SiYuan database. The most structured part of the tool remained invisible to the AI.
Technical reason:
the official HTTP API of SiYuan is incomplete for write operations on Attribute Views. Data is stored in independent JSON files, not exposed by standard endpoints.
the official HTTP API of SiYuan is incomplete for write operations on Attribute Views. Data is stored in independent JSON files, not exposed by standard endpoints.
Solution
Development of a complete MCP server in TypeScript, published as open source.
Technical approach:
bypassing the incomplete API via the endpoints `/api/file/getFile` and `/api/file/putFile`, direct access to the JSON files of the databases, without access to the local file system. 100% HTTP, compatible with remote instances and Docker.
bypassing the incomplete API via the endpoints `/api/file/getFile` and `/api/file/putFile`, direct access to the JSON files of the databases, without access to the local file system. 100% HTTP, compatible with remote instances and Docker.
Key features:
- Full read of databases (typed columns + all rows)
- Creation of rows with initial values
- Updating multiple cells in a single call
- Filtering rows by column/value
- Programmatic database creation
- Support for 11 column types in read/write
- Auto-discovery of the SiYuan port
Installation without build:
```bash
npx siyuan-query-mcp@latest
```
No local compilation required. The user configures Claude Desktop in 3 lines.
Result
- Public npm package: `siyuan-query-mcp`
- Automated CI/CD pipeline: 1 git tag → GitHub Release + npm publish in 16 seconds
- SiYuan community notified
- Unique feature: only MCP server to support Attribute Views in read/write
Links
GitHub : https://github.com/MyrkoF/siyuan-mcp
npm : https://www.npmjs.com/package/siyuan-query-mcp
npm : https://www.npmjs.com/package/siyuan-query-mcp
This project demonstrates
- Ability to identify a gap in an open source ecosystem and fill it independently
- Rigorous engineering approach: analysis of the official API, identification of limitations, documented technical bypass
- Mastery of the complete cycle: development → packaging → publication → CI/CD automation → community communication
- Collaboration between humans and AI: development assisted by Claude Code, supervision and technical decisions made by the developer
Tags: projects, MCP, SiYuan, TypeScript, open source, AI, automation, npm, GitHub Actions