JSPM

  • Created
  • Published
  • Downloads 100
  • Score
    100M100P100Q66880F
  • License MIT

A portable MCP (Model Context Protocol) server for AI memory storage using Cloudflare infrastructure with semantic search, batch operations, and graph traversal

Package Exports

  • cf-memory-mcp
  • cf-memory-mcp/bin/cf-memory-mcp.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cf-memory-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

CF Memory MCP

npm version License: MIT

A portable MCP (Model Context Protocol) server for AI memory storage using Cloudflare infrastructure. This package allows AI coding agents to store, retrieve, and search memories using a production-ready, serverless backend with semantic search, batch operations, and graph traversal capabilities.

πŸš€ Quick Start

# Run directly with npx (no installation required)
npx cf-memory-mcp

# Or install globally
npm install -g cf-memory-mcp
cf-memory-mcp

✨ Features

Core Features

  • 🌐 Completely Portable - No local setup required, connects to deployed Cloudflare Worker
  • ⚑ Production Ready - Uses Cloudflare D1 database and KV storage for reliability
  • πŸ”§ Zero Configuration - Works out of the box with any MCP client
  • 🌍 Cross Platform - Supports Windows, macOS, and Linux
  • πŸ“¦ NPX Compatible - Run instantly without installation
  • πŸ”’ Secure - Built on Cloudflare's secure infrastructure
  • πŸš„ Fast - Global edge deployment with KV caching

Advanced Features

  • 🧠 Semantic Search - AI-powered vector search using Cloudflare AI Workers
  • πŸ•ΈοΈ Knowledge Graph - Store and traverse relationships between memories
  • πŸ“¦ Batch Operations - Efficiently process multiple memories at once
  • πŸ” Graph Traversal - Find paths and connections between related memories
  • 🎯 Smart Filtering - Advanced search with tags, importance, and similarity

πŸ› οΈ Usage

With MCP Clients

Add to your MCP client configuration:

{
  "mcpServers": {
    "cf-memory": {
      "command": "npx",
      "args": ["cf-memory-mcp"]
    }
  }
}

With Augment

Add to your augment-config.json:

{
  "mcpServers": {
    "cf-memory": {
      "command": "npx",
      "args": ["cf-memory-mcp"]
    }
  }
}

With Claude Desktop

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "cf-memory": {
      "command": "npx",
      "args": ["cf-memory-mcp"]
    }
  }
}

πŸ”§ Available Tools

The CF Memory MCP server provides comprehensive memory management tools:

Core Memory Operations

store_memory

Store a new memory with optional metadata and tags.

Parameters:

  • content (string, required) - The memory content
  • tags (array, optional) - Tags for categorization
  • importance_score (number, optional) - Importance score 0-10
  • metadata (object, optional) - Additional metadata

search_memories

Search memories by content and tags with optional semantic search.

Parameters:

  • query (string, optional) - Full-text or semantic search query
  • tags (array, optional) - Filter by specific tags
  • limit (number, optional) - Maximum results (default: 10)
  • offset (number, optional) - Results offset (default: 0)
  • min_importance (number, optional) - Minimum importance score
  • semantic (boolean, optional) - Use AI-powered semantic search
  • similarity_threshold (number, optional) - Minimum similarity for semantic search

retrieve_memory

Retrieve a specific memory by ID.

Parameters:

  • id (string, required) - The unique memory ID

Batch Operations

store_multiple_memories

Store multiple memories in a single batch operation.

Parameters:

  • memories (array, required) - Array of memory objects to store

update_multiple_memories

Update multiple memories in a single batch operation.

Parameters:

  • updates (array, required) - Array of memory updates with ID and data

search_and_update

Search for memories and update them in one operation.

Parameters:

  • search (object, required) - Search criteria
  • update (object, required) - Update data to apply

Graph & Relationship Operations

traverse_memory_graph

Traverse the memory graph from a starting point to find connected memories.

Parameters:

  • start_memory_id (string, required) - Starting memory ID
  • relationship_types (array, optional) - Filter by relationship types
  • max_depth (number, optional) - Maximum traversal depth (default: 3)
  • direction (string, optional) - Direction: 'outgoing', 'incoming', or 'both'
  • min_strength (number, optional) - Minimum relationship strength

find_memory_path

Find a path between two memories through relationships.

Parameters:

  • start_memory_id (string, required) - Starting memory ID
  • end_memory_id (string, required) - Target memory ID
  • relationship_types (array, optional) - Filter by relationship types
  • max_depth (number, optional) - Maximum path length (default: 5)
  • min_strength (number, optional) - Minimum relationship strength

Get memories related to a specific memory with various options.

Parameters:

  • memory_id (string, required) - Memory ID to find related memories for
  • relationship_types (array, optional) - Filter by relationship types
  • min_strength (number, optional) - Minimum relationship strength
  • limit (number, optional) - Maximum results (default: 10)
  • include_indirect (boolean, optional) - Include indirectly related memories
  • max_hops (number, optional) - Maximum hops for indirect relationships

🌐 Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Client    β”‚    β”‚  cf-memory-mcp   β”‚    β”‚  Cloudflare Worker  β”‚
β”‚   (Augment,     │◄──►│   (npm package)  │◄──►│   (Production API)  β”‚
β”‚   Claude, etc.) β”‚    β”‚                  β”‚    β”‚                     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                                          β”‚
                                                          β–Ό
                                               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                               β”‚  Cloudflare D1 DB   β”‚
                                               β”‚  + KV Storage       β”‚
                                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Command Line Options

# Start the MCP server
npx cf-memory-mcp

# Show version
npx cf-memory-mcp --version

# Show help
npx cf-memory-mcp --help

# Enable debug logging
DEBUG=1 npx cf-memory-mcp

🌍 Environment Variables

  • DEBUG=1 - Enable debug logging
  • MCP_DEBUG=1 - Enable MCP-specific debug logging

πŸ“‹ Requirements

  • Node.js 16.0.0 or higher
  • Internet connection (connects to Cloudflare Worker)
  • MCP client (Augment, Claude Desktop, etc.)

πŸš€ Why CF Memory MCP?

Traditional Approach ❌

  • Clone repository
  • Set up local database
  • Configure environment variables
  • Manage local server process
  • Handle updates manually

CF Memory MCP βœ…

  • Run npx cf-memory-mcp
  • That's it! πŸŽ‰

πŸ”’ Privacy & Security

  • No local data storage - All data stored securely in Cloudflare D1
  • HTTPS encryption - All communication encrypted in transit
  • Edge deployment - Data replicated globally for reliability
  • No API keys required - Public read/write access for simplicity

🀝 Contributing

Contributions are welcome! Please see the GitHub repository for more information.

πŸ“„ License

MIT License - see LICENSE file for details.


Made with ❀️ by John Lam