MCP HubMCP Hub
bartwisch

MCPRules

by: bartwisch

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.

17created 17/12/2024
Visit
Protocol
Guidelines

📌Overview

Purpose: To provide a centralized server that manages and serves programming guidelines and rules, ensuring consistent coding standards across various development projects.

Overview: MCPRules integrates with development tools to allow teams to access and enforce programming rules effectively. This server supports both local and GitHub-hosted rule sets, offering flexibility and ease of access to coding standards organized in a structured format.

Key Features:

  • Rule Management: Facilitates access to programming rules through MCP tools with the ability to filter rules by categories and supports various rule hosting options.

  • Flexible Storage: Offers support for local file system storage and GitHub repository integration, enabling markdown-based rule definitions for easy management and updates.

  • Category Organization: Organizes rules into clear categories such as core programming principles, code style, language-specific guidelines, and project management rules, facilitating quick retrieval and reference for developers.


MCPRules - Programming Guidelines Management Server

MCPRules is a Model Context Protocol (MCP) server designed to manage and serve programming guidelines and rules, integrating with development tools to ensure 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
  • 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

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

    {
      "category": "optional-category-name"
    }
    
  2. Get 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 discussions.
  • Thanks to the Model Context Protocol community.