npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@rickydata/siyuan-mcp

v0.2.3

Published

MCP server for driving a deployed SiYuan instance (notebooks, docs, SQL, RDM cells).

Readme

@rickydata/siyuan-mcp

MCP server for driving a deployed SiYuan instance.

Exposes HTTP tools (notebooks, docs, SQL, KFDB sync/backlinks) and a WebSocket-driven RDM cell runner (create / run / read output) so Claude can author and execute Python / R / API / KF / AI cells end-to-end.

Auth

All three auth sources below are alternatives — any one suffices. The MCP server boots without requiring any of them; auth is resolved lazily on the first tool call. Token resolution priority:

  1. SIYUAN_KFDB_TOKEN env — raw KFDB API key, used as ?kfdb_token=<value>.
  2. SIYUAN_KFDB_JWT env — KnowledgeFlow Google-OAuth JWT, exchanged once via POST /api/auth/kfdb/token. Derived key is in-memory only — never persisted to disk.
  3. Local credential at ~/.siyuan-mcp/credentials.json — paste-back token from siyuan-mcp login. Stored with 0600 permissions, atomic write. Token format is siymcp_v1_<kfdb_api_key>; the prefix is stripped before use. This is a local disk fallback, not a gateway-managed secret — it does not appear in any secrets_required manifest.

Default base URL is https://siyuan.rickydata.org (override with SIYUAN_URL).

Development

npm install
npm run dev

Build + test

npm run build
npm test

CLI

npx siyuan-mcp login            # opens browser paste-back flow
npx siyuan-mcp login --token <siymcp_v1_...>
npx siyuan-mcp whoami
npx siyuan-mcp logout

Docker

docker build -t siyuan-mcp .
docker run -p 8080:8080 -e SIYUAN_KFDB_TOKEN=... siyuan-mcp

Changelog

0.2.3 (2026-04-19)

  • Fix (FU-3): siyuan_create_cell now persists the cell as a real SiYuan block via POST /api/block/appendBlock immediately after the WS AddCell handshake. Previously the cell only existed in the rdm-engine sidecar's ephemeral in-memory notebook session, so the doc's block_count never increased and the cell was lost on sidecar restart. The response now includes persisted: true to confirm the HTTP write succeeded.

0.2.2

  • siyuan_create_cell forwards options for ai/mcp/api cells via AddCell.options on the WS wire.

0.2.1

  • CLI login/logout/whoami. Credential file atomicity. emit-tools script.

0.2.0

  • Initial public release: 12 tools (9 HTTP + 3 WS cell tools). Dual-transport (stdio/HTTP). JWT-exchange auth.