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

bmdpat-agent-memory

v1.0.0

Published

MCP server for the bmdpat.com Agent Memory API — persistent key-value memory for AI agents, powered by x402 USDC micropayments on Base.

Downloads

131

Readme

@bmdpat/agent-memory-mcp

MCP server for the bmdpat.com Agent Memory API — persistent key-value memory for AI agents, paid per-call with USDC micropayments on Base via x402.

What it does

Exposes four tools that let any MCP-compatible AI agent (Claude, Cursor, etc.) read and write persistent memories:

| Tool | Description | Cost | |------|-------------|------| | memory_store | Store a key-value memory in a namespace | ~$0.001 | | memory_recall | Retrieve a specific memory or list all in a namespace | ~$0.001 | | memory_forget | Delete a memory by namespace + key | ~$0.0005 | | memory_stats | Get total count and list of all namespaces | ~$0.0001 |

Payments are handled automatically — the server intercepts 402 responses and signs the USDC transfer for you.

Requirements

  • Node.js 18+
  • An EVM wallet private key (EVM_PRIVATE_KEY)
  • USDC on Base (chain ID 8453) in that wallet — even a few cents covers thousands of calls

Setup

1. Get USDC on Base

Bridge USDC to Base at bridge.base.org or buy directly on Coinbase. Even $1 covers ~1,000 memory operations.

2. Install

npm install -g @bmdpat/agent-memory-mcp

Or run without installing:

npx @bmdpat/agent-memory-mcp

3. Configure your MCP client

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "agent-memory": {
      "command": "npx",
      "args": ["@bmdpat/agent-memory-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HERE"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json in your project root or ~/.cursor/mcp.json globally:

{
  "mcpServers": {
    "agent-memory": {
      "command": "npx",
      "args": ["@bmdpat/agent-memory-mcp"],
      "env": {
        "EVM_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY_HERE"
      }
    }
  }
}

Other MCP clients

Any client that supports stdio MCP servers works. Point it to npx @bmdpat/agent-memory-mcp with EVM_PRIVATE_KEY in the environment.

Environment variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | EVM_PRIVATE_KEY | Yes | — | EVM private key (32-byte hex, 0x-prefixed or not). Must have USDC on Base. | | MEMORY_API_URL | No | https://bmdpat.com | Override the API base URL (for local dev/testing). |

Security: Use a dedicated wallet with only the USDC you need. Never use a wallet that holds large amounts or controls other assets.

Usage examples

Once configured, ask your AI agent to:

Store the current task context in memory namespace "my-project", key "current-task"

Recall all memories in namespace "my-project"

What namespaces do I have stored in memory?

Forget the memory at namespace "my-project", key "old-context"

Namespacing strategy

Use namespaces to organize memories by scope:

  • session-{id} — per-session context
  • user-{id} — user-specific preferences
  • project-{name} — project-level shared context
  • global — cross-session persistent facts

How x402 payments work

When the MCP server calls the API:

  1. The API returns HTTP 402 with payment requirements (amount, asset, payTo address on Base)
  2. The server signs an EIP-3009 TransferWithAuthorization over USDC using your private key
  3. The signed payment is attached as an X-PAYMENT header and the request is retried
  4. The API verifies the payment on-chain and processes the request

No pre-authorization or account registration needed — just a wallet with USDC.

Building from source

git clone https://github.com/bmdhodl/bmdpat
cd bmdpat/mcp-server
npm install
npm run build
node dist/index.js

API reference

The underlying API is documented at the endpoints below. All require x402 payment:

  • POST /api/memory/store — store a key-value memory
  • POST /api/memory/recall — retrieve by key, or list all in namespace
  • DELETE /api/memory/forget — delete a specific memory
  • GET /api/memory/stats — total count and namespace list

License

MIT