hifriendbot avatar

Cogmemai

hifriendbot/cogmemai-mcp

This is persistent memory for AI coding assistants that actually benchmarks at the top of the field: 95.10% on LongMemEval, 91% on LoCoMo. It exposes 35 MCP tools for saving memories, recalling by topic or semantic search, extracting principles from patterns, and auto-capturing coding sessions without requiring the AI to remember to save. Runs in cloud mode for full semantic search and team sync, local mode for offline-only setups, or hybrid for unreliable networks. Ships with quantum-safe encryption by default. Works across Claude Code, Cursor, Windsurf, Cline, and anything MCP-compatible. Reach for it when you're tired of re-explaining architectural decisions every session or watching your AI suggest approaches you already rejected three hours ago.

GitHub stars
7
tools
33
auth
Secret needed
transport
STDIO, HTTP
env var
1
last updated
Oct 1, 2026

Tools

33 tools

Public tool metadata for what this MCP can expose to an agent.

save_memoryStore a developer memory (fact, preference, decision, architecture detail). Memories persist across all Claude Code sessions and are available in future conversations.9 params

Store a developer memory (fact, preference, decision, architecture detail). Memories persist across all Claude Code sessions and are available in future conversations.

Parameters* required
categorystring
Category: frontend, backend, database, devops, testing, security, performance, tooling, api, general. Custom categories also accepted for non-developer domains.default: general
contentstring
The fact to remember (complete sentence)
importanceinteger
1-10 (10 = core architecture, 1 = trivial)default: 5
memory_typestring
Type: identity, preference, architecture, decision, bug, dependency, pattern, context. Custom types also accepted for non-developer domains.default: context
scopestring
global = applies everywhere, project = specific to this codebase, team = shared with team membersone of global · project · teamdefault: project
subjectstring
What this is about, e.g. "auth_system", "react_version", "tab_width"default:
tagsarray
Optional tags for grouping/threading memories (max 5 tags, each max 30 chars). E.g., ["marketing-campaign", "feb-2026"]
team_idinteger
Team ID (required when scope is "team"). The memory will be shared with all team members.
ttlstring
Set an expiration time. Use for temporary context like current task status. Format: "24h", "7d", "30d". Memory auto-archives after expiry.
save_ruleSave a mandatory rule that will ALWAYS be followed in every session. Rules bypass scoring and decay — they are injected into every conversation, every time. Use for absolute requirements like "NEVER do X" or "ALWAYS do Y".5 params

Save a mandatory rule that will ALWAYS be followed in every session. Rules bypass scoring and decay — they are injected into every conversation, every time. Use for absolute requirements like "NEVER do X" or "ALWAYS do Y".

Parameters* required
categorystring
Category for organization: frontend, backend, security, general, etc.default: general
contentstring
The rule to enforce (e.g., "NEVER use -latest model aliases", "ALWAYS apply changes to both class-chat.php AND class-maas.php")
scopestring
global = applies to all projects, project = only this codebaseone of global · projectdefault: project
subjectstring
Short label for the rule, e.g. "model_aliases", "companions_parity"default:
tagsarray
Optional tags for grouping rules
list_rulesList all mandatory rules for the current project and/or globally. Rules are always-on memories that surface in every session.1 params

List all mandatory rules for the current project and/or globally. Rules are always-on memories that surface in every session.

Parameters* required
scopestring
Filter: all = project + global, project = this project only, global = global onlyone of all · project · globaldefault: all
delete_ruleDelete a mandatory rule by its memory ID. Use list_rules to find the ID first.1 params

Delete a mandatory rule by its memory ID. Use list_rules to find the ID first.

Parameters* required
memory_idinteger
The memory ID of the rule to delete
recall_memoriesSearch stored memories using semantic search. Returns memories ranked by relevance, importance, and recency. Use this to find relevant context from past sessions.10 params

Search stored memories using semantic search. Returns memories ranked by relevance, importance, and recency. Use this to find relevant context from past sessions.

