Skip to main content

elephantasm-mcp

PyPI version Python 3.10+ License

Model Context Protocol server for Elephantasm Long-Term Agentic Memory.

Give any MCP-compatible AI agent persistent memory, searchable knowledge, and an evolving identity — in 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:

Links

License

Apache 2.0

Metadata

Release files for elephantasm-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for elephantasm-mcp 0.1.0
File Size Uploaded Provenance
elephantasm_mcp-0.1.0.tar.gz 11.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for elephantasm-mcp 0.1.0
File Interpreter ABI Platform
elephantasm_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.4 kB

Release files / elephantasm_mcp-0.1.0.tar.gz

Download URL elephantasm_mcp-0.1.0.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
22e2fdfc5f97341474294a756eebb75f8e61d33a2c93e3ae9fcd7a45fde6ce12
BLAKE2b-256 checksum
How to use checksums
f912ab4708f2482403e5709affe36d2c46deff0b3b5f5f4fdd519cc37a60d2b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / elephantasm_mcp-0.1.0-py3-none-any.whl

Download URL elephantasm_mcp-0.1.0-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
981279d0a8a2a7d529a11bcac383b5ab73a3be7c7db3bbbf3ce4ce22d619e63b
BLAKE2b-256 checksum
How to use checksums
450b813d8aa7b9713439a4d26d3e917e8fb02a6e0461265a10a3a20f8dd0bba5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for elephantasm-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page