cf-memory
CF Memory Plugin
AIエージェント向けの永続メモリ。
Cloudflare Agent Memory をバックエンドとしています。
このプラグインはシンクライアントです。Cloudflare がメモリの保存、分類、呼び出しを行います。ベクター DB、埋め込みパイプライン、Worker を実行する必要はありません。
プライベートベータ。 有料 Workers が必要です。有料 Workers だけでは不十分です。Agent Memory の権限も必要です。
必要なもの | リンク |
ベータに参加 | |
製品ドキュメント | |
HTTP API | |
料金 | |
制限 | |
トークンを作成 | |
トークンを作成(ドキュメント) | |
Workers Paid | |
設計ノート |
60秒セットアップ
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 は必須です。デフォルトのアカウントはありません。 Cloudflare ダッシュボード のサイドバーで確認してください。
トークンは dash.cloudflare.com/profile/api-tokens で Agent Memory 権限のみで作成してください。Global API Key を再利用しないでください。
Related MCP server: agentram-mcp
これは何か
あなたが呼ぶもの | Cloudflare が行うこと |
| 1つの事実 / 指示 / イベントを保存 |
| 検索 + 回答を合成(約5秒) |
| 会話からメモリを抽出(書き込みは3〜8秒後に反映) |
| 保存内容の Markdown プロフィール |
| エントリの確認または削除 |
料金
項目 | 現在 | 出典 |
Agent Memory | プライベートベータ中は無料。 請求開始の30日前に通知。 | |
Workers Paid(申請に必要) | 月額5ドル 最低 | |
このプラグイン | 無料(MIT)。あなた自身の HTTP 呼び出しのみ。 | — |
推奨: メモリを保持するアカウントで Workers Paid を使用してください。本番メモリを無料アカウントに置かないでください。すべての有料 Workers アカウントが Agent Memory を持っているとは想定しないでください。有料 ≠ 権限があることを確認しました。
ベータ後は、Agent Memory を別の請求として扱ってください。Cloudflare はまだ GA 料金を公開していません。
依存関係
ランタイム:
オプション:
追加 | パッケージ | 用途 |
| starlette, uvicorn | A2A ピアサーバー |
| pytest, pytest-asyncio, respx | テスト |
このプラグインには Cloudflare Worker、Wrangler、D1、Vectorize、Workers AI バインディングは必要ありません。これらはこのクライアントが使用しない Cloudflare 製品です。
セキュリティ
Cloudflare のトークンルールに従ってください: API トークンのベストプラクティス。
MCP_CLOUDFLARE_API_KEYは環境変数またはシークレットストアに保存してください。コミットしないでください。トークンを1つのアカウントの Agent Memory に限定してください。
CF_ACCOUNT_IDは自分で設定してください。このプラグインは他のアカウントにフォールバックしません。cf-memory a2aはデフォルトで127.0.0.1にバインドします。認証なしで公開インターネットに公開しないでください。ingestとsync_turnは会話テキストを Cloudflare に送信します。保存が許可されていないシークレット、パスワード、顧客の個人情報をインジェストしないでください。アプリごとに1つの名前空間、ユーザー/テナントごとに1つのプロファイルを使用してください。
漏洩した場合は API トークン ページからトークンをローテーションしてください。
SECURITY.md を参照してください。
エージェントから使用する
どこでも同じ MCP ブロックを使用します。設定ファイルのパスだけが変わります。
{
"mcpServers": {
"cf-memory": {
"command": "cf-memory",
"args": ["serve"],
"env": {
"MCP_CLOUDFLARE_API_KEY": "your-token",
"CF_ACCOUNT_ID": "your-account-id"
}
}
}
}エージェント | 配置場所 | ドキュメント |
| ||
| OpenAI Codex | |
| Cursor MCP | |
| ||
ホスト MCP 設定 | OpenClaw | |
| TRAE | |
| OpenCode | |
ホスト MCP 設定 | pi | |
任意の MCP クライアント | stdio | |
Python | LangChain | |
A2A ピア |
| エージェントカードは |
Hermes は唯一のネイティブプロバイダーです。バックグラウンドでプリフェッチするため、リコールが毎ターン約5秒追加されることはありません。
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 namespacesランディングページのデプロイ(任意)
プラグイン自体は Worker ではありません。 cloudflare-memory.pages.dev の公開ページは静的 Cloudflare Pages サイトです。
# 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クレジット
メモリバックエンド: Cloudflare Agent Memory(ブログ、Discord、コミュニティ)
プロトコル: Model Context Protocol
Hermes プロバイダー契約: Nous Research Hermes Agent
HTTP クライアント: httpx
このリポジトリは Cloudflare や Nous Research とは提携していません。
ライセンス
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-