Parameters* required
categorystring
Filter by category (e.g., "backend", "frontend", or any custom category)
context_typestring
Optional context type that shifts scoring weights. debugging = boost bug/pattern memories, planning = boost architecture/decision, reviewing = boost pattern/preference.one of debugging · planning · reviewing
importance_mininteger
Only return memories with importance >= this value
limitinteger
Max resultsdefault: 10
memory_typestring
Filter by typeone of identity · preference · architecture · decision · bug · dependency
querystring
What to search for (natural language)
scopestring
Filter by scopeone of global · project · alldefault: all
synthesizeboolean
When true and 3+ results are found, returns an AI-synthesized summary combining all memories into a coherent answer.default: false
tagstring
Filter by tag (e.g., "marketing-campaign")
team_idinteger
Optional override. Team memories are automatically included for team/enterprise users.
extract_memoriesExtract memories from a conversation exchange using AI. Send the developer message and assistant response, and the server identifies facts worth remembering (architecture decisions, preferences, bug fixes, etc.).3 params

Extract memories from a conversation exchange using AI. Send the developer message and assistant response, and the server identifies facts worth remembering (architecture decisions, preferences, bug fixes, etc.).

Parameters* required
assistant_responsestring
The assistant's response
previous_contextstring
Previous exchange for context
user_messagestring
The developer's message
get_project_contextLoad top memories for the current project plus relevant global memories. Use at the start of a session to get full context from previous sessions. Optionally pass context to get memories most relevant to your current task.7 params

Load top memories for the current project plus relevant global memories. Use at the start of a session to get full context from previous sessions. Optionally pass context to get memories most relevant to your current task.

Parameters* required
compactboolean
When true (default), returns only formatted_context text instead of full JSON arrays. Saves ~60% tokens.default: true
contextstring
Optional context to improve relevance ranking (e.g., current task or topic)
context_typestring
Optional context type that shifts scoring weights. debugging = boost bug/pattern memories, planning = boost architecture/decision, reviewing = boost pattern/preference.one of debugging · planning · reviewing · general
include_globalboolean
Include global developer preferencesdefault: true
limitinteger
Max total memories to return (default 25). Lower values save context tokens.default: 25
project_idstring
Project identifier (auto-detected from git remote if omitted)
team_idinteger
Optional override. Team memories are automatically included for team/enterprise users.
list_memoriesList stored memories with optional filters by type, category, scope, or project.9 params

List stored memories with optional filters by type, category, scope, or project.

Parameters* required
categorystring
Filter by category (e.g., "backend", "frontend", or any custom category)
importance_mininteger
Only return memories with importance >= this value
limitinteger
Results per pagedefault: 50
memory_typestring
Filter by typeone of identity · preference · architecture · decision · bug · dependency
offsetinteger
Pagination offsetdefault: 0
scopestring
Filter by scopeone of global · project · alldefault: all
sort_bystring
Sort order: importance (default), updated, created, referenced (most used first), least_usedone of importance · updated · created · referenced · least_useddefault: importance
tagstring
Filter by tag (e.g., "marketing-campaign")
untypedboolean
When true, only return memories with no memory_type set
delete_memoryDelete a specific memory by its ID. This is permanent.1 params

Delete a specific memory by its ID. This is permanent.

Parameters* required
memory_idinteger
Memory ID to delete
update_memoryUpdate an existing memory's content, importance, or scope.8 params

Update an existing memory's content, importance, or scope.

Parameters* required
categorystring
New category (e.g., "backend", "frontend", or any custom category)
contentstring
New content
importanceinteger
New importance (1-10)
memory_idinteger
Memory ID to update
memory_typestring
New memory typeone of identity · preference · architecture · decision · bug · dependency
scopestring
New scopeone of global · project
subjectstring
New subject (e.g., "auth_system", "react_version")
tagsarray
New tags (replaces existing tags)
bulk_deleteDelete multiple memories at once by their IDs. Maximum 100 IDs per call. This is permanent.1 params

Delete multiple memories at once by their IDs. Maximum 100 IDs per call. This is permanent.

