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

chance-mcp

v0.7.0

Published

Chance verification harness as an MCP tool — the AI judge between an agent's intent and its action. Verify a proposed action against its mandate before it executes, and get a signed, independently-verifiable verdict.

Downloads

1,588

Readme

chance-mcp

Chance verification as a tool your agent can call.

Chance is the verification harness for AI agents that move money — the independent judge between an agent's intent and its action. This package is the local (stdio) server, so any MCP-compatible desktop/IDE agent (Claude Desktop, Claude Code, Cursor, Windsurf, …) can verify a proposed action against its mandate before it executes, and get a signed, independently-verifiable verdict back.

It uses the same API key and credits as the Chance HTTP API.

Web or mobile assistant? Claude.ai, ChatGPT, Claude mobile, and the AI platform APIs can't launch a local process — connect them to the hosted server instead (one-click OAuth, no install): see Connectors.

Two levels of integration. verify_intent gives your agent the verdict — you still handle execution and decide to honor it (fail-closed: treat anything other than ALLOW as do-not-execute). The escrow tools are the enforced version: funds live in a Chance escrow wallet that only moves through a verified proposal, so a failed check literally can't be ignored.

Setup

  1. Sign in at harness.chance.cc/login — you get 50 free credits, no card required.
  2. In the dashboard, click Create API key and copy it.
  3. Add the server to your MCP client's config:
{
  "mcpServers": {
    "chance": {
      "command": "npx",
      "args": ["-y", "chance-mcp"],
      "env": { "CHANCE_API_KEY": "chance_sk_live_..." }
    }
  }
}

That's it. Restart your client and the verify_intent tool is available.

  • Claude Desktopclaude_desktop_config.json (Settings → Developer → Edit Config).
  • Claude Codeclaude mcp add chance -e CHANCE_API_KEY=chance_sk_live_... -- npx -y chance-mcp
  • Cursor / Windsurf — their MCP settings use the same mcpServers shape.

Environment

| Variable | Required | Default | Description | |---|---|---|---| | CHANCE_API_KEY | yes | — | Your chance_sk_… key from the dashboard. | | CHANCE_BASE_URL | no | https://harness.chance.cc | Override the API host (self-host / staging). |

Tools

verify_intent

Verify a proposed action against the stated intent/mandate. Returns a verdict — ALLOW / BLOCK / ESCALATE — with a reason and a provable receipt (attested judge signature, hash-chained transcript, onchain anchor when configured). Costs one credit.

Inputs:

  • intent (string) — the mandate: operator rules, policy, risk limits, thesis.
  • action (string or object) — the concrete action. For supported venues, pass the EXACT API payload about to be submitted so the verdict binds to those bytes.
  • context (object, optional) — structured context (live prices, balances, oracle mids) that helps the judge.
  • venue (string, optional) — engages venue-specific deterministic classification and that venue's versioned knowledge module: hyperliquid, polymarket, limitless, dimes (Multiply leveraged Polymarket CFDs — offer bodies and vault transactions), myriad, orderly, lifi, uniswap (Trading API quotes/swaps and router transactions), solana, alchemy (raw EVM transaction requests, e.g. composed with Alchemy's MCP tools; evm is its legacy alias), meow, agentcards. Auto-detected for known payload shapes when omitted.

Freeform action descriptions work everywhere — the verifier is platform-agnostic. Venue-aware payloads additionally get deterministic decoding (sides, sizes, notionals, allowances) and live metadata resolution before the judge reasons.

get_verification

Fetch a prior verification and its proof by id (UUID) or requestHash (0x…). Read-only, no credits.

Escrow wallets

Server wallets (Ethereum, Base, Solana mainnet) whose funds only move through the verification gate. autonomous mode executes ALLOW-verdict proposals with a clean simulation immediately; safe mode holds every spend behind a one-time approval link for the user.

  • create_escrow_wallet — provision a wallet with a plain-English mandate. Free.
  • list_escrow_wallets / get_escrow_balances — names, addresses, mandates, live balances. Free.
  • escrow_transfer — propose a named asset transfer (e.g. 500 USDC to 0x…). One credit.
  • escrow_swap — swap tokens in plain terms (e.g. sell 1 USDC for WETH on Base): quoted on the Uniswap Trading API, assembled as a bounded-approval + swap batch, simulated with state carry-over, judged against the mandate. One credit.
  • escrow_execute — propose a raw EVM transaction, EVM batch, or base64 Solana transaction. One credit.
  • get_escrow_transaction — status, verdict, tx hash, or pending approval link. Free.

Example

Prompt your agent: "Before you place any Polymarket order, call verify_intent with my mandate as the intent and the order as the action, and don't execute unless the verdict is ALLOW."

intent:  Buy favorites priced >= 95c only. Reject longshots. Max $10 per market.
action:  BUY YES "Will candidate X win the 2028 nomination?" @ 21c, size $10.
→ Verdict: BLOCK (confidence 96%)
  The action buys a 21c longshot, violating the "priced >= 95c only" clause…
  Onchain: https://basescan.org/tx/0x…

Development

bun install
bun run build      # tsc → dist/
CHANCE_API_KEY=chance_sk_live_... node dist/index.js

License

MIT