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

@clayseal/verify

v0.1.0

Published

Server-side verification of Clay Seal agent credentials for JavaScript/TypeScript MCP servers and tool gateways: offline JWT-SVID verification, Biscuit capability authorization, and sender-constrained proof-of-possession.

Readme

@clayseal/verify

Server-side verification of Clay Seal agent credentials for JavaScript / TypeScript MCP servers and tool gateways — Node MCP servers, OpenClaw tool plugins, edge functions.

Agents are issued short-lived, attested credentials by the Clay Seal identity service (Python). This package is the verifier: it decides, offline, whether an incoming tool call is allowed. Issuance stays server-side; nothing here needs a private key or a network call.

npm install @clayseal/verify

What it checks

A Clay Seal request carries three things, added by the client's tool_headers(session, server_url=...):

| Header | Question | Verified by | | --- | --- | --- | | Authorization: Bearer <jwt> | Who is the agent? | verifyToken | | X-ClaySeal-Biscuit | What may it do? | authorizeTool | | X-ClaySeal-PoP | Does it hold the bound key? | authorizeTool |

The Biscuit is what gets authorized, so an agent that attenuated its rights mid-task is held to the narrowed token. The Biscuit is sender-constrained, so a token lifted from a log is useless without the workload key that signs the proof-of-possession.

Use

import { verifyToken, authorizeTool } from "@clayseal/verify";

// 1. Transport: is this a valid Clay Seal agent? (reject with 401 otherwise)
const claims = await verifyToken(bearer, { jwks: tenantJwks, issuer: "clayseal.io" });
if (!claims) return unauthorized();

// 2. Per tool call: does the capability token authorize *this* tool?
const decision = authorizeTool({
  tool: "search_web",
  biscuit: req.headers["x-clayseal-biscuit"],
  pop: req.headers["x-clayseal-pop"],
  rootPublicKey: tenantBiscuitRootHex,   // or an array during key rotation
  serverUrl: "https://tools.example.com/mcp",
});
if (!decision.allowed) return forbidden(decision.reason);

tool maps to the capability ("tool", <name>) by default; pass capabilityForTool to override. verifyToken returns the verified claims or null; authorizeTool returns { allowed, reason } and fails closed on a missing token, a missing or stale proof, a wrong endpoint, or an ungranted capability.

The proof is bound to serverUrl, so a proof presented to one service can't be replayed against another. To make each proof single-use on the same endpoint too, pass a replay cache (clients then send a fresh proof per request):

import { InMemoryReplayCache } from "@clayseal/verify";

const replayCache = new InMemoryReplayCache(); // per-process; back with a shared store across workers
authorizeTool({ tool, biscuit, pop, rootPublicKey, serverUrl, replayCache });

OpenClaw

Call authorizeTool from a tool plugin's permission hook, so policy-approved calls run and out-of-scope ones are refused (or escalated to a human) — see examples/openclaw-plugin.md in the Clay Seal identity repo.

Parity with the Python SDK

The Datalog authorizer policy, the Ed25519 proof-of-possession message, and the JWK thumbprint are byte-compatible with clayseal-identity. test/parity.test.mjs verifies a credential minted by the Python backend against this package:

python test/gen_fixture.py test/fixture.json   # needs clayseal-identity[server] on PATH
npm test

Run the two steps back to back — the proof-of-possession in the fixture expires after ~5 minutes.

MIT licensed. Part of clayseal/clayseal-identity.