trackmcp
Back to directory
hifriendbot

cogmemai-mcp

View on GitHub

CogmemAi โ€” Cognitive Memory for Any Ai System. Autonomous robots, self-driving vehicles, defense systems, coding assistants, and more. 91% LoCoMo benchmark โ€” above human performance.

7 stars TypeScriptOthers Updated Aug 31, 2026
ai-agentclaude-codecognitive-memorydeveloper-toolsmcpmemorymodel-context-protocolpersistent-memorycursorencryptionmcp-serversemantic-searchwindsurfai-memorychatgptclineknowledge-graphopenai

Documentation

npm version
License: MIT
Quantum Safe

CogmemAi โ€” Cognitive Memory for Any Ai System

Autonomous robots. Self-driving vehicles. Defense systems. Coding assistants. Any Ai system that needs to remember.

CogmemAi is a portable memory layer that gives any Ai system persistent recall across sessions, devices, users, and teams โ€” and captures knowledge autonomously, even when your Ai forgets to save. 95.10% accuracy on LongMemEval โ€” top published score on the field's hardest long-term memory benchmark. 91% on LoCoMo, above human performance (87.9%). Quantum-safe encryption. Works with Claude Code, Cursor, Windsurf, Cline, Continue, and any MCP-compatible tool. Switch editors, switch models, switch machines โ€” your knowledge stays. Not just one score on a test โ€” the most complete Ai memory system available.

What's New in v3

Loud Failures on Firewall Blocks (v3.20.0)

