MCPRules 是一个强大的模型上下文协议(MCP)服务器,用于管理和提供编程指南与规则。它能与开发工具集成,助力项目实现一致的编码标准。
git clone https://github.com/yourusername/MCPRules.git
cd MCPRules/rules-server
npm install
npm run build
export RULES_FILE_PATH=/path/to/your/rules.md
# 可选,用于私有GitHub仓库
export GITHUB_TOKEN=你的_github_token
位置: ~/Library/Application Support/Windsurf/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json
{
"mcpServers": {
"rules": {
"command": "node",
"args": ["/path/to/rules-server/build/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}
位置: ~/Library/Application Support/Claude/claude_desktop_config.json
// 获取所有规则或按类别过滤
{
"category": "optional-category-name"
}
// 列出所有可用的规则类别
{}
规则存储在Markdown文件中,具有以下结构:
#Category
key: value
npm run watch
npm run inspector
git checkout -b feature/AmazingFeature)git commit -m 'Add some AmazingFeature')git push origin feature/AmazingFeature)本项目在MIT许可证下授权 - 有关详细信息,请参阅LICENSE文件。