Parameters* required
idsarray
Array of memory IDs to delete (max 100)
bulk_updateUpdate multiple memories at once. Each item needs a memory_id and fields to update. Maximum 50 items per call.1 params

Update multiple memories at once. Each item needs a memory_id and fields to update. Maximum 50 items per call.

Parameters* required
updatesarray
Array of update objects (max 50)
get_usageGet current usage statistics — memory count, extractions this month, tier info, projects.

Get current usage statistics — memory count, extractions this month, tier info, projects.

No parameter schema in public metadata yet.

export_memoriesExport all memories as JSON. Use this to back up memories or transfer them to another project.

Export all memories as JSON. Use this to back up memories or transfer them to another project.

No parameter schema in public metadata yet.

import_memoriesBulk import memories from a JSON array. Each memory needs at minimum a content field. Deduplication is applied automatically.1 params

Bulk import memories from a JSON array. Each memory needs at minimum a content field. Deduplication is applied automatically.

Parameters* required
memoriesstring
JSON string containing an array of memory objects. Each must have "content", optionally: memory_type, category, subject, importance, scope.
ingest_documentExtract memories from a document by splitting it into chunks and processing each one. Great for onboarding — feed in READMEs, architecture docs, or API specs to quickly build project context.2 params

Extract memories from a document by splitting it into chunks and processing each one. Great for onboarding — feed in READMEs, architecture docs, or API specs to quickly build project context.

Parameters* required
document_typestring
Type hint for extraction (e.g., readme, api_docs, architecture, changelog)default: general
textstring
The document text to ingest (up to 50K characters)
save_session_summarySave a summary of the current coding session. Captures what was accomplished, decisions made, and next steps. Stored as a session_summary memory for future reference.1 params

Save a summary of the current coding session. Captures what was accomplished, decisions made, and next steps. Stored as a session_summary memory for future reference.

Parameters* required
summarystring
Summary of the session — what was done, key decisions, and next steps
list_tagsList all tags in use across your memories, with counts. Use this to see what threads/groups exist and find related memories by tag.

List all tags in use across your memories, with counts. Use this to see what threads/groups exist and find related memories by tag.

No parameter schema in public metadata yet.

link_memoriesConnect two related memories with a named relationship. Use this to build a knowledge graph — e.g., linking a bug fix to the architecture decision that caused it, or connecting a preference to the pattern it led to.3 params

Connect two related memories with a named relationship. Use this to build a knowledge graph — e.g., linking a bug fix to the architecture decision that caused it, or connecting a preference to the pattern it led to.

Parameters* required
memory_idinteger
The source memory ID
related_memory_idinteger
The target memory ID to link to
relationshipstring
How the memories relate: led_to (A caused B), contradicts (A conflicts with B), extends (A builds on B), related (general connection)one of led_to · contradicts · extends · related
get_memory_linksView all memories linked to a specific memory. Returns the relationship type and full memory details for each connection. Use this to explore the knowledge graph around a memory.1 params

View all memories linked to a specific memory. Returns the relationship type and full memory details for each connection. Use this to explore the knowledge graph around a memory.

Parameters* required
memory_idinteger
The memory ID to get links for
get_memory_versionsView the edit history of a memory. Shows all previous versions with timestamps and what changed. Useful for understanding how a decision or fact evolved over time.1 params

View the edit history of a memory. Shows all previous versions with timestamps and what changed. Useful for understanding how a decision or fact evolved over time.

Parameters* required
memory_idinteger
The memory ID to get version history for
get_analyticsGet a memory health dashboard with insights: most recalled memories, never-recalled memories, stale memories, growth trends, and breakdowns by type and category. Use this to identify cleanup opportunities and understand memory usage patterns.1 params

Get a memory health dashboard with insights: most recalled memories, never-recalled memories, stale memories, growth trends, and breakdowns by type and category. Use this to identify cleanup opportunities and understand memory usage patterns.