When a request to the CogmemAi backend is intercepted by an upstream firewall, CDN, or proxy, the response is HTML, not JSON. Earlier versions tried to JSON-parse it and threw a confusing `Unexpected token ' Skills.

CLI Commands

bash
npx cogmemai-mcp setup          # Interactive setup wizard
npx cogmemai-mcp setup     # Setup with API key
npx cogmemai-mcp verify         # Test connection and show usage
npx cogmemai-mcp --version      # Show installed version
npx cogmemai-mcp help           # Show all commands

Manual Setup

If you prefer to configure manually instead of using `npx cogmemai-mcp setup`:

Option A โ€” Per project (add `.mcp.json` to your project root):

json
{
  "mcpServers": {
    "cogmemai": {
      "command": "cogmemai-mcp",
      "env": {
        "COGMEMAI_API_KEY": "cm_your_api_key_here"
      }
    }
  }
}

For local mode (free API key required for registration, data stays local):

json
{
  "mcpServers": {
    "cogmemai": {
      "command": "cogmemai-mcp",
      "env": {
        "COGMEMAI_MODE": "local",
        "COGMEMAI_API_KEY": "cm_your_api_key_here"
      }
    }
  }
}

Option B โ€” Global (available in every project):

bash
# Cloud (default)
claude mcp add cogmemai cogmemai-mcp -e COGMEMAI_API_KEY=cm_your_api_key_here --scope user

# Local (free API key required, data stays local)
claude mcp add cogmemai cogmemai-mcp -e COGMEMAI_API_KEY=cm_your_api_key_here -e COGMEMAI_MODE=local --scope user

# Hybrid (both)
claude mcp add cogmemai cogmemai-mcp -e COGMEMAI_API_KEY=cm_your_api_key_here -e COGMEMAI_MODE=hybrid --scope user

Works With

Automatic setup:

bash
npx cogmemai-mcp setup

Cursor

Add to `~/.cursor/mcp.json`:

json
{
  "mcpServers": {
    "cogmemai": {
      "command": "npx",
      "args": ["-y", "cogmemai-mcp"],
      "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
    }
  }
}

Windsurf

Add to `~/.codeium/windsurf/mcp_config.json`:

json
{
  "mcpServers": {
    "cogmemai": {
      "command": "npx",
      "args": ["-y", "cogmemai-mcp"],
      "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
    }
  }
}

Cline (VS Code)

Open VS Code Settings > Cline > MCP Servers, add:

json
{
  "cogmemai": {
    "command": "npx",
    "args": ["-y", "cogmemai-mcp"],
    "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
  }
}

Continue

Add to `~/.continue/config.yaml`:

yaml
mcpServers:
  - name: cogmemai
    command: npx
    args: ["-y", "cogmemai-mcp"]
    env:
      COGMEMAI_API_KEY: cm_your_api_key_here

CogmemUI

CogmemUI is a free multi-model Ai workspace with built-in CogmemAi memory. Add your CogmemAi API key in Settings > API Keys and your memory is instantly available. CogmemUI also supports connecting any MCP-compatible tool server via Settings > MCP Servers โ€” add endpoints, auto-discover tools, and use them in chat.

Get your free API key at hifriendbot.com/developer.

Tools

CogmemAi provides 35 tools that your Ai assistant uses automatically:

ToolDescription
`preflight`Proactive recall. Fast recall to check prior context before making any suggestion
`save_memory`Store a fact explicitly (architecture decision, preference, etc.)
`recall_memories`Search memories using natural language (semantic search)
`extract_memories`Ai extracts facts from a conversation exchange automatically
`get_project_context`Load top memories at session start (with smart ranking, health score, and session replay)
`list_memories`Browse memories with filters (paginated, with untyped filter)
`update_memory`Update content, importance, scope, type, category, subject, and tags
`delete_memory`Permanently delete a memory
`bulk_delete`Delete up to 100 memories at once
`bulk_update`Update up to 50 memories at once (content, type, category, tags, etc.)
`get_usage`Check your usage stats and tier info
`export_memories`Export all memories as JSON for backup or transfer
`import_memories`Bulk import memories from a JSON array
`ingest_document`Feed in a document (README, API docs) to auto-extract memories
`save_session_summary`Save a summary of what was accomplished in this session
`list_tags`View all tags in use across your memories
`link_memories`Connect related memories with named relationships
`get_memory_links`Explore the knowledge graph around a memory
`get_memory_versions`View edit history of a memory
`get_analytics`Memory health dashboard with self-tuning insights (filterable by project)
`promote_memory`Promote a project memory to global scope
`consolidate_memories`Merge related memories into comprehensive summaries using Ai
`save_task`Create a persistent task with status and priority tracking
`get_tasks`Retrieve tasks for the current project โ€” pick up where you left off
`update_task`Change task status, priority, or description as you work
`save_correction`Store a "wrong approach โ†’ right approach" pattern to avoid repeated mistakes
`set_reminder`Set a reminder that surfaces at the start of your next session
`get_stale_memories`Find memories that may be outdated for review or cleanup
`get_file_changes`See what files changed since your last session
`feedback_memory`Signal whether a recalled memory was useful or irrelevant to improve future recall
`generate_skills`Trigger skill generation from your corrections and preferences โ€” or preview candidates with dry run
`save_rule`Save a mandatory rule that surfaces in every session โ€” bypasses all scoring and decay
`list_rules`List all mandatory rules for the current project and/or globally
`delete_rule`Delete a mandatory rule by ID
`extract_principles`Trigger Wisdom Engine to detect factual patterns across memory clusters

SDKs

Build your own integrations with the CogmemAi API:

  • JavaScript/TypeScript: `npm install cogmemai-sdk` โ€” npm ยท GitHub
  • Python: `pip install cogmemai` โ€” PyPI ยท GitHub

Memory Types

Memories are categorized for better organization and retrieval:

  • identity โ€” Who you are, your role, team
  • preference โ€” Coding style, tool choices, conventions
  • architecture โ€” System design, tech stack, file structure
  • decision โ€” Why you chose X over Y
  • bug โ€” Known issues, fixes, workarounds
  • dependency โ€” Version constraints, package notes
  • pattern โ€” Reusable patterns, conventions
  • context โ€” General project context
  • task โ€” Persistent tasks with status and priority tracking
  • correction โ€” Wrong approach โ†’ right approach patterns
  • reminder โ€” Next-session nudges that auto-expire
  • rule โ€” Mandatory directives that surface in every session, bypassing all scoring and decay

Scoping

  • Project memories โ€” Architecture, decisions, bugs specific to one repo. Auto-detected from your repository.
  • Global memories โ€” Your coding preferences, identity, tool choices. Available in every project.

Pricing

FreeProTeamEnterprise
Price$0$14.99/mo$39.99/mo$99.99/mo
Memories5002,00010,00050,000
Extractions/mo5002,0005,00020,000
Projects52050200

Start free. Upgrade when you need more. Or pay per operation with USDC on-chain โ€” no credit card required.

Privacy & Security

  • ๐Ÿ›ก๏ธ Quantum-safe encryption at rest. All memories are encrypted with quantum-resistant cryptography โ€” in cloud mode and local mode. Protected against both current threats and future quantum computers.
  • No source code leaves your machine. We store extracted facts (short sentences), never raw code.
  • API keys cryptographically hashed (irreversible) server-side.
  • All traffic over HTTPS.
  • No model training on your data. Ever.
  • Delete everything instantly via dashboard or MCP tool.
  • No cross-user data sharing.

Read our full privacy policy.

Environment Variables

VariableRequiredDescription
`COGMEMAI_API_KEY`Cloud/HybridYour API key (starts with `cm_`). Not needed for local mode.
`COGMEMAI_MODE`NoStorage mode: `cloud` (default), `local` (data stays on your machine), or `hybrid`
`COGMEMAI_LOCAL_DB`NoPath to local database (default: `~/.cogmemai/local.db`). Used in local and hybrid modes.
`COGMEMAI_API_URL`NoCustom API URL (default: hifriendbot.com)
`COGMEMAI_ENCRYPTION_KEY`NoCustom encryption passphrase for local mode. If not set, a key is auto-generated.
`COGMEMAI_LOCAL_ENCRYPTION`NoSet to `off` to disable local encryption (not recommended).

Support

License

MIT โ€” see LICENSE


Built by HiFriendbot โ€” Better Friends, Better Memories, Better Ai. ๐Ÿ›ก๏ธ Quantum Safe.

Frequently asked questions

What is cogmemai-mcp?

cogmemai-mcp is CogmemAi โ€” Cognitive Memory for Any Ai System. Autonomous robots, self-driving vehicles, defense systems, coding assistants, and more. 91% LoCoMo benchmark โ€” above human performance.

How do I install cogmemai-mcp?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is cogmemai-mcp open source?

Yes โ€” it is hosted on GitHub at https://github.com/hifriendbot/cogmemai-mcp and has 7 stars.

Related MCP tools

jgravellejcodemunch-mcp

Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.

2,651 Python
claudeclaude-codeai-coding+17
riponcmprojectmem

Open-source coding agent memory. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.

796 Python
ai-agentsai-memoryai-tools+17
agentic-boxmemora

Give your AI agents persistent, collective memory โ€” with deduplicating absorb, supersession lineage, semantic search, and a graph UI. Speaks MCP.

715 Python
ai-agentclaudeknowledge-graph+13
AVIDS2memorix

Open-source cross-agent memory layer for coding agents via MCP. Compatible with Claude Code, Codex, Cursor, Windsurf, Gemini CLI, Antigravity, OpenClaw, Hermes Agent, Oh-my-Pi, Pi, Copilot, Kiro, OpenCode, and Trae.

721 TypeScript
ai-codingclaude-codecopilot+17
IvanMurzakUnity-MCP

AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.

4,137 C#
aiai-integrationgame-development+16
KnockOutEZwigolo

The go-to web for your AI coding agent โ€” local-first search, fetch, crawl & research over MCP. No API keys, no cloud, $0/query. Public beta.

4,906 TypeScript
mcpagentai+17

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP