A Model Context Protocol (MCP) server that provides Claude Code access to project-specific Cursor rules and AGENTS.md files.
- Load and filter Cursor rules from
.cursor/rules/*.mdcfiles - Access AGENTS.md project instructions
- Smart file matching with glob patterns
- Automatic caching for performance
Prerequisites: Node.js 22+ and Claude Code CLI
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"]
}
}
}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.
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
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)# Install dependencies
pnpm install
# Run tests
pnpm test
# Build for production
pnpm buildContributions welcome! Ensure tests pass and code is formatted:
pnpm test && pnpm format