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

@leashmarket/mcp-core

v0.3.2

Published

Host-agnostic core for every Leash MCP surface.

Readme

@leashmarket/mcp-core

Host-agnostic core for every Leash MCP surface.

Defines the LeashHost runtime contract, LeashTool primitive, and the full LEASH_TOOLS catalogue that all adapters (@leashmarket/mcp, Claude Agent SDK, browser runtimes) iterate over.

Install

npm install @leashmarket/mcp-core
# or
pnpm add @leashmarket/mcp-core

What lives here

| Export | Purpose | | -------------------------- | ------------------------------------------------------------------------------------------------------ | | LeashHost | Runtime contract every host implements (wallet, RPC, API key, …) | | LeashTool / defineTool | Tool-definition primitive (name, Zod schema, typed handler) | | LEASH_TOOLS | Canonical tool list adapters iterate — discover, pay, agent API keys, receipts, spend limits, etc. | | helpers/* | Pure utilities: probePaymentLink, fetchDiscover, fetchReputation, token catalog, address helpers |

Payment-link tool contract

leash_create_payment_link is the shared tool definition used by @leashmarket/mcp, @leashmarket/cli, and in-product agent hosts. It supports:

  • method: "GET" | "POST" — how buyers call the hosted paywall.
  • protocol: "x402" | "mpp" — which payment rail the hosted paywall speaks.
  • upstream_url — an existing API endpoint to call after settlement.
  • expected_request_body — arbitrary JSON metadata describing the POST body buyers should send.

expected_request_body is not the live request body. The buyer supplies the real body later through leash_pay_payment_link or another x402/MPP client, and the hosted paywall forwards it to upstream_url only after payment settles. leash_pay_payment_link mirrors the same contract with method and raw body arguments for POST calls.

Agent API-key tools

leash_create_agent_api_key, leash_list_agent_api_keys, and leash_revoke_agent_api_key let a configured agent create and manage its own Leash API key. These calls are authenticated with X-Leash-Sig, so no existing LEASH_API_KEY is required to bootstrap one. Created keys are bound to the active agent mint, owned by the executive public key, and scoped as exactly agent; plaintext is returned once on create.

Usage

import { LEASH_TOOLS, type LeashHost } from '@leashmarket/mcp-core';

// Implement the host contract for your runtime
const host: LeashHost = {
  apiKey: process.env.LEASH_API_KEY!,
  apiUrl: 'https://api.leash.market',
  network: 'solana-mainnet',
  rpcUrl: 'https://api.mainnet-beta.solana.com',
  signer: mySigner,
};

// Iterate tools and wire them into your adapter
for (const tool of LEASH_TOOLS) {
  registerTool(tool.name, tool.schema, (args) => tool.handler(host, args));
}

Using helpers directly

import { probePaymentLink, fetchDiscover } from '@leashmarket/mcp-core/helpers';

// Check if a URL is a valid x402/MPP paywall
const result = await probePaymentLink('https://api.example.com/endpoint');

// Browse the discover catalog
const { items } = await fetchDiscover('https://api.leash.market', {
  capability: 'translate text',
});

Docs

Full tool reference and host contract: docs.leash.market/sdk/mcp-core

Develop

pnpm --filter @leashmarket/mcp-core build
pnpm --filter @leashmarket/mcp-core test