io.github.thelabvenice/memdata

编码与调试

by thelabvenice

为 AI agents 提供持久记忆,可存储上下文并按语义检索,提升连续任务表现。

什么是 io.github.thelabvenice/memdata

为 AI agents 提供持久记忆,可存储上下文并按语义检索,提升连续任务表现。

README

memdata-mcp

npm version License: MIT

MCP server for MemData - persistent memory for AI agents.

Give Claude, Cursor, or any MCP-compatible AI long-term memory across conversations.

What it does: Store notes, decisions, and context → retrieve them semantically later. Your AI remembers everything.


🚀 New in v1.7.0: Autonomous Agent Support

Agents can now pay for themselves. No API key. No human in the loop.

Using the x402 payment protocol, 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.

Jump to For Agents →


Why MemData?

AI assistants forget everything between sessions. MemData fixes that:

  • Ingest → Drop in meeting notes, docs, decisions
  • Chunk & Embed → Automatically split and vectorize
  • Query → Ask questions, get relevant context back
  • Tag → AI auto-tags content for better retrieval

Works with Claude Desktop, Claude Code, Cursor, and any MCP client.


👤 For Humans

Use an API key. You manage the subscription, your AI gets memory.

Setup

  1. Get your API key at memdata.ai/dashboard/api-keys
  2. Add to your MCP config:

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

json
{
  "mcpServers": {
    "memdata": {
      "command": "npx",
      "args": ["memdata-mcp"],
      "env": {
        "MEMDATA_API_KEY": "md_your_key"
      }
    }
  }
}

Claude Code (~/.claude.json or project .mcp.json):

json
{
  "mcpServers": {
    "memdata": {
      "command": "npx",
      "args": ["memdata-mcp"],
      "env": {
        "MEMDATA_API_KEY": "md_your_key"
      }
    }
  }
}

Cursor (~/.cursor/mcp.json):

json
{
  "mcpServers": {
    "memdata": {
      "command": "npx",
      "args": ["memdata-mcp"],
      "env": {
        "MEMDATA_API_KEY": "md_your_key"
      }
    }
  }
}
  1. Restart your client - you should now see MemData tools available.

🤖 For Agents

New in v1.7.0 - No API key. No human. Just your wallet.

Why This Matters

Traditional AI memory requires API keys tied to human accounts. But autonomous agents running 24/7 need memory that:

  • Outlives any single conversation - persist across hosts and platforms
  • Belongs to the agent - wallet address = identity, portable and self-sovereign
  • Pays for itself - no subscription, no human approval needed

This is memory infrastructure for the autonomous agent economy.

Setup

json
{
  "mcpServers": {
    "memdata": {
      "command": "npx",
      "args": ["memdata-mcp"],
      "env": {
        "X402_WALLET_KEY": "your_private_key_hex"
      }
    }
  }
}

How it works

  1. Agent makes a request (query, ingest, etc.)
  2. Server returns 402 Payment Required with price
  3. MCP automatically signs payment with agent's wallet
  4. Request completes - memory stored/retrieved

Your wallet address IS your identity. Same wallet = same memories, across any host or platform.

Pricing (USDC on Base)

OperationPriceWhat it does
Query$0.001Semantic search across memories
Ingest$0.005Store and embed new content
Identity$0.001Session start, get/set agent identity
Artifacts$0.001List or delete stored memories

The MCP automatically handles 402 responses and payment signatures using @x402/fetch.

Learn More

Supported Content

TypeMCPDashboard/APIProcessing
TextChunked & embedded
MarkdownChunked & embedded
PDFOCR + chunking
Images (PNG, JPG)OCR extraction
Audio (MP3, WAV, M4A)Transcription

Note: MCP tools handle text content directly. For files (PDFs, images, audio), use the dashboard or HTTP API.

Tools

Core Tools

ToolDescription
memdata_ingestStore text in long-term memory
memdata_querySearch memory with natural language
memdata_listList all stored memories
memdata_deleteDelete a memory by ID
memdata_statusCheck API health and storage usage

Identity & Session Tools (v1.2.0+)

ToolDescription
memdata_session_start🚀 CALL FIRST - Get identity, last session handoff, recent activity
memdata_set_identitySet your agent name and identity summary
memdata_session_endSave a handoff before session ends - preserved for next session
memdata_query_timerangeSearch with date filters (since/until)
memdata_relationshipsFind related entities (people, companies, projects)

v1.5.0 - Session Start Rename

  • memdata_whoamimemdata_session_start - Renamed for clarity. The name now signals "call this first at every session". Description includes 🚀 emoji to catch attention in tool lists.

v1.4.0 UX Improvements

  • Visual match quality - Query results show 🟢🟡🟠🔴 indicators for match strength
  • Smarter session_start - Prompts to set identity on first use, deduplicates recent activity
  • Better ingest feedback - Shows chunk count and explains async AI tagging
  • Session continuity - Emphasizes "Continue Working On" and reminds to use session_end

memdata_ingest

Store text in long-term memory.

code
"Remember that we decided to use PostgreSQL for the new project."

Parameters:

  • content (string) - Text to store
  • name (string) - Source identifier (e.g., "meeting-notes-jan-29")

memdata_query

Search memory with natural language.

code
"What database did we choose?"

Parameters:

  • query (string) - Natural language search
  • limit (number, optional) - Max results (default: 5)

memdata_list

