Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mengram.io/llms.txt

Use this file to discover all available pages before exploring further.

What is MCP?

Model Context Protocol (MCP) lets AI clients like Claude Desktop, Cursor, Continue.dev, and Windsurf connect to external tools. Mengram’s MCP server gives these clients persistent memory — semantic, episodic, and procedural.

Prerequisites

The MCP config below uses the local mengram CLI. Install it once and find its path — you’ll need that path in the configs below.
1

Install the CLI

pip install mengram-ai
2

Find the mengram path

which mengram
Use the printed path as command in the configs below — replace /path/to/mengram with it.

Setup with Claude Desktop

Open Settings → Developer → Edit Config, then add:
{
  "mcpServers": {
    "mengram": {
      "command": "/path/to/mengram",
      "args": ["server", "--cloud"],
      "env": {
        "MENGRAM_API_KEY": "om-your-key",
        "MENGRAM_URL": "https://mengram.io"
      }
    }
  }
}
Restart Claude Desktop after saving.

Setup with Cursor

Add to Cursor’s MCP settings (~/.cursor/mcp.json), or open Settings → Cursor Settings → MCP:
{
  "mcpServers": {
    "mengram": {
      "command": "/path/to/mengram",
      "args": ["server", "--cloud"],
      "env": {
        "MENGRAM_API_KEY": "om-your-key",
        "MENGRAM_URL": "https://mengram.io"
      }
    }
  }
}
Restart Cursor.

Setup with Continue.dev

Continue stores each MCP server as a separate YAML file. Create .continue/mcpServers/mengram.yaml at the top level of your workspace:
name: Mengram
version: 0.0.1
schema: v1
mcpServers:
  - name: mengram
    command: /path/to/mengram
    args:
      - server
      - --cloud
    env:
      MENGRAM_API_KEY: om-your-key
      MENGRAM_URL: https://mengram.io
Reload the Continue extension (or restart your IDE). Continue will auto-pick it up.

Setup with Windsurf

Edit ~/.codeium/windsurf/mcp_config.json (or open Settings → Cascade → MCP in the IDE):
{
  "mcpServers": {
    "mengram": {
      "command": "/path/to/mengram",
      "args": ["server", "--cloud"],
      "env": {
        "MENGRAM_API_KEY": "om-your-key",
        "MENGRAM_URL": "https://mengram.io"
      }
    }
  }
}
Restart Windsurf.

Available Tools

The cloud MCP server exposes 29 tools:

Memory Operations

ToolDescription
rememberSave knowledge from a conversation to memory — pass message pairs and the AI extracts entities, facts, relations, episodes, and procedures.
remember_textSave plain text to memory — the AI extracts entities, facts, and relations automatically.
recallSemantic search through cloud memory. Use specific keywords: person names, project names, technologies.
searchAdvanced structured search — returns entities with relevance scores, facts, and knowledge snippets.
search_allUnified search across ALL memory types — semantic, episodic, and procedural.
timelineSearch memory by time. Use when user asks “what did I do last week”, “when did I…”, etc. Returns facts with timestamps.
list_memoriesList all stored memory entities with their types and fact counts.

Entity Management

ToolDescription
get_entityGet details of a specific entity — facts, relations, knowledge.
delete_entityDelete an entity and all its data (facts, relations, knowledge).
fix_entity_typeFix an entity’s type classification (e.g. a technology labeled as “person”). Valid types: person, project, technology, company, concept, unknown.
merge_entitiesMerge two entities into one — combines facts, relations, and knowledge.
archive_factArchive a specific fact on an entity — soft-delete without removing the entity.
dedupFind and automatically merge duplicate entities. Scans all entities and merges near-duplicates.

Episodic Memory

ToolDescription
list_episodesList or search episodic memories (events, interactions, experiences).

Procedural Memory

ToolDescription
list_proceduresList learned workflows/procedures from memory. Returns procedures with steps, success/fail counts, and version info.
procedure_feedbackRecord success or failure for a procedure. On failure with context, the system automatically evolves the procedure.
procedure_historyShow how a procedure evolved over time — all versions and what changed.

Insights & Reflection

ToolDescription
reflectTrigger AI reflection on memories — analyzes facts to find patterns, insights, and connections.
get_reflectionsGet AI-generated reflections (insights and patterns found across memories). Optional scope filter: “entity”, “cross”, “temporal”.
get_insightsAI-generated insights about the user — patterns, connections, reflections from memory analysis.

Agents

ToolDescription
run_agentsRun memory agents that analyze, clean, and find patterns. Use “curator”, “connector”, “digest”, or “all”.
vault_statsGet memory vault statistics — total entities, facts, relations, knowledge items, and storage usage.

Triggers & Graph

ToolDescription
get_triggersList smart triggers — reminders, contradictions detected, and patterns.
dismiss_triggerDismiss a smart trigger without firing its webhook.
get_graphGet the knowledge graph — all entities and their relationships.
get_feedActivity feed — recent memory changes and events.

Context & Rules

ToolDescription
checkpointSave a session checkpoint — summarize key decisions, learnings, and outcomes. Lighter than “remember”: takes a structured summary instead of raw messages.
context_forGet relevant memory context for a specific task. Returns a compact context pack: related entities, procedures, and past events.
generate_rules_fileGenerate a CLAUDE.md, .cursorrules, or .windsurfrules file from memory. Creates structured project rules, conventions, tech stack, workflows.

Multi-User / Multi-Tenant

Every MCP tool accepts an optional user_id parameter to scope memories per end-user. Use this when building multi-tenant apps — one API key, many isolated users. Example — calling remember for a specific end-user:
{
  "conversation": [
    {"role": "user", "content": "Alice prefers dark mode"}
  ],
  "user_id": "alice"
}
Calling search scoped to the same user:
{
  "query": "preferences",
  "user_id": "alice"
}
Without user_id, tools use the default scope tied to your API key. With user_id, memories are isolated per end-user — each gets their own facts, events, workflows, and cognitive profile under a single API key. Same semantics as the Python SDK, JS SDK, and REST API.

HTTP Transport

For remote/cloud MCP clients, Mengram exposes two transports: MCP 2025-03-26 spec — single endpoint for JSON-RPC requests and SSE streaming. Use this for modern MCP clients (Smithery, Claude Connectors, etc.):
Endpoint: https://mengram.io/mcp
Methods:  GET, POST, DELETE
Auth:     Bearer <MENGRAM_API_KEY>

SSE (legacy)

For clients that don’t yet support Streamable HTTP:
SSE endpoint: https://mengram.io/mcp/sse
Messages:     https://mengram.io/mcp/messages/

Discovery

Service manifest for auto-discovery:
https://mengram.io/.well-known/mcp
The MCP server uses cloud mode by default with MENGRAM_API_KEY. For local mode (your own LLM keys), run mengram server without the --cloud flag.