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

@valbuild/mcp

v0.150.1

Published

Val - content tools for MCP hosts

Readme

Val MCP

Val's content tools, and the checks that decide whether a request may reach them, for hosts that speak the Model Context Protocol.

Nothing in this package imports an MCP SDK. The app owns the transport — which SDK, which route, which framework — and this owns the parts that must not be re-decided per app: the tools themselves, whether a request is allowed to reach them at all, and whose credential it carries.

import { initValMcp } from "@valbuild/mcp";

const { valMcpAuthorize, valMcpTools, valMcpMetadata } = initValMcp(
  valModules,
  config,
);

The tools

Reading:

| Tool | | | ---------------------------- | --------------------------------------------------------- | | get_all_schema | every module's path and schema — where to start | | search_content | find content by text, several queries at once | | get_source | the content at a source path, unpublished changes applied | | get_record_keys | a record's keys without its values | | count_entries | how big something is before asking for it | | get_source_path_from_route | the module behind a URL | | get_patches | what is edited but not yet published | | validate_content | what the Studio would show as an error |

Writing:

| Tool | | | ---------------------------- | --------------------------------------------------- | | create_patch | change a value at a path | | duplicate_source | copy an array item or record entry | | empty_at_path | build an empty value the schema accepts, to fill in | | remove_image_gallery_entry | drop an image from an s.imagedir() gallery | | upload_image | add one — see below |

Every write is validated against the schema before it is stored, and refused rather than saved broken. A patch lands unpublished, exactly where the Studio puts an edit, so a human still reviews and publishes it.

Image uploads need sharp

The tool that uploads an image is not part of the default set, because reading the dimensions out of a JPEG and re-encoding it to WebP needs an image library, and sharp is a native dependency no project should acquire without asking for it. Install it yourself and pass it in:

npm install sharp
import sharp from "sharp";
import { initValMcp, createValImageTools } from "@valbuild/mcp";
import { sharpImageProcessor } from "@valbuild/mcp/sharp";

const { valMcpAuthorize, valMcpTools } = initValMcp(valModules, config, {
  extraTools: createValImageTools(sharpImageProcessor(sharp)),
});

Leave extraTools out and everything else still works — an agent can then read, validate and edit content, but not add an image.

Remotely stored images (s.imagedir(dir, {...}).remote()) work through the same tool. Adding one uploads nothing to Val's content host — the bytes go into the patch store, and the push happens at publish — so the only thing it needs is the project's bucket list, read with your app's own credential (its API key, or the val login token in your project during local development).

The design notes are in docs/plans/mcp.md.