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

bridle-mcp

v0.1.1

Published

MCP server for Bridle: lets an AI agent read its spending rules, check a payment, and propose one. Owner actions are deliberately not exposed.

Readme

bridle-mcp

An MCP server that lets an AI agent work inside a Bridle spending mandate: read its limits, check a payment, and propose one.

It is deliberately small. The contract is the authority, and this server is a thin, honest layer over it.

Tools

| Tool | What it does | |---|---| | list_mandates | Mandates that name this agent | | get_mandate | Caps, what is left today, review threshold, approved recipients | | check_payment | Dry run: ready, review or blocked, and the rule. Sends nothing, leaves no record | | propose_payment | Sends propose_payment as the agent. The contract decides | | get_proposal / list_proposals | Status and reason |

Not exposed, on purpose: create, update, revoke, veto, flag, bond withdrawal. An agent must not be able to widen its own limits. A test fails if a tool like that is ever added.

Run

BRIDLE_CONTRACT=bridle.testnet npx -y bridle-mcp   # speaks MCP over stdio

Most clients launch it for you from their config (see below). From source:

cd mcp && npm install && npm run build
BRIDLE_CONTRACT=bridle.testnet node dist/index.js

| Variable | Needed | Meaning | |---|---|---| | BRIDLE_CONTRACT | yes | NEAR account the contract is deployed to | | BRIDLE_RPC | no | Defaults to https://test.rpc.fastnear.com | | BRIDLE_EXPLORER | no | Defaults to https://testnet.nearblocks.io | | BRIDLE_AGENT_ACCOUNT | for propose_payment | The agent's NEAR account | | BRIDLE_AGENT_KEY | for propose_payment | ed25519:... secret key for that account |

Without the agent account and key, the server is read-only.

Client config examples are in public/agents.md.

The agent key

Use a function-call access key limited to propose_payment on the Bridle contract. It identifies the agent and cannot move funds. The key is read from the environment only when a payment is proposed, and is never written to output or logs.

Amounts

Tools take decimal USDC (18.50). The contract takes smallest units ("18500000"). The server converts, and echoes both the decimal amount and the contract's status.

How check_payment relates to the contract

src/policy.ts mirrors the checks in contract/src/lib.rs propose_payment, in the same order, using the chain's own clock for day rollover and expiry. The contract is the authority. If the two ever disagree, the contract wins, so a ready from check_payment is a prediction and not a guarantee.

Honest limits

  • Base signing is built but not yet verified end to end, and Solana is not built, so the tools say "cleared", never "paid".
  • Tested against a mock NEAR RPC, including a signed propose_payment. Not yet run against a live testnet contract with a real agent key.

Develop

npm test      # builds, then runs the unit tests and the stdio end-to-end tests