cf-memory
CF Memory Plugin
Persistent memory for AI agents, backed by Cloudflare Agent Memory.
This plugin is a thin client. Cloudflare stores, classifies, and recalls memories. You do not run a vector DB, embeddings pipeline, or Worker.
Private beta. Paid Workers is required. Paid Workers alone is not enough — you still need Agent Memory entitlement.
Need | Link |
Join the beta | |
Product docs | |
HTTP API | |
Pricing | |
Limits | |
Create a token | |
Create a token (docs) | |
Workers Paid | |
Design notes |
60-second setup
pip install git+https://github.com/hansakoch/cf-memory-plugin.git
export MCP_CLOUDFLARE_API_KEY="cf-api-token-with-agent-memory"
export CF_ACCOUNT_ID="your-32-char-account-id"
cf-memory testCF_ACCOUNT_ID is required. There is no default account. Find it in the
Cloudflare dashboard sidebar.
Create the token at dash.cloudflare.com/profile/api-tokens with Agent Memory permission only. Do not reuse a Global API Key.
Related MCP server: agentram-mcp
What this is
You call | Cloudflare does |
| Store one fact / instruction / event |
| Search + synthesize an answer (~5s) |
| Extract memories from a conversation (writes land 3–8s later) |
| Markdown profile of what is stored |
| Inspect or remove entries |
Cost
Item | Today | Source |
Agent Memory | $0 during private beta. 30-day notice before billing. | |
Workers Paid (required to apply) | $5/month minimum | |
This plugin | Free (MIT). Your own HTTP calls only. | — |
Recommended: Workers Paid on the account that will hold memory. Do not put production memory on a free account. Do not assume every paid Workers account has Agent Memory — we verified paid ≠ entitlement.
After beta, treat Agent Memory as a separate bill. Cloudflare has not published GA rates yet.
Dependencies
Runtime:
Optional:
Extra | Packages | When |
| starlette, uvicorn | A2A peer server |
| pytest, pytest-asyncio, respx | Tests |
No Cloudflare Worker, Wrangler, D1, Vectorize, or Workers AI binding is required for this plugin. Those are Cloudflare products this client does not use.
Security
Follow Cloudflare's token rules: API token best practices.
Store
MCP_CLOUDFLARE_API_KEYin the environment or a secret store. Never commit it.Scope the token to Agent Memory on one account.
Set
CF_ACCOUNT_IDyourself. This plugin will not fall back to another account.cf-memory a2abinds to127.0.0.1by default. Do not expose it to the public internet without auth.ingestandsync_turnsend conversation text to Cloudflare. Do not ingest secrets, passwords, or customer PII you are not allowed to store.Use one namespace per app and one profile per user/tenant.
Rotate the token from the API Tokens page if it leaks.
See SECURITY.md.
Use it from an agent
Same MCP block everywhere. Only the config file path changes.
{
"mcpServers": {
"cf-memory": {
"command": "cf-memory",
"args": ["serve"],
"env": {
"MCP_CLOUDFLARE_API_KEY": "your-token",
"CF_ACCOUNT_ID": "your-account-id"
}
}
}
}Agent | Where to put it | Docs |
| ||
| OpenAI Codex | |
| Cursor MCP | |
| ||
host MCP config | OpenClaw | |
| TRAE | |
| OpenCode | |
host MCP config | pi | |
Any MCP client | stdio | |
Python | LangChain | |
A2A peers |
| Agent card at |
Hermes is the only native provider. It prefetches in the background so recall does not add ~5s to every turn.
hermes config set memory.provider cloudflare-memory
hermes cloudflare-memory testPython:
import asyncio
from cloudflare_memory import CloudflareMemoryClient
async def main():
async with CloudflareMemoryClient(
account_id="your-account-id",
api_token="your-token",
namespace="my-app",
profile="default",
) as client:
await client.remember("User prefers concise answers.")
result = await client.recall("How should I answer?")
print(result.answer)
asyncio.run(main())CLI
cf-memory test # connectivity
cf-memory serve # MCP (stdio)
cf-memory a2a --port 9120 # A2A on localhost
cf-memory card # print agent card
hermes cloudflare-memory status
hermes cloudflare-memory namespacesDeploy the landing page (optional)
The plugin itself is not a Worker. The public page at cloudflare-memory.pages.dev is a static Cloudflare Pages site.
# token needs Pages:Edit on the same account
export CLOUDFLARE_API_TOKEN=...
export CLOUDFLARE_ACCOUNT_ID=...
npx wrangler pages deploy ./public --project-name cf-memory-pluginCredits
Memory backend: Cloudflare Agent Memory (blog, Discord, Community)
Protocol: Model Context Protocol
Hermes provider contract: Nous Research Hermes Agent
HTTP client: httpx
This repo is not affiliated with Cloudflare or Nous Research.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Cross-tool persistent memory and context for AI assistants over MCP.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
1Persistent memory for AI agents across Claude, ChatGPT and any MCP client.
- KogniteOAuthdev.kognite
Hosted agent memory: store, search, and recall facts across sessions from any MCP client.
Related MCP Servers
- AlicenseAqualityDmaintenancePersistent memory for AI agents. Store, recall, and share knowledge across sessions with five MCP tools: remember, recall, context, forget, and share. Includes semantic search and agent/user/org scoping.53Apache 2.0
- AlicenseAqualityBmaintenanceProvides persistent memory for AI agents via 10 MCP tools that map to the AgentRAM REST API, enabling store, retrieve, search, and share memories across personal and shared namespaces.1033 npmMIT
- AlicenseNot gradedqualityBmaintenanceProvides long-term memory for AI agents via MCP tools to store, recall, and delete memories, with per-user scoping and usage limits.AGPL 3.0
- FlicenseAqualityCmaintenanceEnables LLM agents to persist, search, update, forget, summarize, and manage user cognitive memories through MCP tools.7-