Cogmemai Mcp

by hifriendbot

268 downloads
Not rated
GitHub

About

Persistent cognitive memory for Claude Code. Cloud-based semantic search, Ai-powered extraction, project scoping, and compaction recovery.

Details

Author
hifriendbot
Downloads
268
Categories
Cloud Service, AI, Knowledge Base, Other, Developer Tools

- Semantic search by meaning, not keywords
- AI-powered automatic extraction of important facts
- Smart deduplication of conflicting memories
- Privacy controls that detect secrets before storage
- Document ingestion from READMEs and docs
- Project scoping with global and per-repo memories
- Automatic compaction recovery for Claude Code
- Token-efficient compact context loading
- Zero local databases or vector stores

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Cogmemai Mcp
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Run npx cogmemai-mcp setup for an automatic configuration wizard that verifies your API key, configures the MCP server, and installs automatic context recovery. Alternatively, manually add it to .mcp.json or use claude mcp add with your COGMEMAI_API_KEY. It works with Claude Code, Cursor, Windsurf, Cline, and Continue. The server exposes 18 tools that the AI assistant uses automatically, including save_memory, recall_memories, and extract_memories.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

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

McpServers

{
    "cogmemai": {
        "command": "cogmemai-mcp",
        "env": {
            "COGMEMAI_API_KEY": "your_key_here"
        }
    }
}

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.

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 confusingUnexpected token '<'error, then silently retried the same blocked payload. v3.20.0 detects HTML responses, names the blocking layer when it can (NinjaFirewall, Cloudflare, ModSecurity), and surfaces a clear actionable error. Retryable 4xx responses with HTML bodies no longer trigger retry loops. The class of incident that can silently drop memory writes is now loud.

Autonomous Memory — Your Ai Doesn't Decide Whether to Save Anymore (v3.15)

Every memory system has the same hidden failure mode:the Ai has to choose to save, and under pressure it doesn't.You can bake instructions into system prompts. You can nudge. But when your Ai is head-down on a coding task, it forgets to save — and the decisions you made two hours ago vanish when the context compacts.

CogmemAi v3.15 moves the decision out of the Ai's hands entirely. Your coding sessions are captured at the infrastructure level — decisions, file changes, bug fixes, and deployments land in memory without a single prompt. At session end, an intelligence pass distills them into structured memories: the right types, the right importance scores, the right scopes. Your Ai never sees this happen.

The result: a day of heavy coding produces 15–20 quality memories instead of 3. Future sessions pick up seamlessly. Your Ai stops re-litigating architectural choices you already made.Stop reminding your Ai to remember. It just does.

CogmemAi nowthinks before it speaks. Before your Ai assistant suggests any action, approach, or recommendation, CogmemAi checks its memory first — automatically, on every topic.

- preflighttool— A fast, lightweight recall designed to be called before every suggestion. Your assistant checks what it already knows about a topic before opening its mouth. "Let's try approach X" → first checks if X was already tried, rejected, or completed. Sub-200ms, near-zero cost.
- Prior context surfacing— Every time a memory is saved, CogmemAi automatically searches for related prior memories across all topics — people, companies, technical approaches, features, everything — and surfaces them in the response. Your assistant never suggests something redundant.
- Smart recall hooks— In Claude Code, CogmemAi reads every user message and automatically injects relevant memories before the assistant responds. No manual recall needed — context arrives before the assistant starts thinking.
- Upgraded recall engine— Higher-dimensional semantic understanding, balanced reranking, keyword-expanded search, dual-path memory storage for more reliable retrieval, and adaptive search that expands automatically when initial results are low confidence.

The result: your Ai assistant stops suggesting things you've already tried, people you've already contacted, and approaches you've already rejected. Your brain is no longer the safety net for what your tools should already know.

Wisdom Engine — Auto-Extracted Principles (v3.10)

CogmemAi now automatically detects patterns across your memories and extractsfactual principles. While skills tell your Ai HOW to behave ("always use Zustand"), principles tell it what's TRUE about your project ("this codebase never validates inputs at service boundaries"). Principles are extracted from clusters of 5+ related memories, scored by confidence, and injected into every session. Useextract_principlesto trigger manually or let it happen automatically.

CogmemAi now supportsStreamable HTTP transport— connect from any MCP client without installing anything. No npm, no config files, no Node.js required. Just point your client tohttps://hifriendbot.com/mcp/with your API key and start using persistent memory immediately. Same 35 tools, same Intelligence Engine, same benchmark-topping accuracy — zero setup friction.

CogmemAi is thefirst quantum-safe Ai memory system.All memories are encrypted at rest with quantum-resistant encryption — both in cloud mode and local mode. Your data is protected against today's threats and tomorrow's quantum computers. Encryption is automatic, zero-config, and enabled by default. No setup required.

CogmemAi now runs three ways — pick the one that fits your workflow:

Cloud mode is the recommended experience.It gives you the full Intelligence Engine — semantic search that finds memories by meaning, auto-linking knowledge graph, contradiction detection, self-improving recall, auto-skills, query synthesis, and team collaboration. Everything that makes CogmemAi more than just a database.

