{"type":"blog_post","title":"siyuan MCP Client: Privacy-First PKM with AI and Block-Level Linking","description":"siyuan is a TypeScript-powered, self-hosted, privacy-first personal knowledge management (PKM) MCP Client. It offers robust block-level linking, markdown WYSIWYG editing, and integrated AI writing/Q&A via OpenAI API for developers seeking a secure, extensible knowledge base.","content":"# siyuan: Self-Hosted PKM and AI-Powered Context with MCP\n\nsiyuan is a TypeScript and Go-powered, fully open-source personal knowledge management (PKM) software designed with privacy as a core principle. It focuses on self-hosting and offers a rich set of features for organizing information, making it a compelling MCP Client for developers and teams who prioritize data sovereignty alongside advanced knowledge management capabilities.\n\n## Knowledge Organization with Block-Level Granularity\n\nAt its core, siyuan excels in content organization through a block-style editor. This isn't just about structured documents; it's about atomic units of information. Each content block supports custom attributes, enabling developers to enrich data with metadata relevant to their projects. Crucially, siyuan implements block-level references and two-way links, allowing for intricate knowledge graphs where individual code snippets, notes, or research points can be interconnected and traced.\n\nThe editor itself supports Markdown WYSIWYG, making it familiar for developers. It handles large documents, up to a million words, and includes features like block zoom-in for focused work. Beyond text, siyuan integrates mathematical formulas, various chart types (flowcharts, Gantt, timing), and even musical staffs. For external content, a web clipping feature and PDF annotation linking help centralize research.\n\n## Integrating AI and Data with MCP\n\nsiyuan leverages the Model Context Protocol (MCP) by integrating AI writing and Q/A chat capabilities via the OpenAI API. This allows users to generate content or query their knowledge base using natural language directly within siyuan, enriching notes or drafting documentation with AI assistance. The privacy-first design ensures that while AI is integrated, the core knowledge base remains under the user's control.\n\nBeyond AI, siyuan also offers SQL query embedding, which means developers can pull and display data directly from databases within their notes. This is particularly useful for documenting system states, query results, or API responses, keeping them live and contextually relevant. Tesseract OCR is also built-in, enabling text extraction from images within documents, further enhancing the searchability and utility of stored information.\n\n## Deployment, Extensibility, and Ecosystem\n\nFor deployment, siyuan provides options including Docker, simplifying setup for self-hosting. It also offers native applications for Android, iOS, and HarmonyOS, ensuring accessibility across various devices. The platform provides a robust API, allowing developers to programmatically interact with their knowledge base.\n\nExtensibility is a key aspect. siyuan supports JavaScript/CSS snippets for customization, enabling users to tailor the interface or add specific functionalities. A community marketplace also exists, likely offering additional plugins and themes. Export capabilities are comprehensive, covering standard Markdown with assets, PDF, Word, and HTML. It even includes direct copy options for platforms like WeChat MP, Zhihu, and Yuque, streamlining content distribution.\n\n## References\n\n- [siyuan on GitHub](https://github.com/siyuan-note/siyuan)\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/introduction)\n- [siyuan on model-context-protocol.com](https://model-context-protocol.com/clients/)","keywords":["siyuan","mcp-client","siyuan-note","pkm","knowledge-management"],"published_at":"2026-07-04T12:00:18.384+00:00","related_repository":{"slug":"siyuan","type":"Client","url":"https://model-context-protocol.com/clients/siyuan"},"source_url":"https://model-context-protocol.com/blog/siyuan-mcp-client-privacy-first-pkm-with-ai-and-block-level-lin-mcp-client-guide"}