Skip to main content

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.

Fastest setup — paste one prompt into your agent

If you have a coding agent (Claude Desktop, Cursor, Codex, Claude Code, Windsurf), skip the manual steps below. Paste this prompt:
The agent reads our install guide, installs the package, configures the MCP server in its host, and runs mengram doctor to verify the round-trip. See Agent-Native Install for the full breakdown. The rest of this page is the manual setup if you’d rather wire it up yourself.

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

2

Find the mengram path

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:
Restart Claude Desktop after saving.

Setup with Cursor

Add to Cursor’s MCP settings (~/.cursor/mcp.json), or open Settings → Cursor Settings → MCP:
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:
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):
Restart Windsurf.

Available Tools

The cloud MCP server exposes 29 tools:

Memory Operations

Entity Management

Episodic Memory

Procedural Memory

Insights & Reflection

Agents

Triggers & Graph

Context & Rules

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:
Calling search scoped to the same user:
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.):

SSE (legacy)

For clients that don’t yet support Streamable HTTP:

Discovery

Service manifest for auto-discovery:
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.Since 2.27.1: when MENGRAM_API_KEY is not set in the environment, mengram server --cloud falls back to ~/.mengram/config.json (written by mengram setup). The explicit env blocks in the configs above still work and take precedence — but if you’ve run setup once, they’re optional. This matters for MCP hosts that spawn servers without your shell profile (Claude Desktop on macOS, most Windows setups).