Integration
Long-term memory for mcp-agent
`mcp-agent` is the MCP-first framework: agents consume MCP servers as their tool layer, period. Engram already speaks MCP, so the integration is one config entry. `engram_server_settings()` returns the right `MCPServerSettings` and you reference `engram` in `Agent.server_names`. No adapter code anywhere.
Install
Three steps: sign up for an Engram API key, paste a BYOK LLM-provider key on /models, then drop the snippet below into mcp-agent.
Three steps to memory in your agent
- Sign up. Free, no card. You'll land on a Getting Started page that walks the next two steps.
- 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.
- Paste the snippet below into your agent and restart it. Use
Authorization: Bearer <api-key>with the API key from your portal.
engram-mcp-agent: one-line MCP server wiring
mcp-agent's abstraction IS MCP, and Engram already speaks MCP, so the integration is one config entry. No adapter code, no tool wrappers, no schema mapping. The agent gets all six native Engram MCP tools through mcp-agent's standard tool-routing layer. Source: github.com/lumetra-io/engram-mcp-agent.
- Install:
- Vendor
engram_mcp_agent.py(~30 LOC) and export your API key: - Add Engram to your
MCPAppconfig and reference it viaserver_names:
pip install lumetra-engram mcp-agentcurl -fsSL https://raw.githubusercontent.com/lumetra-io/engram-mcp-agent/main/engram_mcp_agent.py -o engram_mcp_agent.py
export ENGRAM_API_KEY="<api-key>"from mcp_agent.app import MCPApp
from mcp_agent.config import Settings, MCPSettings
from mcp_agent.agents.agent import Agent
from engram_mcp_agent import engram_server_settings
app = MCPApp(
name="my-app",
settings=Settings(
mcp=MCPSettings(servers={"engram": engram_server_settings()}),
# ...your LLM provider config, other servers, etc.
),
)
async with app.run() as running:
agent = Agent(
name="researcher",
instruction="Use the engram server to remember and recall facts across sessions.",
server_names=["engram"],
)What you can do once memory's wired in
- Add Engram to any mcp-agent app with one config line: no tool wrappers, no schema mapping
- Compose with the other MCP servers mcp-agent manages, with Engram for memory and others for filesystem, web, and so on
- Use it across mcp-agent's standard workflow patterns (parallel, sequential, orchestrator). Memory is just another MCP server.
- Run mcp-agent fully on MCP. Engram is the cleanest fit because Engram is MCP.
FAQ
Why is this so much simpler than CrewAI, AutoGen, or LangChain integrations?
Those frameworks have their own tool abstraction (LangChain's `BaseChatMessageHistory`, CrewAI's `BaseTool`, and so on). mcp-agent's abstraction IS MCP, so no translation layer is needed.
Does the agent automatically discover Engram's tools?
Yes. When you reference `engram` in `agent.server_names`, mcp-agent fetches the tool listing over MCP and surfaces all six tools to the model.
Where does the API key go?
`ENGRAM_API_KEY` in the environment. `engram_server_settings()` reads it and embeds it as a Bearer header in the MCP server settings.
Related integrations
Ship durable memory in mcp-agent 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.