{
  "markdown": "# memdata-mcp\n\n[![npm version](https://img.shields.io/npm/v/memdata-mcp.svg)](https://www.npmjs.com/package/memdata-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nMCP server for [MemData](https://memdata.ai) - persistent memory for AI agents.\n\nGive Claude, Cursor, or any MCP-compatible AI long-term memory across conversations.\n\n**What it does:** Store notes, decisions, and context → retrieve them semantically later. Your AI remembers everything.\n\n---\n\n### 🚀 New in v1.7.0: Autonomous Agent Support\n\n**Agents can now pay for themselves.** No API key. No human in the loop.\n\nUsing the [x402 payment protocol](https://www.x402.org/), autonomous agents can use their wallet to pay per request with USDC on Base. Your wallet address IS your identity - same wallet, same memories across sessions.\n\n[Jump to For Agents →](#-for-agents)\n\n---\n\n## Why MemData?\n\nAI assistants forget everything between sessions. MemData fixes that:\n\n- **Ingest** → Drop in meeting notes, docs, decisions\n- **Chunk & Embed** → Automatically split and vectorize\n- **Query** → Ask questions, get relevant context back\n- **Tag** → AI auto-tags content for better retrieval\n\nWorks with Claude Desktop, Claude Code, Cursor, and any MCP client.\n\n---\n\n## 👤 For Humans\n\nUse an API key. You manage the subscription, your AI gets memory.\n\n### Setup\n\n1. Get your API key at [memdata.ai/dashboard/api-keys](https://memdata.ai/dashboard/api-keys)\n2. Add to your MCP config:\n\n**Claude Desktop** (`~/Library/Application Support/Claude/claude_desktop_config.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"memdata\": {\n      \"command\": \"npx\",\n      \"args\": [\"memdata-mcp\"],\n      \"env\": {\n        \"MEMDATA_API_KEY\": \"md_your_key\"\n      }\n    }\n  }\n}\n```\n\n**Claude Code** (`~/.claude.json` or project `.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"memdata\": {\n      \"command\": \"npx\",\n      \"args\": [\"memdata-mcp\"],\n      \"env\": {\n        \"MEMDATA_API_KEY\": \"md_your_key\"\n      }\n    }\n  }\n}\n```\n\n**Cursor** (`~/.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"memdata\": {\n      \"command\": \"npx\",\n      \"args\": [\"memdata-mcp\"],\n      \"env\": {\n        \"MEMDATA_API_KEY\": \"md_your_key\"\n      }\n    }\n  }\n}\n```\n\n3. Restart your client - you should now see MemData tools available.\n\n---\n\n## 🤖 For Agents\n\n**New in v1.7.0** - No API key. No human. Just your wallet.\n\n### Why This Matters\n\nTraditional AI memory requires API keys tied to human accounts. But autonomous agents running 24/7 need memory that:\n- **Outlives any single conversation** - persist across hosts and platforms\n- **Belongs to the agent** - wallet address = identity, portable and self-sovereign\n- **Pays for itself** - no subscription, no human approval needed\n\nThis is memory infrastructure for the autonomous agent economy.\n\n### Setup\n\n```json\n{\n  \"mcpServers\": {\n    \"memdata\": {\n      \"command\": \"npx\",\n      \"args\": [\"memdata-mcp\"],\n      \"env\": {\n        \"X402_WALLET_KEY\": \"your_private_key_hex\"\n      }\n    }\n  }\n}\n```\n\n### How it works\n\n1. Agent makes a request (query, ingest, etc.)\n2. Server returns `402 Payment Required` with price\n3. MCP automatically signs payment with agent's wallet\n4. Request completes - memory stored/retrieved\n\n**Your wallet address IS your identity.** Same wallet = same memories, across any host or platform.\n\n### Pricing (USDC on Base)\n\n| Operation | Price | What it does |\n|-----------|-------|--------------|\n| Query | $0.001 | Semantic search across memories |\n| Ingest | $0.005 | Store and embed new content |\n| Identity | $0.001 | Session start, get/set agent identity |\n| Artifacts | $0.001 | List or delete stored memories |\n\nThe MCP automatically handles 402 responses and payment signatures using [@x402/fetch](https://www.npmjs.com/package/@x402/fetch).\n\n### Learn More\n\n- [x402 Protocol](https://www.x402.org/) - HTTP-native payments\n- [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) - Trustless Agents standard (MemData is aligned)\n\n## Supported Content\n\n| Type | MCP | Dashboard/API | Processing |\n|------|-----|---------------|------------|\n| Text | ✅ | ✅ | Chunked & embedded |\n| Markdown | ✅ | ✅ | Chunked & embedded |\n| PDF | ❌ | ✅ | OCR + chunking |\n| Images (PNG, JPG) | ❌ | ✅ | OCR extraction |\n| Audio (MP3, WAV, M4A) | ❌ | ✅ | Transcription |\n\n> **Note:** MCP tools handle text content directly. For files (PDFs, images, audio), use the [dashboard](https://memdata.ai/dashboard) or [HTTP API](https://memdata.ai/docs).\n\n## Tools\n\n### Core Tools\n\n| Tool | Description |\n|------|-------------|\n| `memdata_ingest` | Store text in long-term memory |\n| `memdata_query` | Search memory with natural language |\n| `memdata_list` | List all stored memories |\n| `memdata_delete` | Delete a memory by ID |\n| `memdata_status` | Check API health and storage usage |\n\n### Identity & Session Tools (v1.2.0+)\n\n| Tool | Description |\n|------|-------------|\n| `memdata_session_start` | 🚀 CALL FIRST - Get identity, last session handoff, recent activity |\n| `memdata_set_identity` | Set your agent name and identity summary |\n| `memdata_session_end` | Save a handoff before session ends - preserved for next session |\n| `memdata_query_timerange` | Search with date filters (since/until) |\n| `memdata_relationships` | Find related entities (people, companies, projects) |\n\n### v1.5.0 - Session Start Rename\n\n- **`memdata_whoami` → `memdata_session_start`** - Renamed for clarity. The name now signals \"call this first at every session\". Description includes 🚀 emoji to catch attention in tool lists.\n\n### v1.4.0 UX Improvements\n\n- **Visual match quality** - Query results show 🟢🟡🟠🔴 indicators for match strength\n- **Smarter session_start** - Prompts to set identity on first use, deduplicates recent activity\n- **Better ingest feedback** - Shows chunk count and explains async AI tagging\n- **Session continuity** - Emphasizes \"Continue Working On\" and reminds to use `session_end`\n\n### `memdata_ingest`\n\nStore text in long-term memory.\n\n```\n\"Remember that we decided to use PostgreSQL for the new project.\"\n```\n\n**Parameters:**\n- `content` (string) - Text to store\n- `name` (string) - Source identifier (e.g., \"meeting-notes-jan-29\")\n\n### `memdata_query`\n\nSearch memory with natural language.\n\n```\n\"What database did we choose?\"\n```\n\n**Parameters:**\n- `query` (string) - Natural language search\n- `limit` (number, optional) - Max results (default: 5)\n\n### `memdata_list`\n\nList all stored memories with chunk counts.\n\n### `memdata_delete`\n\nDelete a memory by artifact ID (get IDs from `memdata_list`).\n\n### `memdata_status`\n\nCheck API connectivity and storage usage.\n\n### `memdata_session_start`\n\n🚀 **Call this first** at the start of every session. Essential for session continuity.\n\n```\n\"Start my session\" / \"What was I working on?\"\n```\n\nReturns: agent name, identity summary, session count, last session handoff, recent activity.\n\n> **v1.5.0**: Renamed from `memdata_whoami` for clarity - the name signals \"call me first\".\n\n### `memdata_set_identity`\n\nSet or update your agent identity.\n\n**Parameters:**\n- `agent_name` (string, optional) - Your name (e.g., \"MemBrain\")\n- `identity_summary` (string, optional) - Who you are and your purpose\n\n### `memdata_session_end`\n\nSave context before ending a session. Next session will see this handoff.\n\n**Parameters:**\n- `summary` (string) - What happened this session\n- `working_on` (string, optional) - Current focus\n- `context` (object, optional) - Additional context to preserve\n\n### `memdata_query_timerange`\n\nSearch memory within a date range.\n\n```\n\"What did I work on last week?\"\n```\n\n**Parameters:**\n- `query` (string) - Natural language search\n- `since` (string, optional) - ISO date (e.g., \"2026-01-01\")\n- `until` (string, optional) - ISO date (e.g., \"2026-01-31\")\n- `limit` (number, optional) - Max results\n\n### `memdata_relationships`\n\nFind entities that appear together in your memory.\n\n```\n\"Who has John Smith worked with?\"\n```\n\n**Parameters:**\n- `entity` (string) - Name to search for\n- `type` (string, optional) - Filter by type (person, company, project)\n- `limit` (number, optional) - Max relationships\n\n## How it works\n\n1. **Ingest**: Text is chunked, embedded, and stored\n2. **Query**: Your question is matched against stored memories using semantic similarity\n3. **Results**: Returns relevant content with similarity scores\n\nScores of 30-50% are typical for good matches. Semantic search finds meaning, not keywords.\n\n## Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `MEMDATA_API_KEY` | Option 1 | API key for subscribers (from memdata.ai) |\n| `X402_WALLET_KEY` | Option 2 | Private key for pay-per-use (USDC on Base) |\n| `MEMDATA_API_URL` | No | API URL (default: https://memdata.ai) |\n\n**Note:** Use either `MEMDATA_API_KEY` (subscription) or `X402_WALLET_KEY` (pay-per-use), not both.\n\n## What this package does\n\nThis is a thin MCP client that calls the MemData API. It does not:\n- Store any data locally\n- Send data anywhere except memdata.ai\n- Collect analytics or telemetry\n\nYou can inspect the source code in `src/index.ts`.\n\n## Example Usage\n\nOnce configured, just talk to your AI:\n\n```\nYou: \"Remember that we chose PostgreSQL for the user service\"\nAI: [calls memdata_ingest] → Stored in memory\n\n... days later ...\n\nYou: \"What database are we using for users?\"\nAI: [calls memdata_query] → \"PostgreSQL for the user service\" (73% match)\n```\n\n## Links\n\n- [MemData](https://memdata.ai) - Main site\n- [Dashboard](https://memdata.ai/dashboard) - Manage your memory\n- [API Docs](https://memdata.ai/docs) - Full documentation\n- [GitHub](https://github.com/thelabvenice/memdata-mcp) - This repo\n\n## Contributing\n\nIssues and PRs welcome! This is the open-source MCP client for the hosted MemData service.\n\n## License\n\nMIT\n",
  "bytes": 9784,
  "sha": "49c48459a8b677bc0d2a1e383a10edaefc68e344aa7393e014cf645f955e1018",
  "repo_slug": "thelabvenice/memdata-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_thelabvenice_memdata_7784857e/readme"
}