loading…
Search for a command to run...
loading…
Weight-On-Wheels for AI - keeps agents grounded in your project's rules. Query coding standards, validate snippets, and get task-specific guidance from version-
Weight-On-Wheels for AI - keeps agents grounded in your project's rules. Query coding standards, validate snippets, and get task-specific guidance from version-controlled rule files.
Weight-On-Wheels for AI: Keep every agent grounded in your project's rules.
RulesetMCP is a Model Context Protocol (MCP) server that gives AI agents a project-aware rulebook. Instead of explaining your coding standards, SQL conventions, or process guidelines every time you open a new AI session, you define them once in version-controlled files. RulesetMCP reads those files and exposes tools for listing, summarizing, and applying rules to specific tasks and snippets.
Right now you probably:
RulesetMCP acts like a "Weight-On-Wheels" switch for AI assistants: once your rules are loaded, every action is grounded in them. This keeps your rewrites, refactors, and new features aligned with the architecture and process decisions you've already made.
list_projectsget_rules (filter by area, tags, severity)summarize_rules_for_taskvalidate_snippetreload_rulesnpm install -g rulesetmcp
Or clone and build locally:
git clone https://github.com/n8daniels/RulesetMCP.git
cd RulesetMCP
npm install
npm run build
Create rulesetmcp.config.json in your workspace:
{
"projects": [
{
"id": "my-api",
"name": "My API Project",
"paths": ["/path/to/my-api"],
"rulesPaths": ["rules/", "docs/rules/"]
}
],
"defaultProjectId": "my-api"
}
Create rules/RULES.md in your project:
# My API - Coding Standards
## [api-naming-001] RESTful endpoint naming
**Area:** api
**Severity:** warn
**Tags:** api, rest, naming
**Description:**
All REST endpoints must use plural nouns and follow `/api/v1/{resource}` pattern.
**Good Example:**
GET /api/v1/users POST /api/v1/orders
**Bad Example:**
GET /api/getUser POST /api/create-order
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"rulesetmcp": {
"command": "rulesetmcp",
"args": ["--config", "/path/to/rulesetmcp.config.json"]
}
}
}
Claude Code (.claude/settings.json):
{
"mcp": {
"rulesetmcp": {
"command": "rulesetmcp",
"args": ["--config", "/path/to/rulesetmcp.config.json"]
}
}
}
Now when you work with AI:
You: "Refactor this SQL stored procedure to pull more data from the users table"
AI: [Calls get_rules for project="my-api", area="sql"]
AI: "Based on your project's SQL rules, I'll ensure:
- All keywords are UPPER-CASE
- Identifiers use lower_case
- Proper indexing hints are included
Here's the refactored procedure..."
RulesetMCP supports multiple formats:
## [rule-id] Rule Title
**Area:** sql
**Severity:** error
**Tags:** formatting, style
**Description:** What the rule requires
**Rationale:** Why this matters
**Good Example:**
```sql
SELECT * FROM users;
Bad Example:
select * from Users;
### YAML (rules/*.yaml)
```yaml
- id: sql-format-001
project: my-api
area: sql
title: SQL casing convention
description: All SQL must use UPPER-CASE keywords and lower_case identifiers
severity: warn
tags: [sql, style, formatting]
examples:
good: |
SELECT u.user_id FROM users u;
bad: |
select UserID from Users;
appliesTo:
- "*.sql"
- "procedures/*"
list_projectsDiscover available projects and their rule sets.
get_rulesQuery rules by project, area, tags, or severity.
validate_snippetValidate code/SQL/config against project rules and get fix suggestions.
summarize_rules_for_taskGet a task-oriented summary of relevant rules before starting work.
reload_rulesHot-reload rules after editing files on disk.
RulesetMCP embodies the "Weight-On-Wheels" principle: just like an aircraft can't ignore physics once grounded, AI agents shouldn't ignore your project's rules once RulesetMCP is enabled.
This is not just documentation - it's:
See the examples/ directory for complete sample projects:
nodejs-api/ - REST API with TypeScript standardspython-django/ - Django project with security rulesdotnet-webapi/ - .NET API with architecture patterns- id: sql-format-001
area: sql
title: SQL keyword casing
description: All SQL keywords UPPER-CASE, identifiers lower_case
severity: warn
- id: security-001
area: security
title: No hardcoded secrets
description: Use environment variables or secure vaults
severity: blocker
- id: arch-http-001
area: architecture
title: Use HttpClientFactory
description: Never instantiate HttpClient directly
severity: error
- id: migration-001
area: migration
title: Preserve backward compatibility
description: When refactoring API endpoints, maintain old routes with redirects
severity: blocker
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
npm install
npm run build
npm start
MIT License - see LICENSE
Built with ❤️ for developers tired of repeating themselves to AI
"Stop explaining. Start enforcing."
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"n8daniels-rulesetmcp": {
"command": "npx",
"args": []
}
}
}