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

shack-blackboard

v0.1.0

Published

Shared-state MCP server providing a blackboard, pub/sub topics, and named locks for multi-agent coordination

Downloads

23

Readme

shack-blackboard

A shared-state MCP server providing a blackboard (key-value store), topic-based publish/subscribe messaging, and named exclusive locks for multi-agent coordination.

Speaks JSON-RPC 2.0 over stdio — STDOUT carries only protocol messages; all diagnostic logs go to STDERR.

What it does

  • Blackboard: agents read and write arbitrary JSON values under named keys, enabling shared working memory across a session.
  • Pub/sub topics: any agent can publish messages to a named topic; others poll with a cursor index to consume only new messages without re-reading old ones.
  • Named locks: agents acquire and release exclusive locks on named resources, with optional TTL-based expiry, to coordinate critical sections.

MCP tools

| Tool | Arguments | Description | |------|-----------|-------------| | write_blackboard | key (string, required), value (any JSON, required) | Write a JSON value under a key; overwrites any existing value | | read_blackboard | key (string, required) | Read the value stored under a key; returns null if the key does not exist | | list_keys | (none) | List all keys currently stored in the blackboard, sorted alphabetically | | publish | topic (string, required), message (any JSON, required) | Append a JSON message to a named topic's log; creates the topic if needed | | poll_topic | topic (string, required), cursor (integer >= 0, required) | Retrieve messages from a topic starting at cursor; returns messages array and next_cursor | | list_topics | (none) | List all topic names that have received at least one message, sorted alphabetically | | acquire_lock | resource (string, required), owner (string, required), ttl_ms (integer, optional) | Acquire an exclusive lock; returns acquired boolean. Same owner can re-acquire (TTL renewal) | | release_lock | resource (string, required), owner (string, required) | Release a lock held by the given owner; returns released boolean |

Key and topic names must be non-empty strings of at most 512 characters.

Usage example

The following shows a complete JSON-RPC session: acquire a lock, do work, then release.

Request — acquire lock:

{"jsonrpc":"2.0","method":"tools/call","params":{"name":"acquire_lock","arguments":{"resource":"shared-db","owner":"agent-1","ttl_ms":5000}},"id":1}

Response:

{"jsonrpc":"2.0","result":{"content":[{"type":"text","text":"Lock acquired on shared-db by agent-1"}],"acquired":true},"id":1}

Request — release lock:

{"jsonrpc":"2.0","method":"tools/call","params":{"name":"release_lock","arguments":{"resource":"shared-db","owner":"agent-1"}},"id":2}

Response:

{"jsonrpc":"2.0","result":{"content":[{"type":"text","text":"Lock on shared-db released by agent-1"}],"released":true},"id":2}

Install

npm install
npm run build

Run

node dist/main.js

Or via the bin entry:

npx shack-blackboard

The server reads newline-delimited JSON-RPC 2.0 requests from stdin and writes responses to stdout. No flags are required.

Test

npm test

Covers unit tests for all SharedState methods and validateKey, plus dispatch-level tests for every tool including error paths, boundary values, and missing/invalid arguments.