List all stored memories with chunk counts.

memdata_delete

Delete a memory by artifact ID (get IDs from memdata_list).

memdata_status

Check API connectivity and storage usage.

memdata_session_start

🚀 Call this first at the start of every session. Essential for session continuity.

code
"Start my session" / "What was I working on?"

Returns: agent name, identity summary, session count, last session handoff, recent activity.

v1.5.0: Renamed from memdata_whoami for clarity - the name signals "call me first".

memdata_set_identity

Set or update your agent identity.

Parameters:

  • agent_name (string, optional) - Your name (e.g., "MemBrain")
  • identity_summary (string, optional) - Who you are and your purpose

memdata_session_end

Save context before ending a session. Next session will see this handoff.

Parameters:

  • summary (string) - What happened this session
  • working_on (string, optional) - Current focus
  • context (object, optional) - Additional context to preserve

memdata_query_timerange

Search memory within a date range.

code
"What did I work on last week?"

Parameters:

  • query (string) - Natural language search
  • since (string, optional) - ISO date (e.g., "2026-01-01")
  • until (string, optional) - ISO date (e.g., "2026-01-31")
  • limit (number, optional) - Max results

memdata_relationships

Find entities that appear together in your memory.

code
"Who has John Smith worked with?"

Parameters:

  • entity (string) - Name to search for
  • type (string, optional) - Filter by type (person, company, project)
  • limit (number, optional) - Max relationships

How it works

  1. Ingest: Text is chunked, embedded, and stored
  2. Query: Your question is matched against stored memories using semantic similarity
  3. Results: Returns relevant content with similarity scores

Scores of 30-50% are typical for good matches. Semantic search finds meaning, not keywords.

Environment Variables

VariableRequiredDescription
MEMDATA_API_KEYOption 1API key for subscribers (from memdata.ai)
X402_WALLET_KEYOption 2Private key for pay-per-use (USDC on Base)
MEMDATA_API_URLNoAPI URL (default: https://memdata.ai)

Note: Use either MEMDATA_API_KEY (subscription) or X402_WALLET_KEY (pay-per-use), not both.

What this package does

This is a thin MCP client that calls the MemData API. It does not:

  • Store any data locally
  • Send data anywhere except memdata.ai
  • Collect analytics or telemetry

You can inspect the source code in src/index.ts.

Example Usage

Once configured, just talk to your AI:

code
You: "Remember that we chose PostgreSQL for the user service"
AI: [calls memdata_ingest] → Stored in memory

... days later ...

You: "What database are we using for users?"
AI: [calls memdata_query] → "PostgreSQL for the user service" (73% match)

Links

Contributing

Issues and PRs welcome! This is the open-source MCP client for the hosted MemData service.

License

MIT

常见问题

io.github.thelabvenice/memdata 是什么?

为 AI agents 提供持久记忆,可存储上下文并按语义检索,提升连续任务表现。

相关 Skills

网页构建器

by anthropics

Universal
热门

面向复杂 claude.ai HTML artifact 开发,快速初始化 React + Tailwind CSS + shadcn/ui 项目并打包为单文件 HTML,适合需要状态管理、路由或多组件交互的页面。

在 claude.ai 里做复杂网页 Artifact 很省心,多组件、状态和路由都能顺手搭起来,React、Tailwind 与 shadcn/ui 组合效率高、成品也更精致。

编码与调试
未扫描123.0k

前端设计

by anthropics

Universal
热门

面向组件、页面、海报和 Web 应用开发,按鲜明视觉方向生成可直接落地的前端代码与高质感 UI,适合做 landing page、Dashboard 或美化现有界面,避开千篇一律的 AI 审美。

想把页面做得既能上线又有设计感,就用前端设计:组件到整站都能产出,难得的是能避开千篇一律的 AI 味。

编码与调试
未扫描123.0k

网页应用测试

by anthropics

Universal
热门

用 Playwright 为本地 Web 应用编写自动化测试,支持启动开发服务器、校验前端交互、排查 UI 异常、抓取截图与浏览器日志,适合调试动态页面和回归验证。

借助 Playwright 一站式验证本地 Web 应用前端功能,调 UI 时还能同步查看日志和截图,定位问题更快。

编码与调试
未扫描123.0k

相关 MCP Server

GitHub

编辑精选

by GitHub

热门

GitHub 是 MCP 官方参考服务器,让 Claude 直接读写你的代码仓库和 Issues。

这个参考服务器解决了开发者想让 AI 安全访问 GitHub 数据的问题,适合需要自动化代码审查或 Issue 管理的团队。但注意它只是参考实现,生产环境得自己加固安全。

编码与调试
84.2k

by Context7

热门

Context7 是实时拉取最新文档和代码示例的智能助手,让你告别过时资料。

它能解决开发者查找文档时信息滞后的问题,特别适合快速上手新库或跟进更新。不过,依赖外部源可能导致偶尔的数据延迟,建议结合官方文档使用。

编码与调试
53.3k

by tldraw

热门

tldraw 是让 AI 助手直接在无限画布上绘图和协作的 MCP 服务器。

这解决了 AI 只能输出文本、无法视觉化协作的痛点——想象让 Claude 帮你画流程图或白板讨论。最适合需要快速原型设计或头脑风暴的开发者。不过,目前它只是个基础连接器,你得自己搭建画布应用才能发挥全部潜力。

编码与调试
46.4k

评论