Local mode keeps your data on your machine.A free API key is required for registration (like a software license key), but all your data stays local. Full-text search (FTS5) provides quality recall. Works offline after initial setup. When you're ready for semantic search and the full Intelligence Engine, upgrading to cloud takes one command.

Hybrid mode is for developers who travel or work on unreliable networks.Saves to both local and cloud simultaneously. Reads from cloud when available, falls back to local when offline. Unsynced memories automatically push to cloud when connectivity returns.

Intelligence Engine + Auto-Skills (v3.5)

CogmemAi now gets smarter every time you use it. The Intelligence Engine is a self-improving memory system that learns what matters, connects related knowledge automatically, and synthesizes answers from your entire memory. Auto-Skills takes it further — CogmemAi doesn't just remember, itlearns how to behave.

- Behavioral skills— CogmemAi automatically synthesizes your corrections, preferences, and patterns into behavioral directives that tell your Ai assistant HOW to work, not just what to know
- Closed learning loop— correct your assistant once, and CogmemAi detects the pattern. After enough evidence accumulates, it generates a skill that prevents the mistake from ever happening again
- Confidence tracking— each skill has a confidence score that rises when it works and drops when it doesn't. Low-confidence skills are automatically retired
- Self-evaluation— skills periodically review themselves against new evidence and adapt, strengthen, or retire as your practices evolve

Intelligence Engine — 95.10% on LongMemEval, 91% on LoCoMo

CogmemAi scores95.10% accuracy onLongMemEval— the top published score on the field's hardest long-term memory benchmark — and91% accuracy onLoCoMowith a 100% retrieval hit rate, above human performance (87.9%). Two benchmarks, two #1-tier scores. CogmemAi finds the right memories when you need them.

- Precision reranking— every recall runs a second-pass reranker that re-scores candidates for precision, balanced with the initial ranking signal to surface the most relevant memory first
- Self-improving recall— memories that consistently help you rank higher over time; memories you never use fade naturally. Your recall quality improves automatically with every session
- Auto-linking knowledge graph— related memories are automatically connected when you save them. Your knowledge builds into a web of relationships, not a flat list
- Contradiction detection— when recalled memories conflict with each other, CogmemAi flags the contradiction so you catch stale or outdated information before it causes problems
- Context-aware ranking— tell CogmemAi what you're doing (debugging, planning, reviewing) and it boosts the right types of memories. Debugging? Bug reports and patterns surface first. Planning? Architecture decisions lead
- Query synthesis— ask a question and get one coherent answer synthesized from all your relevant memories, not just a list of matches. Like asking a teammate who's read everything
- Cross-project intelligence— patterns that appear across 3+ projects are automatically promoted to global scope. Your best practices follow you everywhere without manual effort
- Proactive insights— at session start, CogmemAi tells you what you should know before you ask. Stale critical memories, duplicate subjects that need merging, patterns ready for promotion

- Memory health score— 0-100 score with actionable factors
- Session replay— pick up exactly where you left off with automatic session summaries
- Self-tuning memory— importance adjusts based on real usage; stale memories auto-archive
- Auto-ingest README— learn from your README on new projects instantly
- Smart recall— relevant memories surface automatically as you switch topics
- Auto-learning— CogmemAi learns from your sessions automatically
- Task tracking— persistent tasks with status and priority
- Correction learning— teach your assistant to avoid repeated mistakes
- Session reminders— nudges that surface at the start of your next session
- Mandatory rules— define absolute requirements ("NEVER do X", "ALWAYS do Y") that surface in every session, bypassing all scoring and decay
- Autonomous memory— captures work even when your Ai skips saves
- 35+ tools— the most complete memory toolkit for any Ai system

Connect directly — no npm, no setup, no config files. Just add the remote endpoint to your MCP client with your API key:

Endpoint:https://hifriendbot.com/mcp/Auth:Bearer token (yourcm_API key)

Get your free API key athifriendbot.com/developer.

Works with any MCP client that supports Streamable HTTP transport (Claude Desktop, Cursor, and more).

The setup wizard walks you through three choices:Cloud(recommended — full Ai intelligence),Local(data stays on your machine), orHybrid(both). Pick your mode, enter your API key if needed, and you're ready in under 60 seconds.

Don't have an API key yet? Get one free athifriendbot.com/developer. Or choose Local mode to start immediately with no account.

Every time you start a new session, you lose context. You re-explain your tech stack, your architecture decisions, your coding preferences. Built-in memory in tools like Claude Code is a flat file with no search, no structure, and no intelligence.

CogmemAi gives your Ai assistant a real memory system:

- Semantic search— finds relevant memories by meaning, not keywords
- Ai-powered extraction— automatically identifies facts worth remembering from your conversations
- Smart deduplication— detects duplicate and conflicting memories automatically
- Privacy controls— auto-detects API keys, tokens, and secrets before storing
- Document ingestion— feed in READMEs and docs to instantly build project context
- Project scoping— memories tied to specific repos, plus global preferences that follow you everywhere
- Smart context— intelligently ranked for maximum relevance to your current work
- Autonomous memory capture— saves knowledge even when your Ai forgets to call save. Decisions, file changes, and fixes land in memory without prompting
- Compaction recovery— survives Claude Code context compaction automatically
- Token-efficient— compact context loading that won't bloat your conversation
- Zero setup— no databases, no Docker, no Python, no vector stores

