PyPI Published · MCP Native

instinct-mcp

Self-learning pattern memory for AI coding agents. Observe patterns, track confidence, promote to rules, and suggest across sessions — with SQLite persistence and MCP integration.

$ pip install instinct-mcp click to copy
PyPI
Published
MCP
Native Protocol
SQLite
Persistence
0
Dependencies

The Problem

AI agents forget learned patterns between sessions. Every conversation starts from scratch — no memory of what worked, what failed, or what you prefer.

Problem

AI agents forget learned patterns between sessions. Repeated mistakes, lost preferences, no continuity.

Solution

Observe → track → promote pipeline with SQLite persistence and MCP integration. Patterns gain confidence over time.

Outcome

Open-source on PyPI, reusable across Claude Code, Cursor, and Windsurf. Agents learn and remember.

Learning Pipeline

Patterns flow through a confidence-based promotion pipeline. Observed patterns gain confidence with each occurrence and automatically mature into actionable rules.

observe
Record a pattern
track
confidence++
mature
conf ≥ 5
rule
conf ≥ 10
suggest
Guide behavior

What It Learns

Four pattern types cover the full spectrum of agent behavior — from tool sequences to user preferences.

seq:

Tool Sequences

Track sequences of tools/actions that commonly follow each other. e.g. seq:read->edit->test

pref:

User Preferences

Remember user style choices and conventions. e.g. pref:commit_style=conventional

fix:

Recurring Fixes

Capture solutions to problems that keep coming back. e.g. fix:import-order-stdlib-first

combo:

Used Together

Things that are commonly used as a pair. e.g. combo:pytest+coverage

Built for Agents

Everything an AI agent needs to build persistent memory — no configuration, no external services, no dependencies.

SQLite Persistence

All patterns stored in ~/.instinct/instinct.db. Survives restarts, works offline, zero setup.

MCP Protocol Native

First-class MCP server. Works out of the box with any MCP-compatible AI agent or editor.

Multi-Agent Ready

Works with Claude Code, Cursor, and Windsurf. All agents share the same pattern database.

CLI + Python Library

Use from the command line or import as a Python library. Both interfaces, same database.

🔒

Project-Scoped

Fingerprint-based scoping ensures patterns are relevant to the current project context.

Zero Dependencies

Pure Python, stdlib only. No external packages required. Install and run anywhere.

Commands

Simple CLI for observing, suggesting, consolidating, and listing patterns.

# Record a new pattern
$ instinct observe --name "seq:read->edit->test" --description "Always run tests after editing"

# Get suggestions for current context
$ instinct suggest

# Auto-promote high-confidence patterns
$ instinct consolidate

# List all tracked patterns
$ instinct list

Shared Memory Across Agents

Multiple AI agents can share the same instinct database. Claude Code as primary, Cursor or Windsurf as secondary — all reading and writing to the same SQLite file.

Claude Code (primary agent)
Cursor (secondary agent)
Windsurf (secondary agent)
Single shared ~/.instinct/instinct.db
Project-scoped fingerprinting
# Claude Code config (.claude.json)
{
  "mcpServers": {
    "instinct": {
      "command": "instinct-mcp"
    }
  }
}

# Cursor / Windsurf use the same
# command — shared DB, zero config

What's Next

instinct-mcp is live on PyPI. The path to universal agent memory.

Now

PyPI + MCP Server

Published on PyPI. MCP native server, CLI, Python library. SQLite persistence with project-scoped fingerprinting.

Next

Pattern Analytics

Insights dashboard showing pattern trends, promotion rates, and agent learning curves over time.

Future

Team Sync

Share instinct databases across teams. Export/import rules, sync patterns between developers.

Ongoing

Ecosystem Growth

More agent integrations, more pattern types, community-contributed rule packs.

Give Your Agent Memory

Install from PyPI. Check the source. Start learning.