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

@razroo/parallel-mcp-postgres

v0.1.0-beta.2

Published

Postgres adapter for @razroo/parallel-mcp — full AsyncParallelMcpStore implementation

Readme

@razroo/parallel-mcp-postgres

Status: beta. This workspace ships a Postgres-backed AsyncParallelMcpStore that implements the full orchestrator contract pinned by @razroo/parallel-mcp-testkit's async conformance suite. It is a straight port of the reference SqliteParallelMcpStore, with:

  • JSONB columns where SQLite used TEXT-encoded JSON
  • BIGSERIAL on events.id so the event cursor stays monotonic
  • TIMESTAMPTZ for every timestamp
  • SELECT … FOR UPDATE SKIP LOCKED for multi-worker-safe claims

Schema

The canonical schema is a single SQL string exported as POSTGRES_SCHEMA. Apply it once against a fresh database:

import { Pool } from 'pg'
import { POSTGRES_SCHEMA } from '@razroo/parallel-mcp-postgres/schema'

const pool = new Pool({ connectionString: process.env.DATABASE_URL })
await pool.query(POSTGRES_SCHEMA)

In production you'll almost always wrap this in a real migration tool (drizzle-kit, node-pg-migrate, etc.). We publish it as a single string so you can copy-paste it into a 0001_init.sql file if you want.

Usage

import { Pool } from 'pg'
import { AsyncParallelMcpOrchestrator } from '@razroo/parallel-mcp'
import { PostgresParallelMcpStore } from '@razroo/parallel-mcp-postgres'

const pool = new Pool({ connectionString: process.env.DATABASE_URL })
const store = new PostgresParallelMcpStore({ pool, autoMigrate: true })

const orchestrator = new AsyncParallelMcpOrchestrator(store, {
  defaultLeaseMs: 30_000,
})

const run = await orchestrator.createRun({ namespace: 'demo' })
await orchestrator.enqueueTask({ runId: run.id, kind: 'greet' })

The store implements the async interface, so you drive it through AsyncParallelMcpOrchestratornot the synchronous ParallelMcpOrchestrator.

Running the live conformance suite

Tests run against a real Postgres when DATABASE_URL is set and are skipped otherwise.

docker run --rm -d --name pmcp-pg -p 5432:5432 \
  -e POSTGRES_PASSWORD=postgres postgres:16

DATABASE_URL=postgres://postgres:postgres@localhost:5432/postgres \
  npm run test --workspace @razroo/parallel-mcp-postgres

Each test spawns its own schema (pmcp_test_<rand>), runs the full runAsyncConformanceSuite, and drops the schema on cleanup so the runs are independent.

Pool ownership

PostgresParallelMcpStore does not call pool.end() in close() — the pool belongs to the caller. This matches the idiom for long-running servers that share a pool across many stores.

Contributing

Please read the root CONTRIBUTING.md. Typed errors and the full set of operations you need to honor when writing an adapter from scratch are documented in ../../docs/authoring-adapters.md.