CogmemAi offers three storage modes, but cloud is where the magic happens. The Intelligence Engine — semantic search, auto-linking knowledge graph, contradiction detection, self-improving recall, auto-skills, and query synthesis — runs server-side. In cloud mode, your MCP server is a thin HTTP client withzero local databases, zero RAM issues, zero maintenance.All memories are encrypted at rest, so your data is just as secure as local storage — with cross-device portability and team features on top.

Your memory follows you everywhere.Memories created in Claude Code are instantly available in Cursor, Windsurf, Cline, and any MCP-compatible tool. Switch between Opus, Sonnet, Haiku, or any model your editor supports — your memories persist regardless. New laptop? New OS? Log in and your full project knowledge is waiting. A local SQLite file dies with your machine. Cloud memory is permanent.

The privacy argument is a myth.Some memory tools market "local-first" as a privacy advantage. But think about what happens next: every memory your Ai reads gets sent to the model provider (Anthropic, OpenAI, Google) as part of the prompt. Your data leaves your machine at inference time no matter where it's stored. A local SQLite file doesn't protect your memories — it just makes them harder to search, slower to access, and impossible to share. CogmemAi encrypts at rest, transmits over HTTPS, and adds intelligence that local storage simply can't match.

Teams and collaboration.Cloud memory is the only way to share project knowledge across teammates. When one developer saves an architecture decision or documents a bug fix, every team member's Ai assistant knows about it instantly. No syncing, no merge conflicts, no stale local databases. Whether it's two developers or twenty, everyone's assistant has the same up-to-date context. This is impossible with local-only memory solutions.

When your Ai assistant compacts your context, conversation history gets compressed and context is lost. CogmemAi handles this automatically — your context is preserved before compaction and seamlessly restored afterward. No re-explaining, no manual prompting.

Thenpx cogmemai-mcp setupcommand configures everything automatically.

CogmemAi includes aClaude Skillthat teaches Claude best practices for memory management — when to save, importance scoring, memory types, and session workflows.

/skill install https://github.com/hifriendbot/cogmemai-mcp/tree/main/skill/cogmemai-memory

Claude.ai:Upload theskill/cogmemai-memoryfolder in Settings > Skills.

npx cogmemai-mcp setup # Interactive setup wizard npx cogmemai-mcp setup <key> # 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

If you prefer to configure manually instead of usingnpx cogmemai-mcp setup:

Option A — Per project(add.mcp.jsonto your project root):

{ "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):

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

Option B — Global(available in every project):

# 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
{ "mcpServers": { "cogmemai": { "command": "npx", "args": ["-y", "cogmemai-mcp"], "env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" } } } }

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

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

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

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

CogmemUIis a free multi-model Ai workspace with built-in CogmemAi memory. Add your CogmemAi API key inSettings > API Keysand your memory is instantly available. CogmemUI also supports connecting any MCP-compatible tool server viaSettings > MCP Servers— add endpoints, auto-discover tools, and use them in chat.

Get your free API key athifriendbot.com/developer.

CogmemAi provides 35 tools that your Ai assistant uses automatically:

Build your own integrations with the CogmemAi API:

- JavaScript/TypeScript:npm install cogmemai-sdknpm·GitHub
- Python:pip install cogmemai
PyPI·GitHub

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

- 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.

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

- 🛡️ 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 trainingon your data. Ever.
- Delete everythinginstantly via dashboard or MCP tool.
- No cross-user data sharing.

- Issues:GitHub Issues
- Docs:
hifriendbot.com/developer

Built byHiFriendbot— Better Friends, Better Memories, Better Ai. 🛡️ Quantum Safe.

Persistent memory layer for AI agents with semantic search, consolidation, and cross-session intelligence via MCP.

Self-hosted MCP server giving AI agents persistent memory — Markdown source of truth, hybrid BM25+embedding search, typed graph relations.

mem0-mcp-server — exposes Mem0 persistent semantic memory as an MCP HTTP server; supports add/search/read/update/delete operations and semantic search for agent memory.

Long-term memory system for AI agents with semantic search, context management, and multi-format storage.

A self-hosted, secure, feature-rich memory system for AI agents and assistants. Provides intelligent fact extraction and deduplication, with an artifact store for detailed content.

Persistent memory for AI agents with Ebbinghaus forgetting curve decay, hybrid BM25 + vector + knowledge graph retrieval, temporal reasoning, and a local dashboard. 89.4% Recall@5 on LongMemEval.

Local-first agent memory: a plain-Markdown Obsidian vault is the source of truth, with a rebuildable DuckDB index for hybrid BM25 + vector + graph recall.

Local Work Model for AI agents that learns from real outcomes.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.