Fetches coding rules and standards from GitHub repositories, allowing AI agents to retrieve specific rule files or browse available rules from public repositories without requiring local file storage
Agent Rules MCP Server
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.):
Example Use of Community Rules Collections
GitHub Awesome Copilot Collection
Get instant access to community-maintained coding rules:
Awesome Cursor Rules Collection
Alternative collection for cursor-specific rules:
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:
Example repository structure:
How This Helps
On-Demand Rule Access for AI Agents
Before (Traditional Approach):
After (agent-rules MCP Approach):
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):
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
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
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.
Related MCP Servers
- AsecurityFlicenseAqualityAn MCP server that enables AI assistants to manage GitHub Actions workflows by providing tools for listing, viewing, triggering, canceling, and rerunning workflows through the GitHub API.Last updated -9239
- MIT License
- -securityAlicense-qualityAn MCP server that wraps around the GitHub CLI tool, allowing AI assistants to interact with GitHub repositories through commands for pull requests, issues, and repository operations.Last updated -4MIT License
- -securityFlicense-qualityAn MCP server that enables Git repository operations and GitHub PR workflows, allowing users to manage repositories, create branches, commit changes, and create pull requests through natural language.Last updated -1