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

@datarealiser/mcp-tools

v0.1.0

Published

A curated, tag-driven subset of @datarealiser/api-client — only kernel-api endpoints whose route is tagged @mcpTool are reachable through this package. See README.md.

Readme

@datarealiser/mcp-tools

A curated, tag-driven subset of @datarealiser/api-client — only kernel-api endpoints whose route is explicitly tagged @mcpTool are reachable through this package. Built for mcp-server, so it can depend on this instead of the full api-client surface: a consumer of this package literally cannot call an endpoint nobody opted in, regardless of what api-client itself exposes — the safety boundary is enforced by what exists on McpToolsClient, not by code-review discipline in the consumer.

Tagging an endpoint

Endpoints are not tagged by default. To expose one:

  1. Make sure its @datarealiser/api-client method has a real signature in src/types/apiClient.d.ts's DatarealiserApiClientMethods — add one if it's missing.

  2. Add a tag directly above the route in kernel/src/routes/*.routes.ts:

    /**
     * @mcpTool getQuery
     * @mcpDescription Fetches one saved query's sql and declared params by name. Needs queries:manage.
     */
    router.get('/:name', ...);

    @mcpTool <name> must be the exact method name on DatarealiserApiClient (the two are 1:1 — this package only ever delegates, never reimplements). @mcpDescription is a single line; it becomes both the generated method's JSDoc and (conventionally) the MCP tool's own description in mcp-server/src/tools.ts.

  3. Regenerate:

    npm run generate

    This rewrites src/index.js and src/index.d.ts from scratch — never hand-edit either. The generator fails loudly (naming the file/tag) if a tag has no matching signature in src/types/apiClient.d.ts, or if the same name is tagged twice.

Untagging: remove the @mcpTool/@mcpDescription comment and regenerate — the method disappears from McpToolsClient entirely, not just from wherever a consumer happened to be calling it.

Publishing

./publish.sh          # regenerates, smoke-tests, then npm publish
./publish.sh --dry-run

Bump "version" in package.json first, same as api-client/publish.sh.

Design notes

  • Delegates to api-client, doesn't duplicate it. McpToolsClient wraps a real DatarealiserApiClient instance internally (dependencies in package.json); each generated method is a thin (...args) => this.#client.<name>(...args) passthrough. One HTTP/ auth/error-handling implementation to maintain (api-client's), not two.
  • No MCP SDK dependency. This package only narrows which kernel-api calls are reachable — it knows nothing about the Model Context Protocol itself (no zod schemas, no registerTool wiring). That stays in mcp-server/src/tools.ts, which decides how each allowed method becomes an MCP tool (title, input schema, etc.). Keeping the layers separate means this package is reusable anywhere a curated kernel-api client is useful, not just from an MCP server.
  • Ships a real .d.ts, unlike api-client (which ships none, by its own design choice — every consumer hand-maintains its own partial declaration). Since this package is generated, not hand-written, there was no reason to repeat that pattern: src/index.d.ts is always exactly in sync with src/index.js.