Plug memory into any agent: MCP and an OpenAI-compatible API
Engineering6 min

Plug memory into any agent: MCP and an OpenAI-compatible API

A memory layer is only useful if your tools can read it. That's why MemoryFirst speaks two protocols you already use: MCP and the OpenAI-compatible chat API. No proprietary SDK.

The worst way to adopt a memory layer is through a proprietary SDK that locks you to a vendor. The best is through protocols your tools already speak. MemoryFirst exposes two.

1. Model Context Protocol (MCP)

MCP has become the standard way to give an assistant access to external tools and data. MemoryFirst ships an MCP server with stdio, HTTP and SSE transports, so clients like Claude, Cursor or your own agent can query and write memory like any other tool.

In practice, your assistant gains two capabilities:

  • Remember: record decisions, facts and events as they happen.
  • Retrieve: query memory in natural language and get the answer with citations.

This is what stops an assistant from starting from zero every session.

2. OpenAI-compatible API

If you already talk to a /chat/completions-style endpoint, you already know how to integrate MemoryFirst. Compatibility with the OpenAI format means swapping the base URL is usually most of the work: your libraries, your types and your streaming handling stay the same.

The ingestion loop

Memory is useless if feeding it is a project. The flow is deliberately boring:

  1. Upload a source — file, text, or an operational event — via the API or a connector.
  2. MemoryFirst chunks, embeds and indexes it in the background, on a bounded-concurrency queue so it never saturates the embedder.
  3. Query and get retrieved passages + a cited synthesis.
Upload a source, it's structured into the graph, you ask and get the answer with its citation.
Upload a source, it's structured into the graph, you ask and get the answer with its citation.

Connectors (email, documents, calendar, etc.) automate step 1 so memory builds itself.

Graceful degradation by design

A detail that matters in production: if the synthesis LLM is unavailable or the daily budget is exceeded, a query degrades to the raw retrieved passages instead of failing. Your agent still gets useful context even when the generative layer has a bad day. Reliability is a feature.

A memory layer is only as good as its worst day. That's why we degrade to cited passages instead of going down.

Get going with the docs and connect your first agent today.

Give your agents a memory.

The memory layer for AI: OpenAI-compatible API + MCP, with citations and EU data.

Start free