loading…
Search for a command to run...
loading…
Self-learning memory for AI coding agents. Observes tool sequences, user preferences, and recurring fixes; confidence-based promotion (hits ≥5 → mature, ≥10 → r
Self-learning memory for AI coding agents. Observes tool sequences, user preferences, and recurring fixes; confidence-based promotion (hits ≥5 → mature, ≥10 → rule) so agents stop repeating mistakes without explicit instruction. SQLite-backed, project-aware, zero external deps. Works with Claude Code, Cursor, Windsurf, Goose, Codex. Published on PyPI as instinct-mcp and registered in the MCP Registry.
PyPI Python CI CodeQL License MCP
Self-learning memory for AI coding agents: record repeated patterns, score them by confidence, and surface mature guidance back through MCP.
raw to mature, rule, and cross-project universal.pip install instinct-mcp
Used in the wild: 1,400+ monthly downloads on PyPI as of 2026-04-25.
For Claude Code:
pip install instinct-mcp
claude mcp add instinct -- instinct serve
instinct observe "seq:test->fix->test"
Then ask your agent for suggestions, or run:
instinct suggest
Suggestions appear once a pattern reaches mature confidence. By default,
mature starts at confidence 5 and rule starts at confidence 10.
instinct observe "seq:lint->fix->lint"
instinct observe "pref:commits=conventional" --cat preference
instinct observe "fix:utf8-encoding-windows" --cat fix_pattern
instinct observe "combo:pytest+coverage" --cat combo
Pattern prefixes are conventional, not magic: seq:, pref:, fix:, and
combo: keep the store searchable and easier to export.
Full MCP surface is larger than this table. A complete reference belongs in docs/TOOLS.md (TODO).
| Tool / command | Use it for |
|---|---|
observe |
Record or reinforce one pattern; repeats increment confidence. |
suggest |
Return mature patterns for current agent guidance. |
consolidate |
Promote thresholds and run automatic chain detection. |
session_summary |
End-of-session digest with recent observations and top suggestions. |
detect_chains |
Discover sequential patterns from confidence-log timestamps. |
effectiveness |
Measure which suggestions were reinforced by later observations. |
export_platform |
Export rules for Claude, Cursor, Windsurf, Codex, or CLAUDE.md. |
gc |
Decay stale patterns, find duplicates, clean orphan aliases, rebuild FTS. |
Claude Code project-level .mcp.json:
{
"mcpServers": {
"instinct": {
"command": "instinct",
"args": ["serve"]
}
}
}
Codex CLI:
[mcp_servers.instinct]
command = "instinct"
args = ["serve"]
Cursor / Windsurf / HTTP clients:
{
"mcpServers": {
"instinct": {
"command": "instinct",
"args": ["serve", "--transport", "sse"]
}
}
}
Server options:
instinct serve # stdio, default
instinct serve --transport sse # SSE
instinct serve --transport streamable-http # streamable HTTP
instinct serve --port 3777
CLAUDE.md is good for hand-written rules. instinct is for patterns that should earn their way into rules through repetition.
| Surface | Best fit | Different because |
|---|---|---|
instinct |
Coding-agent pattern memory | Local SQLite, confidence tiers, decay, cross-project promotion, MCP tools. |
| Mem0 | General AI memory layer | Broader memory product; instinct is narrower and coding-agent focused. |
| claude-mem | Claude-specific memory experiments | instinct exposes MCP tools plus CLI exports across multiple agents. |
| Pieces | Developer snippets and workflow context | instinct stores repeated behavioral patterns rather than a general knowledge library. |
>=3.11mcp>=1.0.0~/.instinct/instinct.db~/.instinct/config.toml1.4.0instinct observe <pattern> # record/reinforce
instinct suggest # mature suggestions
instinct list # browse all patterns
instinct history <pattern> # confidence timeline
instinct effectiveness # suggestion confirmation rates
instinct export-platform codex # export for an agent/editor
instinct gc # decay + dedup + cleanup
instinct doctor # DB health checks
All core commands support --json where structured output is useful.
1.4.0: auto-chain detection and effectiveness scoring.1.3.0: platform export, MCP prompts, and gc.1.2.0: auto-promote on observe, confidence history, universal rules, CLAUDE.md import.1.1.0: Agent Skill export, CLAUDE.md injection, near-duplicate detection.See CHANGELOG.md.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"yakuphanycl-instinct": {
"command": "npx",
"args": []
}
}
}