Integration

Long-term memory for NextChat

NextChat is the ~80k-star open-source chat client (Docker / Vercel / self-host), with MCP support that's off by default. Its `app/mcp/client.ts` only wires up `StdioClientTransport` — no SSE or Streamable HTTP — so Engram's hosted SSE endpoint needs the `mcp-remote` shim. Once `ENABLE_MCP=true` is set and the bridge is in `app/mcp/mcp_config.json`, NextChat gets six durable memory tools across every model it can drive.

Install

Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into NextChat.

Three steps to memory in your agent

  1. Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
  2. Add your LLM key. Engram is BYOK. Paste an OpenAI / Anthropic / Groq / Together / Fireworks key and we'll route every extraction and query call through your provider. You pay your provider directly. We never see your inference.
  3. Paste the snippet below into your agent and restart it. Use Authorization: Bearer <api-key>with the API key from your portal.

NextChat (~80k★ open-source chat client) via mcp-remote

MCP support is off by default and stdio-only — app/mcp/client.ts doesn't wire SSE, so Engram's hosted endpoint goes through the mcp-remote bridge once ENABLE_MCP=true is set.

  1. Enable MCP and run NextChat (Docker example; same env var works on Fly / Railway / VM — serverless / edge runtimes can't spawn the stdio bridge):
  2. Terminal
    docker run -d -p 3000:3000 -e ENABLE_MCP=true -v $(pwd)/mcp_config.json:/app/app/mcp/mcp_config.json yidadaa/chatgpt-next-web
  3. Mount this mcp_config.json:
  4. app/mcp/mcp_config.json
    {
      "mcpServers": {
        "engram": {
          "command": "npx",
          "args": [
            "-y",
            "mcp-remote@0.1.5",
            "https://mcp.lumetra.io/mcp/sse",
            "--transport",
            "sse-only",
            "--header",
            "Authorization:Bearer <api-key>"
          ]
        }
      }
    }
  5. Alternatively, add the same block interactively via NextChat's Settings → MCP Market.

Two caveats

(1) NextChat's official Docker image ships Node 18, so pin mcp-remote@0.1.5 — newer releases pull undici@7 and need Node 20+. (2) NextChat sends both temperature and top_p in every Anthropic request, which Claude 4.x rejects. Use Claude 3.5 or a non-Anthropic provider until NextChat patches it.

What you can do once memory's wired in

  • Self-host NextChat in Docker with `-e ENABLE_MCP=true` and a mounted `mcp_config.json`, then chat against any model with Engram memory wired in
  • Use NextChat's built-in MCP Market UI (Settings → MCP Market) to add the same `engram` server interactively on hosted deployments
  • Drive Engram from OpenAI, Gemini, or DeepSeek models in NextChat — non-Anthropic providers sidestep the Claude 4.x `temperature + top_p` rejection
  • Run NextChat on a Fly / Railway / VM host with `npx` available so the stdio bridge can spawn (serverless / edge runtimes won't work)

FAQ

Why does the README pin `mcp-remote@0.1.5`?

NextChat's official Docker image ships Node 18.20.8. `mcp-remote@0.1.6+` pulls `undici@7`, which requires Node 20+, and crashes the bridge at startup with `ReferenceError: File is not defined`. `0.1.5` is the last release that works on Node 18. On Node 20+ hosts, the latest `mcp-remote` is fine.

Can I use Claude 4.x with this?

Not cleanly — NextChat sends both `temperature` and `top_p` in every Anthropic request, which Claude 4.x rejects with `temperature and top_p cannot both be specified`. Workarounds in order of least invasive: use Claude 3.5 Sonnet / Haiku (accepts both), use a non-Anthropic provider, or patch NextChat to strip `top_p`. Tracked upstream.

Does this work on Vercel?

Mostly no. stdio MCP servers spawn child processes (`npx`) with outbound network. Vercel functions and edge runtimes can't spawn long-lived child processes, so the stdio bridge won't survive. Use Docker on a VM, Fly.io with a persistent machine, Railway, or self-host.

Ship durable memory in NextChat today

Free tier: 10K memories and 50K retrievals per month. No credit card. Same Engram backend powers all 41 integrations, so memories you write from one client are immediately queryable from the rest.