elephantasm-mcp
MCP server for long-term agent memory, providing persistent memory, searchable knowledge, and evolving identity for AI agents.
README
<div align="center">

elephantasm-mcp
MCP server for long-term agent memory. Give any AI agent persistent memory, searchable knowledge, and an evolving identity.
Website · Docs · PyPI · GitHub
</div>
Model Context Protocol server for Elephantasm Long-Term Agentic Memory. One line of config.
Installation
pip install elephantasm-mcp
Quick Start
Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"elephantasm": {
"command": "elephantasm-mcp",
"env": {
"ELEPHANTASM_API_KEY": "sk_live_...",
"ELEPHANTASM_ANIMA_ID": "your-anima-id"
}
}
}
}
Claude Code
Add to .claude/settings.json or ~/.claude/settings.json:
{
"mcpServers": {
"elephantasm": {
"command": "elephantasm-mcp",
"env": {
"ELEPHANTASM_API_KEY": "sk_live_...",
"ELEPHANTASM_ANIMA_ID": "your-anima-id"
}
}
}
}
Cursor / Windsurf
Add to your MCP config (Settings > MCP Servers):
{
"elephantasm": {
"command": "elephantasm-mcp",
"env": {
"ELEPHANTASM_API_KEY": "sk_live_...",
"ELEPHANTASM_ANIMA_ID": "your-anima-id"
}
}
}
Any MCP-Compatible Agent
The server uses stdio transport — any MCP client that can spawn a subprocess works out of the box:
ELEPHANTASM_API_KEY=sk_live_... ELEPHANTASM_ANIMA_ID=... elephantasm-mcp
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
ELEPHANTASM_API_KEY |
Yes | — | Your API key (starts with sk_live_) |
ELEPHANTASM_ANIMA_ID |
No | — | Default anima ID (can be overridden per tool call) |
ELEPHANTASM_ENDPOINT |
No | https://api.elephantasm.com/api |
API endpoint |
Get your API key and anima ID from the Elephantasm dashboard.
Tools
Five tools give your agent full read/write access to its memory:
query — Search the brain
Cross-source semantic search across memories, knowledge, and identity in one call. Returns a pre-formatted context string ready for system prompt injection.
query("what does the user prefer for error handling")
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Natural language search query |
anima_id |
string | env default | Override default anima |
sources |
string[] | all | Filter: "memories", "knowledge", "identity" |
max_tokens |
int | 2000 | Token budget for results |
limit |
int | 20 | Max results |
exclude_ids |
string[] | — | Exclude IDs for multi-turn dedup |
search_memories — Find past experiences
Semantic search across structured memories (reflections on past interactions).
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query |
anima_id |
string | env default | Override default anima |
limit |
int | 10 | Max results |
threshold |
float | 0.7 | Min similarity (0–1) |
search_knowledge — Look up what the agent knows
Semantic search across canonicalized knowledge — facts, concepts, methods, principles, and experiences.
| Parameter | Type | Default | Description |
|---|---|---|---|
query |
string | required | Search query |
anima_id |
string | env default | Override default anima |
limit |
int | 10 | Max results |
threshold |
float | 0.7 | Min similarity (0–1) |
knowledge_type |
string | — | Filter: FACT, CONCEPT, METHOD, PRINCIPLE, EXPERIENCE |
get_identity — Read the agent's personality
Retrieve the agent's behavioral fingerprint: personality type, communication style, and self-reflection.
| Parameter | Type | Default | Description |
|---|---|---|---|
anima_id |
string | env default | Override default anima |
ingest_event — Record an interaction
Capture a message, tool call, or system event. Queued for automatic memory synthesis.
| Parameter | Type | Default | Description |
|---|---|---|---|
content |
string | required | Event content |
event_type |
string | message.in |
message.in, message.out, tool.call, tool.result, system |
anima_id |
string | env default | Override default anima |
role |
string | — | user, assistant, system, tool |
author |
string | — | Who generated this event |
session_id |
string | — | Group related events |
Resources
Two resources provide context that MCP clients can embed directly into system prompts:
| URI | Type | Description |
|---|---|---|
anima://{id}/pack |
text/plain |
Latest compiled memory pack — memories, knowledge, identity, and temporal context assembled into a single prompt-ready string |
anima://{id}/identity |
application/json |
Identity profile — personality type, communication style, self-reflection |
How It Works
Elephantasm is a Long-Term Agentic Memory framework. The MCP server connects your agent to its memory backend:
Your Agent ←→ elephantasm-mcp ←→ api.elephantasm.com ←→ PostgreSQL + pgVector
Write path: ingest_event → Events accumulate → Memory Synthesis (LLM) → Knowledge Synthesis (LLM) → Identity evolution
Read path: query / search_memories / search_knowledge → pgVector semantic search → scored, formatted results
Memory is curated automatically by two background loops:
- Dreamer — decays, merges, splits, and archives memories
- Meditator — clusters, merges, reclassifies, and refines knowledge
SDKs
For programmatic access without MCP, use the native SDKs:
- Python:
elephantasm—pip install elephantasm - TypeScript:
@elephantasm/client—npm install @elephantasm/client
Links
License
Apache 2.0
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。