New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

bmdpat-agent-memory

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bmdpat-agent-memory

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

latest
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

@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:

ToolDescriptionCost
memory_storeStore a key-value memory in a namespace~$0.001
memory_recallRetrieve a specific memory or list all in a namespace~$0.001
memory_forgetDelete a memory by namespace + key~$0.0005
memory_statsGet 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

VariableRequiredDefaultDescription
EVM_PRIVATE_KEYYesEVM private key (32-byte hex, 0x-prefixed or not). Must have USDC on Base.
MEMORY_API_URLNohttps://bmdpat.comOverride 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:

  • The API returns HTTP 402 with payment requirements (amount, asset, payTo address on Base)
  • The server signs an EIP-3009 TransferWithAuthorization over USDC using your private key
  • The signed payment is attached as an X-PAYMENT header and the request is retried
  • 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

Keywords

mcp

FAQs

Package last updated on 24 Apr 2026

Related posts