Parameters* required
project_idstring
Filter analytics to a specific project. Omit for current project. Use "all" for cross-project analytics.
promote_memoryPromote a project-scoped memory to global scope so it applies across all projects. Use this when you discover a preference or pattern that should be universal — e.g., "user prefers tabs over spaces" or "always use Bun instead of npm".1 params

Promote a project-scoped memory to global scope so it applies across all projects. Use this when you discover a preference or pattern that should be universal — e.g., "user prefers tabs over spaces" or "always use Bun instead of npm".

Parameters* required
memory_idinteger
The project memory ID to promote to global scope
consolidate_memoriesConsolidate related memories into fewer, richer memories. Finds clusters of memories sharing the same subject (3+ memories required), then uses AI to synthesize each cluster into 1-2 comprehensive facts. Originals are archived (not deleted) with full version history. Use dry_r...4 params

Consolidate related memories into fewer, richer memories. Finds clusters of memories sharing the same subject (3+ memories required), then uses AI to synthesize each cluster into 1-2 comprehensive facts. Originals are archived (not deleted) with full version history. Use dry_r...

Parameters* required
categorystring
Only consolidate memories in this category
dry_runboolean
When true, preview consolidation results without making changes. Recommended for first use.default: false
memory_typestring
Only consolidate memories of this typeone of identity · preference · architecture · decision · bug · dependency
subjectstring
Consolidate only memories with this exact subject (e.g., "auth_system"). Omit to auto-detect all qualifying clusters.
save_taskCreate a task that persists across sessions. Tasks are tracked with status (pending, in_progress, done, blocked) and priority (high, medium, low). Use this to maintain continuity on multi-session work.4 params

Create a task that persists across sessions. Tasks are tracked with status (pending, in_progress, done, blocked) and priority (high, medium, low). Use this to maintain continuity on multi-session work.

Parameters* required
descriptionstring
Detailed description of what needs to be donedefault:
prioritystring
Task priorityone of high · medium · lowdefault: medium
statusstring
Initial task statusone of pending · in_progress · done · blockeddefault: pending
titlestring
Short task title (e.g., "Fix auth bug in login flow")
get_tasksGet tasks for the current project. Returns tasks filtered by status — defaults to showing pending and in_progress tasks. Use at session start to pick up where you left off.2 params

Get tasks for the current project. Returns tasks filtered by status — defaults to showing pending and in_progress tasks. Use at session start to pick up where you left off.

Parameters* required
include_doneboolean
When true, also include completed tasksdefault: false
statusstring
Filter by task status. "all" returns pending + in_progress + blocked (excludes done).one of pending · in_progress · done · blocked · alldefault: all
update_taskUpdate a task's status, title, description, or priority. Use this to mark tasks as in_progress, done, or blocked as you work.5 params

Update a task's status, title, description, or priority. Use this to mark tasks as in_progress, done, or blocked as you work.

Parameters* required
descriptionstring
New description
prioritystring
New priorityone of high · medium · low
statusstring
New statusone of pending · in_progress · done · blocked
task_idinteger
The task memory ID (from get_tasks)
titlestring
New title
save_correctionSave a correction pattern — what went wrong and what the right approach is. These are surfaced automatically when similar situations arise in future sessions, helping avoid repeated mistakes.4 params

Save a correction pattern — what went wrong and what the right approach is. These are surfaced automatically when similar situations arise in future sessions, helping avoid repeated mistakes.

Parameters* required
contextstring
When/where this applies (e.g., "package management in monorepo")default:
right_approachstring
The correct approach (e.g., "Always use bun add for this project")
scopestring
global = applies everywhere, project = specific to this codebaseone of global · projectdefault: project
wrong_approachstring
What was done incorrectly (e.g., "Used npm install instead of bun add")
set_reminderSet a reminder that surfaces automatically at the start of your next session. Use for follow-ups, things to check, or deferred work. Reminders auto-archive after being shown.2 params

Set a reminder that surfaces automatically at the start of your next session. Use for follow-ups, things to check, or deferred work. Reminders auto-archive after being shown.

