
Agent Rules
Fetches coding rules and best practices directly from GitHub repositories during conversations, eliminating the need to store rule files locally in your projects.
Fetches coding rules and best practices on-demand from GitHub repositories, providing remote access to development standards with intelligent caching and support for multiple file formats without requiring local rule files.
What it does
- Fetch coding standards from any GitHub repository
- Access community rule collections like awesome-cursorrules
- Cache rules intelligently for performance
- Support multiple markdown formats (.md, .mdc, .prompt.md)
- Configure custom repositories, branches, and paths
Best for
About Agent Rules
Agent Rules is a community-built MCP server published by 4regab that provides AI assistants with tools and capabilities via the Model Context Protocol. Access clean code rules and best practices on-demand from GitHub with Agent Rules—no local files needed, supports many f It is categorized under developer tools.
How to install
You can install Agent Rules in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Agent Rules is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
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.):
{
"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:accessibilityreact-best-practices.instructions.md→ domain:react-best-practices4.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
Alternatives
Related Skills
Browse all skillsAnswer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".
Integrate Vercel AI SDK applications with You.com tools (web search, AI agent, content extraction). Use when developer mentions AI SDK, Vercel AI SDK, generateText, streamText, or You.com integration with AI SDK.
Comprehensive CrewAI framework guide for building collaborative AI agent teams and structured workflows. Use when developing multi-agent systems with CrewAI, creating autonomous AI crews, orchestrating flows, implementing agents with roles and tools, or building production-ready AI automation. Essential for developers building intelligent agent systems, task automation, and complex AI workflows.
Edit opencode.json, AGENTS.md, and config files. Use proactively for provider setup, permission changes, model config, formatter rules, or environment variables. Examples: - user: "Add Anthropic as a provider" → edit opencode.json providers, add API key baseEnv var, verify with opencode run test - user: "Restrict this agent's permissions" → add permission block to agent config, set deny/allow for tools/fileAccess - user: "Set GPT-5 as default model" → edit global or agent-level model preference, verify model name format - user: "Disable gofmt formatter" → edit formatters section, set languages.gofmt.enabled = false
This is the required documentation for agents operating on the CloudBase Relational Database. It lists the only four supported tools for running SQL and managing security rules. Read the full content to understand why you must NOT use standard Application SDKs and how to safely execute INSERT, UPDATE, or DELETE operations without corrupting production data.
Integrate Claude Agent SDK with You.com HTTP MCP server for Python and TypeScript. Use when developer mentions Claude Agent SDK, Anthropic Agent SDK, or integrating Claude with MCP tools.
