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

@cyanmycelium/mcp-cache

v0.1.0

Published

The cache.v1 contract above an mcp-broker: UNS-addressed values with a time to live, its MCP slot surface, broker-decided access, an in-memory store and the conformance suite every store must pass.

Readme

mcp-cache

Cache slots for an mcp-broker: one contract, cache.v1, for values kept by UNS id with a time to live, and pluggable stores.

MCP client ──> mcp-broker ──> slot "cache" (CacheBehavior)
                                  │  one broker decision per UNS id, audited
                                  └──> ICacheStore: memory, Redis

Entries are addressed by UNS id, like SCADA values and their history: one broker policy governs the live value, its history and its cached copy. UNS ids and broker-decided access come from mcp-uns.

Design and decisions: docs/brief_cache_slot.md (French).

Packages

| package | what | |---|---| | @cyanmycelium/mcp-cache | the contract, MemoryCacheStore, CacheBehavior, CacheSlotStore, the declaration, and the conformance suite under /conformance | | @cyanmycelium/mcp-cache-redis | RedisCacheStore: one cache shared by every process, expiry kept by the server |

Use

import { DirectTransport } from "@cyanmycelium/mcp-broker-provider";
import { McpServerBuilder } from "@cyanmycelium/mcp-core";
import { CacheBehavior, buildCacheDeclaration } from "@cyanmycelium/mcp-cache";
import { RedisCacheStore } from "@cyanmycelium/mcp-cache-redis";
import { BrokerAccessGuard } from "@cyanmycelium/mcp-uns";

const store = await RedisCacheStore.connectAsync("redis://127.0.0.1:6379", { prefix: "site1:" });
const transport = new DirectTransport("ws://localhost:3000/provider/cache", { secret });
const server = new McpServerBuilder().withName("cache").withTransport(transport).register(new CacheBehavior(store, new BrokerAccessGuard(transport.broker))).build();
await server.start();
await transport.broker.declare(buildCacheDeclaration({ version: "1", namespace: "uns://site1" }));

Tools

| tool | broker capability, checked per id | |---|---| | cache.capabilities | none | | cache.get | cache.read: each id answers hit, miss, or a refusal | | cache.scan | cache.read (ids you may not read are left out) | | cache.set, cache.delete | cache.write, outcome reported |

Develop

npm install
npm run typecheck
npm test
npm run build

The Redis store runs the conformance suite on a fake Redis that misbehaves the way SCAN may. Against a real server, give the standard Redis settings in the environment or in a .env file at the root, which git ignores:

REDIS_URL=rediss://my-cache.example.com:6380
REDIS_PASSWORD=<password>

REDIS_URL carries its scheme: rediss:// for TLS (Azure Cache for Redis on 6380, for one), redis:// otherwise. REDIS_PASSWORD and REDIS_USERNAME (for an ACL user) are optional. Each test writes under its own key prefix and deletes its keys afterwards.

tests/broker.test.ts starts a real broker with @cyanmycelium/mcp-broker/testing.

License

Apache-2.0.