home / mcp / mcprules - programming guidelines management server
An MCP server that manages and serves programming guidelines and rules from local or GitHub sources.
Configuration
View docs{
"mcpServers": {
"bartwisch-mcprules": {
"command": "node",
"args": [
"/path/to/rules-server/build/index.js"
],
"env": {
"GITHUB_TOKEN": "YOUR_GITHUB_TOKEN",
"RULES_FILE_PATH": "(/path/to/your/rules.md)"
}
}
}
}You run a dedicated MCP server that organizes, serves, and enforces programming guidelines and rules across your projects. It connects with development tools to ensure consistent coding standards, supports local and GitHub-hosted rule sources, and lets you filter guidance by category for quick access during coding and reviews.
You interact with the MCP server through an MCP client to retrieve rules and lists of categories. To get guidance, request rules and choose a category to filter the results. This server exposes two primary capabilities: Get Rules, which returns applicable guidelines, and Get Categories, which lists all available rule groups.
Prerequisites: ensure you have Node.js and npm installed on your system.
# Clone the MCPRules project
git clone https://github.com/yourusername/MCPRules.git
cd MCPRules/rules-server
# Install dependencies
npm install
# Build the server
npm run build
# Set required environment variables for rule sources
export RULES_FILE_PATH=/path/to/your/rules.md
# Optional for private GitHub repositories
export GITHUB_TOKEN=your_github_tokenConfigure the MCP client integration for your development environment to point at the built server entry. The following example shows how to wire the server into a local tool that expects an executable to provide rules.
{
"mcpServers": {
"rules": {
"command": "node",
"args": ["/path/to/rules-server/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}Place this configuration in the Cline extension settings to enable the MCP Rules server integration.
{
"mcpServers": {
"rules": {
"command": "node",
"args": ["/path/to/rules-server/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}Rules are defined in Markdown files with a simple structure that maps a category to key-value pairs. You can expand, edit, or add new rules by placing them under the appropriate category.
Development tasks include running in watch mode for automatic rebuilds and debugging when needed.
npm run watch
npm run inspectorContribute by forking, creating a feature branch, and submitting a pull request with your changes. This encourages a community-driven growth of the rule set.
This project is licensed under the MIT License.
Thanks to contributors and the MCP community for shaping reusable guidelines that improve code quality across projects.
Two variables are commonly used to locate and access rule sources. Define them in your environment when running the server.
export RULES_FILE_PATH=/path/to/your/rules.md
export GITHUB_TOKEN=your_github_tokenRetrieve all rules or filter by category to obtain guidance aligned with your current context.
List all available rule categories to understand the scope of guidance you can apply.