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

@graniteco/mcp

v0.1.0

Published

Local STDIO MCP server for the Granite Agent API — search, list, read, and ask your Granite document vault from Claude Desktop/Code, Cursor, or any MCP client.

Readme

Granite MCP server

A local Model Context Protocol server that lets an agent — Claude Desktop, Claude Code, Cursor, Codex, or any MCP client — search, list, read, and ask your Granite document vault.

It's a thin STDIO wrapper over the read-only Granite Agent API. All auth, per-user scoping, prompt-injection sanitization, audit logging, and rate limiting happen server-side in the API — this shim just exposes the endpoints as MCP tools and turns API errors into clear, agent-actionable messages.

Read-only. No uploads or writes — those stay on the web app + email-in.

Tools

| tool | what it does | required scope | |---|---|---| | search_vault | ranked search (hybrid / keyword / semantic) → metadata + snippet | documents:read | | list_documents | browse the vault, cursor-paginated | documents:read | | get_document | full structured fields by id; include_full_text adds the OCR body | documents:read | | ask_vault | natural-language Q&A across the vault → synthesized answer + citations | vault:ask |

Setup

  1. Granite plan: the API is paid-only. Free/canceled accounts get a clear feature_locked error.
  2. Mint a token: in Granite, go to Settings → Developer → Access tokens, create a token with the scopes you want (documents:read, optionally vault:ask), and copy the gra_live_… value — it's shown once. Treat it like a password: it can read everything in your vault, including sensitive documents.
  3. Configure your client (below). The server reads two env vars:
    • GRANITE_API_KEY — required, your gra_live_… token.
    • GRANITE_API_BASE — optional, defaults to https://api.granite.co/v1.

Claude Desktop

Edit claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "granite": {
      "command": "npx",
      "args": ["-y", "@graniteco/mcp"],
      "env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
    }
  }
}

Claude Code

claude mcp add granite --env GRANITE_API_KEY=gra_live_your_token_here -- npx -y @graniteco/mcp

…or add it to .mcp.json:

{
  "mcpServers": {
    "granite": {
      "command": "npx",
      "args": ["-y", "@graniteco/mcp"],
      "env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
    }
  }
}

Cursor

Add to ~/.cursor/mcp.json (or a project .cursor/mcp.json):

{
  "mcpServers": {
    "granite": {
      "command": "npx",
      "args": ["-y", "@graniteco/mcp"],
      "env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
    }
  }
}

Run from source (until the npm package is published)

cd mcp
npm install
npm run build      # → dist/index.js

Then point your client's command/args at the built file instead of npx:

{
  "mcpServers": {
    "granite": {
      "command": "node",
      "args": ["/absolute/path/to/granite/mcp/dist/index.js"],
      "env": { "GRANITE_API_KEY": "gra_live_your_token_here" }
    }
  }
}

Develop

npm run build   # tsc → dist/
npm test        # builds, then runs node --test (mocked fetch — no network)
npm start       # run the built server on stdio

Tests stub fetch and assert each tool hits the right endpoint, sends the bearer token, and maps every API error code to a clean tool error. No live vault needed.