AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
MCP verified MIT Self-run

Agent Rules Mcp

mcp-4regab-agent-rules-mcp · by 4regab

MCP server that enables your agents to use coding rules from any or your GitHub repository. Instead of workspace rules files, you can now prompt agents to access the your coding rules from any repository.

No reviews yet
0 installs
40 views
0.0% view→install

Install

$ agentstack add mcp-4regab-agent-rules-mcp

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/mcp-4regab-agent-rules-mcp)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
stale · 1y ago

Declared compatibility

Claude CodeClaude DesktopCursorWindsurf

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Agent Rules Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

[](https://mseep.ai/app/4regab-agent-rules-mcp)

Agent Rules MCP Server

[](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/agent-rules-mcp) [](https://opensource.org/licenses/MIT)

This MCP server eliminates the need for local rule files in your workspace. Instead of copying coding standards into each project, you can now prompt AI agents to fetch specific coding rules or all your rules from any rules folder on a public repository or your own.

Features

  • GitHub Integration: Fetches rules from any GitHub repository
  • Simple Setup: Configure with environment variables, no local files needed
  • Configurable: Support for custom repositories, branches, and paths
  • Community Rules: Works with existing collections like awesome-cursorrules and awesome-copilot, etc.
  • Compound Extensions: Supports .chatmode.md, .prompt.md, .instructions.md files
  • Flexible Format: Supports any markdown files (.md/.mdc) with or without metadata

MCP Client Configuration (default)

Add this configuration to your MCP client (VS Code, Kiro, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "agent-rules": {
      "command": "npx",
      "args": ["-y","agent-rules-mcp@latest"],
      "env": {
        "GITHUB_OWNER": "4regab",
        "GITHUB_REPO": "agent-rules-mcp",
        "GITHUB_PATH": "rules",
        "GITHUB_BRANCH": "master"
      },
      "disabled": false
    }
  }
}

Example Use of Community Rules Collections

GitHub Awesome Copilot Collection

Get instant access to community-maintained coding rules:

{
  "mcpServers": {
    "agent-rules": {
      "command": "npx",
      "args": ["-y","agent-rules-mcp@latest"],
      "env": {
        "GITHUB_OWNER": "github",
        "GITHUB_REPO": "awesome-copilot",         
        "GITHUB_PATH": "instructions",
        "GITHUB_BRANCH": "main"
      },
      "disabled": false
    }
  }
}

Awesome Cursor Rules Collection

Alternative collection for cursor-specific rules:

{
  "mcpServers": {
    "agent-rules": {
      "command": "npx",
      "args": ["-y","agent-rules-mcp@latest"],
      "env": {
         "GITHUB_OWNER": "PatrickJS",
         "GITHUB_REPO": "awesome-cursorrules",
         "GITHUB_PATH": "rules-new",
         "GITHUB_BRANCH": "main"
         }
       }
     }
   }

Available Tools

  • get_rules: Retrieves rule content for one or multiple domains from the GitHub repository rules folder.
  • list_rules: Lists all available rule domains with descriptions.

Using Your Own Rules Folder Repository (Recommended)

To use your own GitHub repository instead of the default:

{
  "mcpServers": {
    "agentrules": {
      "command": "npx",
      "args": ["-y","agent-rules-mcp@latest"],
      "env": {
        "GITHUB_OWNER": "your-username",
        "GITHUB_REPO": "your-rules-repo",
        "GITHUB_PATH": "your-rules-folder",
        "GITHUB_BRANCH": "main"
      },
      "disabled": false
    }
  }
}

Example repository structure:

my-coding-rules/
├── rules/                       # Traditional single directory
│   ├── python-style.md          # Standard markdown with metadata
│   ├── react-patterns.mdc       # MDC format supported
│   └── security-checklist.md    # With YAML frontmatter
├── README.md
└── .gitignore

How This Helps

On-Demand Rule Access for AI Agents

Before (Traditional Approach):

my-project/
├──rules                  ← Local rule files needed
│   ├── react-rules.md
│   ├── security-rules.md
│   └── typescript-rules.md
├── src/
└── package.json

After (agent-rules MCP Approach):

my-project/
├── src/
└── package.json          ← Clean workspace, no local rules needed

# In Coding Agent:
"Apply React best practices to this component"
→ Agent automatically fetches React rules from your rules folder

Flexible Support & File Format Compatibility

The server works with various file formats and naming conventions:

Supported Extensions:

  • .md - Standard markdown files
  • .mdc - MDC (Markdown Components) files
  • .chatmode.md - AI assistant mode definitions
  • .prompt.md - Prompt templates
  • .instructions.md - Coding instruction files

Automatic Metadata Extraction: If no explicit metadata is provided, the server will:

  • Extract the first heading as a title
  • Use the first paragraph as a description
  • Generate a fallback description based on the filename
  • Parse YAML frontmatter when available

Domain Name Handling:

  • accessibility.chatmode.md → domain: accessibility
  • react-best-practices.instructions.md → domain: react-best-practices
  • 4.1-Beast.chatmode.md → domain: 4.1-Beast (supports dots and special chars)

This means you can use any existing markdown documentation as rules without modification.

Contributing

We welcome contributions to the default rule repository!

  • Clear Domain Names: Use descriptive, kebab-case filenames
  • Complete Metadata: Include description and last updated date
  • Quality Content: Provide actionable, well-organized rules with examples
  • Test Locally: Verify your rules work with the MCP server
  • Follow Format: Use standard markdown structure

Recommended Structure (for optimal metadata extraction):

# Title of the coding rules

- Last Updated: YYYY-MM-DD
- Description: Brief description of the rules (used in list_rules() responses)
- Version: X.X (optional, for tracking major changes)

## Content 

Made with Kiro for Code-with-kiro-hackathon.

License

MIT License - see LICENSE file for details.

Support

  • Issues: Report bugs and feature requests on GitHub Issues
  • Documentation: Check this README and inline code documentation

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.