@fjlaubscher/agent-rules-mcp
v0.4.1
Published
MCP server for retrieving and managing Cursor rules and AGENTS.md files
Maintainers
Readme
Agent Rules MCP Server
A Model Context Protocol (MCP) server that provides Claude Code access to project-specific Cursor rules and AGENTS.md files.
Features
- Load and filter Cursor rules from
.cursor/rules/*.mdcfiles - Access AGENTS.md project instructions
- Smart file matching with glob patterns
- Automatic caching for performance
Installation
Prerequisites: Node.js 22+ and Claude Code CLI
Option 1: Project-Level (Recommended)
npm install -D @fjlaubscher/agent-rules-mcpCreate .mcp.json in your project root:
{
"mcpServers": {
"agent-rules": {
"command": "node",
"args": ["./node_modules/@fjlaubscher/agent-rules-mcp/dist/index.js"]
}
}
}Option 2: Global Configuration
Add to Claude Code's mcp-settings.json:
{
"mcpServers": {
"agent-rules": {
"command": "npx",
"args": ["@fjlaubscher/agent-rules-mcp"]
}
}
}Note: Restart Claude Code after configuration changes.
Usage
The server automatically detects and provides access to existing project conventions:
- Cursor Rules: If you have
.cursor/rules/*.mdcfiles, they'll be available with glob pattern matching - AGENTS.md: If you have
AGENTS.mdfiles (at project root or directory level), they'll be accessible
Adding MCP Tools to Your CLAUDE.md
To help Claude Code use these tools automatically, add this to your project's CLAUDE.md:
## Available MCP Tools
- Use `load_cursor_rules` and `get_cursor_rules` for Cursor rules (if present)
- Use `get_agents` for AGENTS.md instructions (searches current directory up to project root)Development
# Install dependencies
pnpm install
# Run tests
pnpm test
# Build for production
pnpm buildContributing
Contributions welcome! Ensure tests pass and code is formatted:
pnpm test && pnpm format