Stop repeating yourself. MCP Standards learns from your corrections automatically and updates your AI configuration.
You keep telling your AI assistant the same things:
- "Use
uvnotpip" - "Use
uvnotpip" - "Use
uvnotpip"
What if it learned after the 3rd time?
MCP Standards learns from your corrections automatically:
- You correct Claude 3 times: "use
uvnotpip" - MCP Standards detects the pattern
- Preference promoted (80% confidence)
- CLAUDE.md updated automatically
- Claude never makes that mistake again
You: "Use uv not pip"
Claude: *ignores, uses pip again*
You: "USE UV NOT PIP"
Claude: *ignores again*
You: "I TOLD YOU 10 TIMES, USE UV!!!"
You: "Use uv not pip" (correction #1)
You: "Use uv not pip" (correction #2)
You: "Use uv not pip" (correction #3)
MCP Standards: โ
Pattern learned! Added to CLAUDE.md
Claude: *uses uv from now on, forever*
Automatic Pattern Detection:
- Learns from corrections (3+ occurrences)
- Detects workflow patterns
- Promotes to preferences automatically
- Updates CLAUDE.md without manual work
5 Types of Learning:
- Explicit corrections: "use X not Y"
- Implicit rejections: User edits within 2 minutes
- Rule violations: Compare vs config files
- Workflow patterns: Always run tests after code
- Tool preferences: Prefer certain tools for tasks
Confidence-Based Promotion:
- 3 occurrences = 30% confidence (detected)
- 5 occurrences = 70% confidence (high)
- 10 occurrences = 90% confidence (very high)
- 95%+ = auto-apply to CLAUDE.md
Reads your existing config files:
.editorconfigโ Indentation, line endings.prettierrcโ Formatting, quotes.eslintrcโ Linting rulespyproject.tomlโ Python configpackage.jsonโ JavaScript dependenciesCargo.tomlโ Rust config
Auto-detects:
- Project type (Python, JavaScript, Rust, Go, etc.)
- Package manager (uv, npm, yarn, cargo, etc.)
- Test framework (pytest, jest, vitest, etc.)
- Build commands
Generates instruction files for:
- Claude Desktop/Code (
CLAUDE.md) - GitHub Copilot (
.github/copilot-instructions.md) - Cursor (
.cursor/rules/standards.mdc)
Built with defense-in-depth:
- โ Path whitelist - Only allowed directories
- โ Input sanitization - No log injection
- โ Rate limiting - 100 patterns/min max
- โ Audit logging - Complete modification trail
- โ 100% local - No cloud, no tracking
- Local SQLite database with FTS5
- Full-text search (<50ms on 1M+ episodes)
- Export to markdown
- Project-specific vs global preferences
# 1. Clone repository
git clone https://github.com/airmcp-com/mcp-standards.git
cd mcp-standards
# 2. Install dependencies
uv sync
# 3. Configure Claude Desktop
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-standards": {
"command": "uv",
"args": [
"run",
"--directory",
"/ABSOLUTE/PATH/TO/mcp-standards",
"python",
"run_server.py"
]
}
}
}
# Replace /ABSOLUTE/PATH/TO/ with your actual path!
# Example: /Users/yourname/Projects/mcp-standards/run_server.py
# 4. Restart Claude Desktop - you're done!# Install from PyPI
uv pip install mcp-standards
# Configure Claude Desktop
# Add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"mcp-standards": {
"command": "mcp-standards",
"args": []
}
}
}
# Restart Claude DesktopOnce Claude Desktop restarts, try this:
// 1. Store a preference right now
add_episode(
name="My First Preference",
content="I prefer using TypeScript over JavaScript for new projects",
source="user"
)
// 2. Search for it
search_episodes(query="TypeScript", limit=5)
// 3. Generate AI standards from your current project
generate_ai_standards(project_path=".")What just happened?
- โ Your preference is stored in local SQLite database
- โ Searchable in all future conversations
- โ AI standards file generated from your project config
Next: Start correcting Claude when it makes mistakes. After 3 similar corrections, run:
get_learned_preferences(min_confidence=0.3)You'll see MCP Standards has learned the pattern automatically!
Want to save on AI costs? Add agentic-flow to route simple operations to cheaper models:
# Get free Gemini API key: https://aistudio.google.com/app/apikey
# Add to your claude_desktop_config.json (alongside mcp-standards):
{
"mcpServers": {
"mcp-standards": { ... },
"agentic-flow": {
"command": "npx",
"args": ["-y", "agentic-flow", "mcp"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key_here",
"DEFAULT_MODEL": "gemini-1.5-flash",
"SHOW_MODEL_USAGE": "true",
"SHOW_COST_SAVINGS": "true",
"LOG_LEVEL": "info"
}
}
}
}What agentic-flow does:
- Routes simple operations (memory, search) โ Gemini Flash ($0.075/1M tokens)
- Keeps complex operations (code gen) โ Claude Sonnet ($15/1M tokens)
- Shows which model was used for each operation
- Displays cost savings in real-time
- Saves ~$389/month on typical usage
- 100% optional - MCP Standards works perfectly without it
MCP Standards has two complementary systems for building your AI assistant's knowledge:
Store facts, preferences, and instructions right now:
// โ
Store a preference immediately
add_episode(
name="Package Manager Preference",
content="Always use uv instead of pip for Python. Example: uv pip install pytest",
source="user"
)
// ๐ Search your stored knowledge
search_episodes(query="package manager", limit=5)
// Returns: Your uv preference with full context
// ๐ List recent additions
list_recent(limit=10)
// Returns: Last 10 episodes you addedWhen to use Episodes:
- โ Store a preference immediately
- โ Document project-specific facts
- โ Save code examples and snippets
- โ Build a searchable knowledge base
The system automatically learns from repeated corrections:
// ๐ค You DON'T call these - they happen automatically!
// Example: You correct Claude 3+ times: "Use uv instead of pip"
// โ System detects pattern
// โ Creates learned preference with confidence score
// ๐ Check what patterns were detected automatically
get_learned_preferences(min_confidence=0.3)
// Returns: Preferences learned from corrections with confidence scores
// Example: { preference: "use uv over pip", confidence: 0.85, occurrences: 5 }
// ๐ก Get AI-suggested CLAUDE.md updates
suggest_claudemd_update(
project_path="./my-project",
min_confidence=0.7
)
// Returns: "Add rule: Use uv for package management (confidence: 0.85)"
// โ๏ธ Apply learned patterns to your CLAUDE.md
update_claudemd(
file_path="./CLAUDE.md",
min_confidence=0.7
)
// Automatically updates CLAUDE.md with high-confidence learned patternsLearned preferences build automatically when:
- ๐ You correct the same thing 3+ times
- ๐ Patterns emerge across different projects
- ๐ Confidence scores reach thresholds:
- 0.3 = Emerging pattern (2-3 corrections)
- 0.7 = Strong preference (5-7 corrections)
- 0.9 = Very confident (10+ corrections)
Scenario: You want Claude to always use uv instead of pip
add_episode(
name="Python Package Manager",
content="User prefers uv over pip. Always use: uv pip install <package>",
source="user"
)โ Available immediately in search โ Works in current session โ Manual but fast
- Day 1: Correct Claude: "Use uv instead of pip" โ Pattern #1 detected
- Day 3: Correct again on different project โ Pattern #2 detected
- Day 7: Correct third time โ Learned preference created (confidence: 0.3)
- Day 14: Fourth correction โ Confidence increases to 0.7
- Run
get_learned_preferences()โ See the pattern - Run
suggest_claudemd_update()โ Get suggestion to add to CLAUDE.md - Run
update_claudemd()โ Automatically updates your config file
โ Builds confidence scores โ Suggests CLAUDE.md updates โ Automatic but slower
- Store critical preferences immediately with
add_episode() - Let the system learn patterns over time from corrections
- Review learned preferences monthly with
get_learned_preferences() - Update CLAUDE.md when confidence scores are high (0.7+)
// Auto-generate CLAUDE.md from existing config files
generate_ai_standards(project_path=".")
// Analyzes: .editorconfig, .prettierrc, eslint.config.js, pyproject.toml
// Generates: CLAUDE.md, .github/copilot-instructions.md, .cursor/rules/User Correction โ Pattern Extraction โ Frequency Tracking โ Confidence Scoring โ Preference Promotion โ CLAUDE.md Update
Example Flow:
- User says: "Actually, use
uvnotpip" - Pattern extractor detects: "use uv instead of pip"
- Frequency tracker increments: occurrence #1
- Repeat 2 more times โ occurrence #3
- Promotion engine creates preference (confidence 0.3)
- User approves โ CLAUDE.md updated
- Future sessions โ Claude sees preference in context
-- Pattern frequency (tracks occurrences)
CREATE TABLE pattern_frequency (
pattern_key TEXT UNIQUE,
occurrence_count INTEGER,
confidence REAL,
promoted_to_preference BOOLEAN
);
-- Tool preferences (learned rules)
CREATE TABLE tool_preferences (
category TEXT,
preference TEXT,
confidence REAL,
apply_count INTEGER,
project_specific BOOLEAN
);
-- Audit log (security trail)
CREATE TABLE audit_log (
action TEXT,
target_path TEXT,
details TEXT,
success BOOLEAN,
timestamp TIMESTAMP
);| Feature | MCP Standards | Tabnine | Copilot | Other MCPs |
|---|---|---|---|---|
| Learns from corrections | โ Auto | โ No | โ No | โ No |
| Updates CLAUDE.md | โ Auto | N/A | N/A | โ Manual |
| Pattern detection | โ 5 types | โ No | โ No | โ No |
| 100% local | โ Yes | โ Cloud | โ Cloud | โ Varies |
| Open source | โ MIT | โ No | โ No | โ Varies |
| Security features | โ 4 layers |
Unique Value Proposition: MCP Standards is the ONLY system that learns from your corrections and automatically updates your AI configuration.
- Quick Start - 5-minute setup
- Self-Learning Guide - How pattern learning works
- Security Guide - Security features explained
- Integration Guide - Setup for all AI assistants
- Config Standards - Universal config reference
- Architecture - System design
- Self-Learning PRD - Product requirements document
add_episode(name, content)- Save knowledgesearch_episodes(query, limit)- Full-text searchlist_recent(limit)- Recent episodes
get_learned_preferences(category, min_confidence)- View learned patternssuggest_claudemd_update(project_path)- Get suggestionsupdate_claudemd(file_path, min_confidence)- Apply updates
generate_ai_standards(project_path, formats)- Auto-generate from config filesexport_to_markdown(export_path)- Export knowledge base
- Python 3.10 or higher
- Claude Desktop or Claude Code
- MCP 1.0+
Formatting:
.editorconfig.prettierrc/.prettierrc.json.eslintrc/.eslintrc.json
Languages:
pyproject.toml(Python - Black, Ruff, Poetry, uv)package.json(JavaScript/TypeScript)Cargo.toml(Rust)go.mod(Go)
More coming: Ruby, PHP, Java, C#
By default, MCP Standards uses Claude Sonnet for all operations. You can optionally configure it to use 99.5% cheaper models for simple operations:
- Get free API key: https://aistudio.google.com/app/apikey
- Add to your environment:
export GEMINI_API_KEY="your_key_here" # Or add to ~/.bashrc or ~/.zshrc
- Automatic routing:
- Simple operations (memory CRUD, searches) โ Gemini 1.5 Flash ($0.075/1M tokens)
- Complex operations (code generation, pattern analysis) โ Claude Sonnet ($15/1M tokens)
- 99.5% cost savings on routine operations
MCP Standards uses agentic-flow for intelligent model routing and cost optimization.
Features:
- Automatic model selection based on task complexity
- Support for 20+ AI providers (Anthropic, Google, OpenRouter, Groq, etc.)
- Fallback chains for reliability
- Token usage tracking
Learn more: agentic-flow documentation
- Self-learning pattern detection
- CLAUDE.md auto-generation
- Config file parsing
- Security enhancements (whitelist, sanitization, rate limiting, audit logs)
- 100% local with SQLite + FTS5
- Implicit rejection detection (user edits within 2 min)
- Rule violation detection (compare vs config files)
- Workflow pattern learning (test after code changes)
- Cross-project promotion (project โ global)
- MCP notifications for pattern promotions
- Team sync (share learned preferences)
- Analytics dashboard (trends, common corrections)
- Cloud backup (optional)
- Multi-project management
- Priority support
We welcome contributions! See CONTRIBUTING.md for:
- How to report bugs
- How to request features
- Development setup
- Code standards
MIT License - see LICENSE for details
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions or share ideas
- Email: matt.strautmann@gmail.com
- Python 3.10+
- SQLite with FTS5 (full-text search)
- MCP (Model Context Protocol)
- uv (fast Python package manager)
- Anthropic for Claude and MCP
- agentic-flow for intelligent model routing and cost optimization
- The open source community
- Everyone who tested early versions
Made with โค๏ธ by Matt Strautmann
Stop repeating yourself. Start using MCP Standards.
โญ Star us on GitHub if this helps you!