EgorKluch/mcp-global-mdc
If you are the rightful owner of mcp-global-mdc and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The MCP Global Rules Server is a Model Context Protocol server designed to manage global cursor rules files across various projects.
loadGlobalRules
Load global rules ('g-*.mdc') to a target project.
saveGlobalRules
Save global rules ('g-*.mdc') from a target project to global storage.
MCP Global Rules Server
A Model Context Protocol (MCP) server implementation for managing global cursor rules files ("g-*.mdc") across different projects.
Features
- Load Global Rules: Copy global rules from configured source to target project
- Save Global Rules: Copy global rules from target project to global storage
- Error Handling: Detailed error messages for configuration and operation issues
- JSON Configuration: Simple JSON-based configuration system
Prerequisites
- Node.js 18+
- npm or yarn package manager
Installation
- Clone or download this project
- Install dependencies:
npm install
- Configure the server by creating
config.json
file:
cp config.example.json config.json
Edit config.json
and set the path to your global rules directory:
{
"globalRulesSourceDir": "/path/to/your/project/.cursor/rules"
}
Adding MCP to Cursor
To add this MCP server to Cursor:
-
Build the project first:
npm run build
-
Open Cursor Settings:
- Go to Cursor → Settings (or press
Cmd+,
on Mac /Ctrl+,
on Windows/Linux) - Navigate to "Extensions" or search for "MCP"
- Go to Cursor → Settings (or press
-
Configure MCP:
- Find the MCP settings section
- Add a new MCP server configuration:
{ "name": "global-mdc", "command": "node", "args": ["path/to/global-mdc/dist/index.js"] }
- Replace
path/to/global-mdc
with the absolute path to this project directory
-
Restart Cursor to apply the changes
Important Notes
⚠️ After making changes to config.json
:
- Rebuild the project: Run
npm run build
- Toggle MCP in Cursor settings: Disable and then re-enable the MCP server in Cursor settings
- Restart Cursor if the changes don't take effect
This is required because the configuration is read when the server starts, and Cursor needs to restart the MCP server to pick up the new configuration.
MCP Tool Usage
The server provides two tools:
loadGlobalRules
Load global rules ("g-*.mdc") to target project.
Input Schema:
path
(string): Absolute path to target project directory that contains .cursor/rules
Output: JSON object containing:
success
(boolean): Whether operation succeedederrors
(array, optional): Array of error objects if operation failed
saveGlobalRules
Save global rules ("g-*.mdc") from target project to global storage.
Input Schema:
path
(string): Absolute path to source project directory that contains .cursor/rules
Output: Same format as loadGlobalRules
License
MIT