instinct
Integrates with GitHub Actions for CI/CD workflows and Dependabot for dependency updates, with repository health monitoring and protected branch management.
Provides CI/CD workflow integration with automated testing and security scanning through GitHub Actions workflows.
Supports export and import of patterns to/from Markdown files (CLAUDE.md, SKILL.md) for agent instruction formatting.
Supports pattern detection for pytest testing workflows, including test sequences and combination patterns with coverage tools.
Provides Python-specific pattern learning and memory capabilities for AI coding agents working with Python projects and tools.
Uses SQLite for pattern storage with full-text search capabilities, backup/restore functionality, and database health management.
Supports TOML configuration format for MCP server setup with certain AI agent clients like Codex CLI.
instinct
Self-learning memory for AI coding agents: record repeated patterns, score them by confidence, and surface mature guidance back through MCP.
Records tool sequences, user preferences, recurring fixes, and useful tool combinations.
Promotes repeated observations from
rawtomature,rule, and cross-projectuniversal.Exports learned rules for Claude, Cursor, Windsurf, Codex, CLAUDE.md, and Agent Skills.
pip install instinct-mcpUsed in the wild: 1,400+ monthly downloads on PyPI as of 2026-04-25.
Quick Start
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 suggestSuggestions appear once a pattern reaches mature confidence. By default,
mature starts at confidence 5 and rule starts at confidence 10.
What It Learns
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 comboPattern prefixes are conventional, not magic: seq:, pref:, fix:, and
combo: keep the store searchable and easier to export.
Tool Surface
Full MCP surface is larger than this table. A complete reference belongs in
docs/TOOLS.md (TODO).
Tool / command | Use it for |
| Record or reinforce one pattern; repeats increment confidence. |
| Return mature patterns for current agent guidance. |
| Promote thresholds and run automatic chain detection. |
| End-of-session digest with recent observations and top suggestions. |
| Discover sequential patterns from confidence-log timestamps. |
| Measure which suggestions were reinforced by later observations. |
| Export rules for Claude, Cursor, Windsurf, Codex, or CLAUDE.md. |
| Decay stale patterns, find duplicates, clean orphan aliases, rebuild FTS. |
MCP Client Setup
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 3777How It Compares
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 |
| Coding-agent pattern memory | Local SQLite, confidence tiers, decay, cross-project promotion, MCP-native — works with any MCP-compatible agent. |
General LLM memory layer | Broader memory product (chat history, episodic facts); instinct is narrower and coding-agent focused on behavioral patterns. | |
Letta (formerly MemGPT) | Stateful agent runtime | Full agent framework with memory built-in; instinct is a memory-only sidecar you bolt onto your existing agent. |
Memory for LangChain | Tied to LangChain ecosystem; instinct is framework-agnostic via MCP. | |
Claude-specific memory experiments | instinct exposes MCP tools plus CLI exports across Claude, Cursor, Windsurf, Goose, and Codex. | |
Developer snippets and workflow context | instinct stores repeated behavioral patterns; Pieces stores artifacts (snippets, links, screenshots). | |
| Hand-written rule files | Flat text, manual maintenance. instinct can export to these formats once a pattern matures. |
When to reach for instinct: your agent makes the same correction or follows the same workflow more than 3 times and you don't want to keep retyping. instinct records once, promotes after repetition, and surfaces it back automatically.
When to reach for the others: chat-history recall (Mem0), full agent runtime with built-in memory (Letta), LangChain integration (LangMem), or static hand-curated rules (CLAUDE.md / .cursorrules).
Storage and Runtime
Package:
instinct-mcpPython:
>=3.11Runtime dependency:
mcp>=1.0.0Database: SQLite WAL at
~/.instinct/instinct.dbConfig: optional
~/.instinct/config.tomlCurrent release in this repo:
1.4.0
CLI Reference
instinct 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 checksAll core commands support --json where structured output is useful.
Recent Releases
1.4.0: auto-chain detection and effectiveness scoring.1.3.0: platform export, MCP prompts, andgc.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.
Repository Health
CI matrix: Python 3.11-3.14 on Ubuntu and Windows.
CodeQL security scanning on push and pull request.
Dependabot tracks GitHub Actions and pip updates weekly.
Published on PyPI, MCP Registry, and Glama.
License
Maintenance
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/WRG-11/instinct'
If you have feedback or need assistance with the MCP directory API, please join our Discord server