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

@cognito-distillery/moonshine-mcp

v0.1.0

Published

MCP server for Moonshine knowledge graph

Downloads

76

Readme


An MCP (Model Context Protocol) server that connects AI assistants — Claude, ChatGPT, Gemini, and others — directly to your Moonshine knowledge graph.

It reads the SQLite database file directly, so Moonshine does not need to be running.


Prerequisites

  • Node.js v20+
  • Moonshine installed with at least one mash created
  • (Optional) An API key from OpenAI or Google Gemini — only needed for search_semantic

Setup

Claude Desktop

Add to your Claude Desktop config:

| Platform | Config Path | |----------|-------------| | Linux | ~/.config/Claude/claude_desktop_config.json | | macOS | ~/Library/Application Support/Claude/claude_desktop_config.json | | Windows | %APPDATA%\Claude\claude_desktop_config.json |

{
  "mcpServers": {
    "moonshine": {
      "command": "npx",
      "args": ["@cognito-distillery/moonshine-mcp"]
    }
  }
}

Claude Code

claude mcp add moonshine -- npx @cognito-distillery/moonshine-mcp

Other MCP Clients

Any MCP-compatible client can connect via stdio transport:

npx @cognito-distillery/moonshine-mcp

Database Path

The server automatically finds your Moonshine database:

| Platform | Default Path | |----------|------| | Linux | ~/.local/share/com.moonshine.app/moonshine.db | | macOS | ~/Library/Application Support/com.moonshine.app/moonshine.db | | Windows | C:\Users\{user}\AppData\Roaming\com.moonshine.app\moonshine.db |

Override with the MOONSHINE_DB_PATH environment variable if needed:

{
  "mcpServers": {
    "moonshine": {
      "command": "npx",
      "args": ["@cognito-distillery/moonshine-mcp"],
      "env": {
        "MOONSHINE_DB_PATH": "/custom/path/to/moonshine.db"
      }
    }
  }
}

Tools

Mash CRUD

| Tool | Description | |------|-------------| | list_mashes | List mashes with optional filtering by status and type | | get_mash | Get a single mash by ID | | create_mash | Create a new mash (starts as MASH_TUN) | | update_mash | Partially update a mash's type, summary, context, or memo | | delete_mash | Delete a mash and its associated edges |

Search

| Tool | Description | |------|-------------| | search_keyword | Full-text keyword search using FTS5 trigram tokenizer (Korean-friendly) | | search_semantic | Semantic similarity search using embeddings (requires API key in Moonshine settings) |

Knowledge Graph

| Tool | Description | |------|-------------| | get_graph | Get the full graph of JARRED mashes with optional filtering by type, relation, or source | | get_node_detail | Get a node with its neighbors and connecting edges | | add_edge | Add or upsert a relationship between two mashes | | update_edge | Update an edge's relation type or confidence | | delete_edge | Delete an edge |

Stats

| Tool | Description | |------|-------------| | get_stats | Get mash counts by status/type and total edge count |


Environment Variables

| Variable | Description | Default | |----------|-------------|---------| | MOONSHINE_DB_PATH | Override database file path | Auto-detected per platform | | MOONSHINE_READ_ONLY | Set to true to block all write operations | false | | MOONSHINE_DEBUG | Set to true for verbose stderr logging | false |


Verifying

Run the MCP Inspector to test tools interactively:

npx @modelcontextprotocol/inspector node dist/index.js

Security

  • password_hash and session_token are never exposed through any tool
  • API keys are read from the settings table internally but never returned in tool responses
  • Use MOONSHINE_READ_ONLY=true to prevent any database writes
  • WAL mode enables safe concurrent reads alongside the running Moonshine app

License

MIT