
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
An MCP Server that makes user-defined rules accessible to any AI agent. Define rules in Markdown with front-matter—extending the Cursor rules format—and agents are provided context to load the right rules at the right time.
An MCP Server that makes user-defined rules accessible to any AI agent. Define rules in Markdown with front-matter—extending the Cursor rules format—and agents are provided context to load the right rules at the right time.
With context-aware loading, tags, and file pattern support, your standards and best practices are always loaded by the agent.
The fastest way to get started is with npx. Choose your platform:
.mcp.json
file in your project directory or a global ~/.claude.json
file.{
"mcpServers": {
"rules-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "rules-mcp", "<path-to-your-rules>"]
}
}
}
~/Library/Application Support/Claude/claude_desktop_config.json
file.{
"mcpServers": {
"rules-mcp": {
"command": "npx",
"args": ["-y", "rules-mcp", "<path-to-your-rules>"]
}
}
}
.cursor/mcp.json
file in your project directory or a global ~/.cursor/mcp.json
file.{
"mcpServers": {
"rules-mcp": {
"command": "npx",
"args": ["-y", "rules-mcp", "<path-to-your-rules>"]
}
}
}
.vscode/mcp.json
file in your project directory.{
"servers": {
"rules-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "rules-mcp", "<path-to-your-rules>"]
}
}
}
After completing the setup, create a rules/
directory and add your first rule:
---
name: MARKDOWN_FORMATTING_PRINCIPLES
description: 'Preferred markdown formatting for documentation and code comments'
alwaysApply: false
tags: ['markdown', 'documentation', 'style']
globs: ['**/*.md', '**/*.{js,ts}']
---
# Markdown Formatting Principles
- Use fenced code blocks with language identifiers (e.g., `js, `ts, ```bash)
- Limit lines to 80 characters for readability
- Use `#` for top-level headings, `##` for sections, and so on
- Prefer lists for steps, options, or examples
- Add a blank line before and after code blocks and lists
- Use inline code formatting (`like this`) for code references in text
- For JSDoc or doc comments in code, use markdown features for clarity
Then work on markdown files or code files with markdown comments and observe the agent automatically load these standards.
Done!
Rules MCP automatically loads different types of rules based on context:
The agent reads your rule files and uses them to inform its responses, ensuring consistent adherence to your standards and practices.
Rules MCP offers three operational modes to suit different workflows. Most users can stick with the default minimal mode.
Uses 2 streamlined tools for efficient rule loading:
InitializeRules
for session startupQueryRules
for ongoing context loadingUses 4 individual tools for granular control:
ListAlwaysRules
, ListAgentRequestedRules
, ListGlobRules
, ListTagRules
Provides both approaches - the unified QueryRules
tool plus all individual tools as fallbacks.
The agent automatically follows the appropriate workflow based on the mode. See ARCHITECTURE.md for technical details.
Loaded automatically at session start:
---
alwaysApply: true
---
# Coding Standards
- Use consistent naming conventions
Loaded based on relevance to current tasks:
---
description: 'Code optimization for critical sections'
---
# Performance Tips
- Profile before optimizing
Loaded when working with matching files:
---
globs: ['**/*.md']
---
# Markdown Guidelines
- Use fenced code blocks with language identifiers
Loaded when working on specific topics:
---
tags: ['security', 'production']
---
# Security Practices
- Implement rate limiting
- Use HTTPS everywhere
The Rules MCP server exposes tools that AI agents use to retrieve rule metadata. The agent then reads rule files from the file system and injects their content into context.
InitializeRules
Loads foundational rules at session start.
QueryRules
Loads context-specific rules during conversation.
activeFiles
(optional): Current file pathstags
(optional): Topic tags to matchListAlwaysRules
name
and path
ListAgentRequestedRules
name
, path
, and description
ListGlobRules
activeFiles
(array of file paths)globs
ListTagRules
tags
(array of tag strings)matchedTags
# Minimal mode (default - 2-tool approach)
npx rules-mcp /path/to/rules
# Legacy mode (4 individual tools)
npx rules-mcp --mode legacy /path/to/rules
# Unified mode (5 tools - primary + granular options)
npx rules-mcp --mode unified /path/to/rules
# Show help
npx rules-mcp --help
FAQs
An MCP Server that makes user-defined rules accessible to any AI agent. Define rules in Markdown with front-matter—extending the Cursor rules format—and agents are provided context to load the right rules at the right time.
The npm package rules-mcp receives a total of 6 weekly downloads. As such, rules-mcp popularity was classified as not popular.
We found that rules-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.