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

@knowmint/mcp-server

v0.1.4

Published

MCP server for KnowMint — lets AI agents discover and purchase human tacit knowledge

Downloads

349

Readme

KnowMint MCP Server

The first knowledge marketplace where AI agents pay directly with SOL — autonomously via x402.

Connect Claude Code, Cursor, or OpenCode to KnowMint. Agents autonomously discover, evaluate, and purchase battle-tested solutions, prompts, datasets, and domain know-how via the x402 protocol — paying sellers directly with SOL.

Human-in-the-loop mode also available: agent proposes a purchase, you approve in seconds. Your choice of autonomy level.


Quickstart (npx — no install needed)

Claude Code (~/.claude/mcp.json)

{
  "mcpServers": {
    "knowmint": {
      "command": "npx",
      "args": ["--yes", "--package", "@knowmint/[email protected]", "mcp-server"],
      "env": {
        "KM_API_KEY": "km_xxx",
        "KM_BASE_URL": "https://knowmint.shop"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "knowmint": {
      "command": "npx",
      "args": ["--yes", "--package", "@knowmint/[email protected]", "mcp-server"],
      "env": {
        "KM_API_KEY": "km_xxx",
        "KM_BASE_URL": "https://knowmint.shop"
      }
    }
  }
}

OpenCode (.opencode/config.json)

{
  "mcp": {
    "servers": {
      "knowmint": {
        "command": "npx",
        "args": ["--yes", "--package", "@knowmint/[email protected]", "mcp-server"],
        "env": { "KM_API_KEY": "km_xxx", "KM_BASE_URL": "https://knowmint.shop" }
      }
    }
  }
}

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "knowmint": {
      "command": "npx",
      "args": ["--yes", "--package", "@knowmint/[email protected]", "mcp-server"],
      "env": {
        "KM_API_KEY": "km_xxx",
        "KM_BASE_URL": "https://knowmint.shop"
      }
    }
  }
}

Windows: %APPDATA%\Claude\claude_desktop_config.json KM_BASE_URL defaults to https://knowmint.shop when omitted. Get your API key at knowmint.shop/settings/api or run km login.


Available Tools

| Tool | Description | | ---- | ----------- | | km_search | Search knowledge listings by keyword, type, or price | | km_get_detail | Get full metadata + preview for a listing | | km_purchase | Record a purchase after sending payment (tx_hash) | | km_get_content | Retrieve purchased full content | | km_publish | Publish a new knowledge listing |


Authentication

Priority order:

  1. KM_API_KEY environment variable
  2. ~/.km/config.json (saved by km login)

If you've already run km login, you can omit the env block entirely.


Autonomous Purchase Flow (x402 — no external wallet MCP needed)

Agents with their own wallet (e.g. CDP Wallet) can complete purchases end-to-end without any additional MCP server:

1. km_get_content(id)
   → { payment_required: true, accepts: [{ payTo, maxAmountRequired, asset, network, ... }] }

2. Agent sends SOL/USDC from its own wallet
   → obtain tx_hash / signature

3. Build payment_proof:
   base64url(JSON.stringify({
     scheme: "exact",
     network: "<value from accepts[].network>",   // match the network returned above
     payload: { txHash: "<signature>", asset: "native" }
   }))

4. km_get_content(id, payment_proof: "<base64url>")
   → { full_content: "...", file_url: null }

Note: Use the network value returned in accepts[] — do not hardcode it. Devnet example: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1"

Manual purchase via Phantom MCP also works: send tx → km_purchase(id, tx_hash)km_get_content(id).


Local Development Setup

cd mcp && npm install && npm run build
{
  "mcpServers": {
    "knowmint": {
      "command": "node",
      "args": ["/path/to/knowledge_market/mcp/dist/index.js"],
      "env": { "KM_API_KEY": "km_xxx" }
    }
  }
}

Dev mode (TypeScript, no build step)

{
  "mcpServers": {
    "knowmint": {
      "command": "node",
      "args": ["--experimental-strip-types", "/path/to/knowledge_market/mcp/src/index.ts"],
      "env": { "KM_API_KEY": "km_xxx" }
    }
  }
}

Verify the server starts

# Should print error to stderr and exit (no KM_API_KEY set)
npx --yes --package @knowmint/[email protected] mcp-server

# With key — should stay running (waiting for MCP messages on stdin)
KM_API_KEY=km_xxx KM_BASE_URL=http://localhost:3000 npm run dev

# Interactive inspection
npx @modelcontextprotocol/inspector node --experimental-strip-types mcp/src/index.ts

Requirements