Install
$ agentstack add mcp-hifriendbot-cogmemai-mcp ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
[](https://www.npmjs.com/package/cogmemai-mcp) [](https://opensource.org/licenses/MIT) [](https://hifriendbot.com/developer/)
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
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):
{
"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
Works With
Claude Code (Recommended)
Automatic setup:
npx cogmemai-mcp setup
Cursor
Add to ~/.cursor/mcp.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:
{
"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:
{
"cogmemai": {
"command": "npx",
"args": ["-y", "cogmemai-mcp"],
"env": { "COGMEMAI_API_KEY": "cm_your_api_key_here" }
}
}
Continue
Add to ~/.continue/config.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:
| Tool | Description | |------|-------------| | 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
| | Free | Pro | Team | Enterprise | |---|---|---|---|---| | Price | $0 | $14.99/mo | $39.99/mo | $99.99/mo | | Memories | 500 | 2,000 | 10,000 | 50,000 | | Extractions/mo | 500 | 2,000 | 5,000 | 20,000 | | Projects | 5 | 20 | 50 | 200 |
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
| Variable | Required | Description | |----------|----------|-------------| | COGMEMAI_API_KEY | Cloud/Hybrid | Your API key (starts with cm_). Not needed for local mode. | | COGMEMAI_MODE | No | Storage mode: cloud (default), local (data stays on your machine), or hybrid | | COGMEMAI_LOCAL_DB | No | Path to local database (default: ~/.cogmemai/local.db). Used in local and hybrid modes. | | COGMEMAI_API_URL | No | Custom API URL (default: hifriendbot.com) | | COGMEMAI_ENCRYPTION_KEY | No | Custom encryption passphrase for local mode. If not set, a key is auto-generated. | | COGMEMAI_LOCAL_ENCRYPTION | No | Set to off to disable local encryption (not recommended). |
Support
- Issues: GitHub Issues
- Docs: hifriendbot.com/developer
License
MIT — see [LICENSE](./LICENSE)
Built by HiFriendbot — Better Friends, Better Memories, Better Ai. 🛡️ Quantum Safe.
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: hifriendbot
- Source: hifriendbot/cogmemai-mcp
- License: MIT
- Homepage: https://hifriendbot.com/developer/
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.