- Home
- MCP servers
- RulesetMCP Server
RulesetMCP Server
- typescript
0
GitHub Stars
typescript
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"n8daniels-rulesetmcp": {
"command": "rulesetmcp",
"args": [
"--config",
"/path/to/rulesetmcp.config.json"
]
}
}
}RulesetMCP provides a grounded, project-aware rulebook for AI agents. You load your project’s rules once from version-controlled files, and every AI interaction is constrained by those rules. This keeps rewrites, refactors, and architectural decisions aligned with your established standards across sessions and tools.
How to use
You interact with an MCP client to leverage your project rules during AI-assisted work. When you ask the AI to perform a task, the MCP server can fetch the relevant rules, summarize them for the task, validate code snippets, and ensure consistency with your conventions. Typical use flows include requesting a refactor or implementation guidance, and then letting the AI receive rules filtered by area, tags, and severity to guide its response.
How to install
Prerequisites: you need Node.js installed and access to a terminal. You will install the MCP server package globally, optionally clone and build from source if you prefer a local setup.
# Prerequisites
node -v
npm -v
# Install the MCP server globally
npm install -g rulesetmcp
# Optional: clone the project and build locally
git clone https://github.com/n8daniels/RulesetMCP.git
cd RulesetMCP
npm install
npm run build
Create Config
Create a rulesetmcp.config.json in your workspace to define your projects and rule file locations.
{
"projects": [
{
"id": "my-api",
"name": "My API Project",
"paths": ["/path/to/my-api"],
"rulesPaths": ["rules/", "docs/rules/"]
}
],
"defaultProjectId": "my-api"
}
Add Rules
Create rules in Markdown or YAML inside your project. For Markdown rules, add a file like rules/RULES.md with structured sections for each rule. For YAML rules, place them under rules/*.yaml.
# Example Markdown rule (RULES.md)
# 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.
**Rationale:** Consistency improves discoverability and reduces confusion.
**Good Example:**
GET /api/v1/users POST /api/v1/orders
**Bad Example:**
GET /api/getUser POST /api/create-order `
## Configure Your MCP Client
Configure your MCP client to connect to the RulesetMCP server. You set the command and arguments that the client will run to start the MCP server. The following examples show how to configure Claude Desktop and Claude Code to load rules from your config.
Claude Desktop configuration example
{ "mcpServers": { "rulesetmcp": { "command": "rulesetmcp", "args": ["--config", "/path/to/rulesetmcp.config.json"] } } }
Claude Code configuration example
{ "mcp": { "rulesetmcp": { "command": "rulesetmcp", "args": ["--config", "/path/to/rulesetmcp.config.json"] } } }
## Use It
When you work with AI, request actions that involve rules. The AI will call get\_rules for your project and area, then apply the rules to the task or snippet. For example, you can ask the AI to refactor a SQL procedure, and it will base its approach on your SQL rules.
## Available tools
### list\_projects
Discover available projects and their rule sets.
### get\_rules
Query rules by project, area, tags, or severity.
### summarize\_rules\_for\_task
Get a task-oriented summary of relevant rules before starting work.
### validate\_snippet
Validate code snippets against project rules and get fix suggestions.
### reload\_rules
Hot-reload rules after editing files on disk.