Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

MCPRules

MCP.Pizza Chef: bartwisch

MCPRules is a robust Model Context Protocol (MCP) server designed to manage and serve programming guidelines and coding rules. It supports flexible storage options including local file systems and GitHub repositories, allowing teams to maintain and share coding standards efficiently. MCPRules organizes rules into structured categories with key-value pairs, enabling precise filtering and access through MCP clients. By integrating with development environments, MCPRules ensures consistent application of core programming principles, code style, and formatting rules across projects, enhancing code quality and team collaboration.

Use This MCP server To

Enforce coding standards across multiple projects Serve programming guidelines to IDEs and code editors Filter and retrieve rules by category for specific contexts Integrate GitHub-hosted rules into development workflows Manage local and remote rule sets for team consistency Provide structured rule data for automated code review tools

README

MCPRules - Programming Guidelines Management Server

TypeScript MCP License: MIT

A powerful Model Context Protocol (MCP) server that manages and serves programming guidelines and rules. This server integrates with development tools to provide consistent coding standards across projects.

Features

  • Rule Management

    • Access rules via MCP tools
    • Filter rules by categories
    • Support for both local and GitHub-hosted rules
    • Structured rule format with categories and key-value pairs
  • Flexible Storage

    • Local file system support
    • GitHub repository integration
    • Markdown-based rule definitions
  • Category Organization

    • Core Programming Principles
    • Code Style and Formatting
    • Language-Specific Guidelines
    • Project Management Rules
    • Operating System Specific Rules

Installation

  1. Clone the Repository

    git clone https://github.com/yourusername/MCPRules.git
    cd MCPRules/rules-server
  2. Install Dependencies

    npm install
  3. Build the Server

    npm run build
  4. Configure Environment Variables

    export RULES_FILE_PATH=/path/to/your/rules.md
    # Optional for private GitHub repositories
    export GITHUB_TOKEN=your_github_token

Configuration

For VSCode Cline Extension

Location: ~/Library/Application Support/Windsurf/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json

{
  "mcpServers": {
    "rules": {
      "command": "node",
      "args": ["/path/to/rules-server/build/index.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

For Claude Desktop

Location: ~/Library/Application Support/Claude/claude_desktop_config.json

Usage

Available Tools

  1. Get Rules

    // Retrieve all rules or filter by category
    {
      "category": "optional-category-name"
    }
  2. Get Categories

    // List all available rule categories
    {}

Rule Format

Rules are stored in markdown files with the following structure:

#Category
key: value

Development

  • Watch Mode

    npm run watch
  • Debugging

    npm run inspector

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Credits to the original rules from Reddit discussion
  • Thanks to the Model Context Protocol community

MCPRules FAQ

How does MCPRules integrate with development tools?
MCPRules exposes programming guidelines via the MCP protocol, allowing IDEs and editors to fetch and apply rules in real time for consistent coding standards.
Can MCPRules handle rules stored in GitHub repositories?
Yes, MCPRules supports integration with GitHub-hosted markdown rule definitions, enabling centralized and version-controlled guideline management.
What formats are supported for defining rules in MCPRules?
MCPRules uses markdown-based rule definitions organized in structured categories with key-value pairs for clarity and filtering.
Is it possible to filter rules by category in MCPRules?
Yes, MCPRules allows clients to filter and access rules based on categories such as code style, core principles, and formatting.
Does MCPRules support local file system storage?
Yes, MCPRules can serve rules stored locally on the file system, providing flexibility for different team setups.
How does MCPRules ensure consistent coding standards across projects?
By serving a centralized, structured set of programming guidelines accessible via MCP clients, MCPRules enforces uniform rules across development environments.
What licensing governs MCPRules?
MCPRules is licensed under the MIT License, allowing open-source use and modification.
Can MCPRules be extended or customized?
Yes, its modular design and markdown-based rules make it adaptable to various coding standards and team requirements.