Skip to main content
Glama

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

Waitlist form

Product docs

developers.cloudflare.com/agent-memory

HTTP API

HTTP API

Pricing

Agent Memory pricing

Limits

Platform limits

Create a token

API Tokens

Create a token (docs)

Create API token

Workers Paid

Workers pricing

Design notes

Introducing Agent Memory

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 test

CF_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

remember

Store one fact / instruction / event

recall

Search + synthesize an answer (~5s)

ingest

Extract memories from a conversation (writes land 3–8s later)

summary

Markdown profile of what is stored

list / get / delete

Inspect or remove entries

Cost

Item

Today

Source

Agent Memory

$0 during private beta. 30-day notice before billing.

Pricing

Workers Paid (required to apply)

$5/month minimum

Workers pricing

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:

Package

Why

httpx

HTTPS client to api.cloudflare.com

mcp

MCP server (cf-memory serve)

Optional:

Extra

Packages

When

pip install 'cf-memory-plugin[a2a]'

starlette, uvicorn

A2A peer server

pip install 'cf-memory-plugin[dev]'

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_KEY in the environment or a secret store. Never commit it.

  • Scope the token to Agent Memory on one account.

  • Set CF_ACCOUNT_ID yourself. This plugin will not fall back to another account.

  • cf-memory a2a binds to 127.0.0.1 by default. Do not expose it to the public internet without auth.

  • ingest and sync_turn send 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

Claude Code

.claude/mcp.json or claude mcp add cf-memory -- cf-memory serve

MCP

Codex

~/.codex/config.toml[mcp_servers.cf-memory]

OpenAI Codex

Cursor

.cursor/mcp.json

Cursor MCP

Hermes

hermes config set memory.provider cloudflare-memory

Memory providers

OpenClaw

host MCP config

OpenClaw

TRAE

.trae/mcp.json

TRAE

OpenCode

~/.opencode/config.json

OpenCode

pi

host MCP config

pi

Any MCP client

stdio cf-memory serve

MCP spec

LangChain / LangGraph

Python CloudflareMemoryClient

LangChain

A2A peers

cf-memory a2a --port 9120

Agent card at /.well-known/agent.json

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 test

Python:

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 namespaces

Deploy 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-plugin

Pages docs · Wrangler

Credits

This repo is not affiliated with Cloudflare or Nous Research.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

No tool schema history has been recorded yet.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hansakoch/cf-memory-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server