Claude Critical Rules MCP Server

Claude Critical Rules MCP Server

Enforces 21 critical rules derived from 96+ documented failure patterns to prevent common AI assistant mistakes. Provides automatic compliance checklists, rule summaries, and auto-updates.

Category
访问服务器

README

Claude Critical Rules MCP Server

MCP server providing automatic enforcement of 21 critical rules for Claude AI, based on 96+ documented failure patterns

npm version License: MIT Version

🎯 What is this?

An MCP (Model Context Protocol) server that makes critical best practices automatically available to Claude AI in every conversation. Based on exhaustive analysis of 96+ real documented failures over 6+ months of intensive production usage.

The system provides 21 numbered rules organized into 5 categories, with automatic verification checklists, rule summaries, and auto-update capabilities.

✨ Features

  • 21 Critical Rules - Comprehensive checklist preventing common AI assistant failures
  • 5 Rule Categories - Organized by: Verification, Backups, Execution, Database, Advanced
  • Pre-flight Verification - Mandatory checklist before technical tasks
  • Auto-Update System - Check and install rule updates from GitHub automatically
  • Version Tracking - SHA256 verification and changelog integration
  • Evidence-based - Every rule derived from real production failures

⚡ Quick Install

Via npx (Recommended)

Add to your claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "critical-rules": {
      "command": "npx",
      "args": ["-y", "@optima-quantum/claude-critical-rules-mcp-new"]
    }
  }
}

Via Global Install

npm install -g @optima-quantum/claude-critical-rules-mcp-new

Then configure:

{
  "mcpServers": {
    "critical-rules": {
      "command": "claude-critical-rules-mcp"
    }
  }
}

Restart Claude Desktop

After configuration, restart Claude Desktop to load the MCP server.

📋 Usage Instructions

CRITICAL: Two Mandatory Steps Before Any Technical Task

1. ALWAYS Read, Understand, and Execute Compliance Check

Before starting ANY technical task, execute:
critical-rules:verify_compliance

This displays a 21-point checklist organized in 5 categories.
Do NOT proceed until you confirm ALL 21 items.

2. ALWAYS Read Appropriate Skill Documentation

Before creating documents or working with specific technologies:
- Read the appropriate skill file first
- Common location: /mnt/skills/user/sysadmin-professional/SKILL.md
- If skill doesn't exist: search online, verify reliability, propose installation

Example Workflow:

User: "Deploy the new API to production"

Claude:
1. Executes: critical-rules:verify_compliance
2. Reviews all 21 rules checklist
3. Reads: /mnt/skills/user/sysadmin-professional/SKILL.md
4. THEN proceeds with deployment

🛠️ Available Tools

verify_compliance

Displays mandatory 21-rule checklist before technical tasks.

Usage:

critical-rules:verify_compliance
task_description: "Deploy API to production"

Returns:

  • 21-point checklist organized by category
  • Rule numbers and descriptions
  • Confirmation requirements
  • Version information

get_rules_summary

Quick reference of all 21 rules with descriptions.

Usage:

critical-rules:get_rules_summary

Returns:

  • Core principles (5 items)
  • All 21 rules by category
  • 6-step mandatory workflow
  • Update instructions

get_version_info

Display current version and check for updates.

Usage:

critical-rules:get_version_info
check_remote: true  // Optional, default true

Returns:

  • Current version details
  • Remote version comparison
  • Update availability status
  • SHA256 hash information

check_for_updates

Check GitHub for new rule versions.

Usage:

critical-rules:check_for_updates

Returns:

  • Update availability status
  • Version comparison
  • Release date
  • Changelog reference

update_rules

Download and install latest rules from GitHub.

Usage:

critical-rules:update_rules
force: false  // Optional, force reinstall

Returns:

  • Update status
  • SHA256 verification
  • Backup location
  • Next steps

📚 Available Resources

critical-rules://instructions

Complete CRITICAL-RULES.md document with all 21 rules, examples, and detailed explanations.

critical-rules://changelog

Full changelog with version history and update details.

📖 The 21 Rules (Quick Reference)

🔍 VERIFICATION (Rules 0-5)

  1. Never act without reading instructions completely
  2. Search current best practices (web_search mandatory)
  3. Read skills before creating documents
  4. Read ENTIRE file before modifying
  5. VERIFY, not assume structures/locations
  6. Check correct file/server

💾 BACKUPS & PERMISSIONS (Rules 6-8)

  1. Search previous context if mentioned
  2. Backups with timestamp in standardized directories
  3. ASK before deleting/modifying critical items

🔧 EXECUTION & VALIDATION (Rules 9-12)

  1. Ask SCOPE before implementing
  2. STOP if something fails (no cascading)
  3. Validate with EVIDENCE
  4. Complete logs (not just last 20 lines)

🗃️ DATABASE & SECURITY (Rules 13-15)

  1. Database: backup → test → verify rollback
  2. Production vs Dev differentiation
  3. Security verification (IPs, fail2ban, firewall)

⚡ ADVANCED RULES (Rules 16-21)

  1. Long commands (>30s) → background execution
  2. NEVER use sed (python/awk/perl instead)
  3. Verify file line count before/after editing
  4. Follow instructions EXACTLY
  5. Check MCPs/skills/context FIRST
  6. Mandatory 21-point confirmation

🎯 Core Principles

  1. 🔍 VERIFY, DON'T ASSUME - Always check before acting
  2. 💾 BACKUP EVERYTHING - Before any modification
  3. 🚫 ASK PERMISSION - For deletions and critical changes
  4. 📊 EVIDENCE-BASED - Test with proof, not assumptions
  5. 🛑 STOP ON ERRORS - Don't continue after failures

🔄 6-Step Mandatory Workflow

  1. Ask scope before starting
  2. Analyze completely
  3. Plan and explain
  4. Create backups
  5. Execute carefully
  6. Validate with evidence
  7. Document changes

📊 Evidence Base

Based on comprehensive analysis of:

  • 96+ documented failures in production environments
  • 20+ recurring patterns identified and categorized
  • 6+ months of intensive Claude AI usage
  • Multiple production systems (servers, databases, APIs, deployments)

🔐 Auto-Update Security

  • SHA256 verification - All downloaded rules verified for integrity
  • Automatic backups - Previous versions saved before updates
  • Version tracking - Complete changelog and version history
  • Manual override - Force parameter for explicit reinstalls

🤝 Contributing

Contributions are welcome! If you've identified additional failure patterns or improvements:

  1. Fork the repository
  2. Create a feature branch
  3. Document the failure pattern with examples
  4. Submit a pull request

📄 License

MIT License - See LICENSE file for details.

🏢 Author

Óptima Quantum Services FZCO
Dubai, UAE

📝 Changelog

See CHANGELOG.md for version history and updates.

🔗 Links

⭐ Star History

If this MCP server has helped prevent errors in your workflow, please consider starring the repository!


Version: 1.2.0
Last Updated: 2026-01-10
Rules Count: 21 numbered rules
Failure Patterns Analyzed: 96+

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选