Parameters* required
contentstring
What to remind about (e.g., "Check if PR #42 was merged")
ttlstring
How long to keep the reminder alive. Format: "24h", "7d", "30d". Default: 7 days.default: 7d
get_stale_memoriesFind memories that may be outdated based on age and access patterns. Returns memories that haven't been recalled or updated recently, so you can review, update, or delete them.2 params

Find memories that may be outdated based on age and access patterns. Returns memories that haven't been recalled or updated recently, so you can review, update, or delete them.

Parameters* required
days_thresholdinteger
Consider memories stale if not accessed in this many days (default: 30)default: 30
limitinteger
Max results to returndefault: 20
get_file_changesShow what files changed since your last session. Compares the current git state to a snapshot saved when your previous session ended. Helps you understand what happened between sessions.

Show what files changed since your last session. Compares the current git state to a snapshot saved when your previous session ended. Helps you understand what happened between sessions.

No parameter schema in public metadata yet.

feedback_memorySignal whether a recalled memory was useful or irrelevant. Helps improve future recall quality over time. Use after recalling memories to indicate which were helpful vs noise.2 params

Signal whether a recalled memory was useful or irrelevant. Helps improve future recall quality over time. Use after recalling memories to indicate which were helpful vs noise.

Parameters* required
memory_idinteger
The memory ID to give feedback on
signalstring
"useful" boosts the memory's ranking, "irrelevant" reduces its importance. For skills, "useful" boosts confidence, "irrelevant" reduces it.one of useful · irrelevant
generate_skillsManually trigger skill generation from your corrections, preferences, and patterns. Skills are behavioral directives that auto-improve how the AI works with you. CogmemAi also generates skills automatically when enough evidence accumulates — this tool lets you trigger it manua...3 params

Manually trigger skill generation from your corrections, preferences, and patterns. Skills are behavioral directives that auto-improve how the AI works with you. CogmemAi also generates skills automatically when enough evidence accumulates — this tool lets you trigger it manua...

Parameters* required
dry_runboolean
When true, preview skill candidates without generating themdefault: false
project_idstring
Project to generate skills for (auto-detected if omitted)
subjectstring
Generate skills for a specific subject. Omit to scan all subjects.

Sponsors

Configuration

COGMEMAI_API_KEY*secret

Your CogmemAi API key from hifriendbot.com/developer/

Readme

CogmemAi: Safe, Persistent Memory for Any Ai System

npm version License: MIT Quantum Safe

CogmemAi: The Safe, Persistent Memory That Keeps Ai in Line

It remembers what matters, stops any action that breaks the rules you set before it happens, and checks what your Ai did against what you asked. For assistants, agents, robots, vehicles and code.

CogmemAi demo: your Ai assistant remembers your project across sessions


View the full README on GitHub

Details

Repository
github.com/hifriendbot/cogmemai-mcp
Category
AI & LLM Tools
Package
cogmemai-mcp
Transport
STDIO, HTTP
Auth
Required
Registry
MCP registry, active

More from hifriendbot

Related AI & LLM Tools MCP servers

View all
1overtimepog avatarCloakmcpovertimepog/cloakmcpStealth browser MCP server — anti-detection Chromium with snapshot-first agent interface7stars
2freema avatarPixelForgefreema/pixelforge-mcpForge pixel art sprites, animations, tilesets and game assets with Google Gemini.6stars
3bitbond avatarToken Toolbitbond/token-tool-mcpDeploy compliant ERC-20 tokens from any AI agent. 17 tools, 10 networks, CertiK-audited.6stars
4scrollmark avatarSocialGPTscrollmark/socialgpt-mcpSocial media analytics, video analysis, and competitor intel for any MCP-compatible AI agent.6stars
5sharozdawa avatarAi Visibilitysharozdawa/ai-visibilityTrack brand visibility across ChatGPT, Perplexity, Claude, and Gemini.6stars
6sowiedu avatarEdictsowiedu/edictAI-agent programming language. JSON AST in, WASM out. Typed, effect-tracked, Z3-verified.6stars