RulesetMCP is a Model Context Protocol (MCP) server designed to provide AI agents with project-aware rulebooks, like the AI's "Weight-On-Wheels," ensuring that every operation is based on project rules. It solves the problem of repeatedly explaining coding standards, SQL conventions, or process guidelines to AI, letting you define rules once in version-controlled files and have AI automatically read and apply them.
Main capabilities:
- Project discovery: list available projects and their rulesets via list_projects.
- Rule loading: load structured rules from Markdown (RULES.md) and YAML files.
- Context queries: use get_rules to filter and query rules by project, domain, tag, or severity.
- Task-oriented summaries: get a task-oriented summary of relevant rules before starting work via summarize_rules_for_task.
- Snippet validation: use validate_snippet to validate code, SQL, or configuration against project rules and get fix suggestions.
- Hot reload: hot reload rules after editing disk files via reload_rules.
- Broad compatibility: compatible with Claude Code, Claude Desktop, and any MCP-supporting client via the MCP protocol.
Usage:
- Get and build: clone from GitHub and build locally (https://github.com/n8daniels/RulesetMCP)。
- Create configuration: create rulesetmcp.config.json in the workspace.
- Define rules: create a rules/RULES.md file in the project (Markdown and YAML formats are supported).
- Configure the MCP client: configure it in Claude Desktop's claude_desktop_config.json or Claude Code's .claude/settings.json. After configuration, when collaborating with AI, the AI will perform operations based on the loaded rules.
Applicable scenarios:
- Projects that need unified SQL standardization, security guardrails, architectural patterns, or migration rules.
- Developers using MCP-compatible AI tools such as Claude Code and Claude Desktop who want to reduce repeated explanations of project conventions.
- Teams that need rules version-controlled alongside code and machine-readable and queryable.
Limitations and notes:
- No specific pricing or fee information is provided in the materials.
- The project uses the MIT license; see the LICENSE file for details.
- The current feature roadmap includes: Phase 1 core MCP server and basic tools; Phase 2 multi-format rule loading (Markdown, YAML); Phase 3 advanced validation and pattern matching; Phase 4 LLM-assisted rule violation detection; Phase 5 VSCode extension for inline hints; Phase 6 pre-commit hooks and CI/CD integration; as well as community rule packs (OWASP, Google Style Guide, etc.).
- Example projects are located in the examples/ directory, including nodejs-api/ (TypeScript standards), python-django/ (security rules), and dotnet-webapi/ (architectural patterns).
- Contributions are welcome; please see CONTRIBUTING.md.
- Issue feedback:https://github.com/n8daniels/RulesetMCP/issues;讨论:https://github.com/n8daniels/RulesetMCP/discussions;MCP Community:https://discord.gg/anthropic。