A Model Context Protocol server for coding best practices across multiple editors (Cursor, VS Code, Claude Code, Windsurf). Supports .mdc and .cursorrules formats with 141+ rules from awesome-cursorrules.
npm install @tedweixx/mcp-coding-best-practicesA comprehensive Model Context Protocol (MCP) server that provides AI-assisted development best practices for multiple editors and frameworks. This server helps developers optimize their coding workflow with editor-specific guidance and access to 141+ curated cursor rules from the awesome-cursorrules repository.
#### Actions
| Action | Description |
|--------|-------------|
| detect_environment | Auto-detect current editor and show environment info |
| list_platforms | Show all supported platforms and their detection status |
| list_rules | List available cursor rules (141+ rules available) |
| create | Create .mdc file with selected rules and platform practices |
| response_content | Return rule content without creating files |
| update_rules | Update cursor rules from the latest repository |
#### Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| action | string | Required. Action to perform |
| platform | string | Target editor: claude-code, cursor, vscode, windsurf, auto-detect |
| rule_name | string | Specific cursor rule key (e.g., react_typescript_nextjs_nodejs) |
| auto_update | boolean | Force update cursor rules from repository |
| directory | string | Target directory (default: current directory) |
json
{
"action": "detect_environment"
}
`$3
`json
{
"action": "list_rules"
}
`$3
`json
{
"action": "list_rules",
"rule_name": "react"
}
`$3
`json
{
"action": "create",
"platform": "auto-detect",
"rule_name": "react_typescript_nextjs_nodejs"
}
`$3
`json
{
"action": "response_content",
"platform": "cursor",
"rule_name": "python_fastapi"
}
`$3
`json
{
"action": "update_rules",
"auto_update": true
}
`šØ Supported Platforms & Best Practices
$3
- Use CLAUDE.md files to provide project context
- Keep code structure clear and easy for Claude to understand
- Use descriptive variable and function names
- Add appropriate comments explaining complex logic
- Use TypeScript to provide type information
- Keep file sizes moderate, avoid overly long files
- Use consistent code style and formatting
- Structure projects with logical directory hierarchies
- Include setup instructions in CLAUDE.md for environment context$3
- Create .mdc files for project-specific AI instructions
- Use Cursor's AI code completion features effectively
- Configure Cursor's AI model preference settings
- Leverage Cursor's code explanation and refactoring suggestions
- Use Cursor's intelligent code review functionality
- Keep code context clear to help AI understanding
- Use Cursor's keyboard shortcuts for efficiency
- Reference awesome-cursorrules repository for best practices
- Set up custom rules for your specific tech stack$3
- Install and configure relevant extensions
- Use VS Code's built-in Git functionality
- Configure code formatting tools (Prettier, ESLint)
- Use VS Code's debugging features
- Configure workspace settings and tasks
- Use code snippets to improve development efficiency
- Configure appropriate themes and fonts$3
- Leverage Windsurf's AI-assisted programming features
- Use Windsurf's intelligent code generation
- Configure Windsurf's AI model settings
- Use Windsurf's code review and optimization suggestions
- Keep project structure clear for AI analysis
- Use Windsurf's collaboration features
- Configure appropriate development environment settingsš Available Cursor Rules (141+ Rules)
The server provides access to a comprehensive collection of cursor rules for various technologies:
$3
- react_typescript_nextjs_nodejs - React + TypeScript + Next.js + Node.js
- python_fastapi - Python FastAPI development
- nextjs_tailwind_typescript - Next.js + Tailwind + TypeScript
- flutter_app_expert - Flutter app development
- vue_typescript - Vue.js + TypeScript
- django_best_practices - Django Python framework
- golang_backend - Go backend development
- rust_programming - Rust development guidelines
- And 130+ more specialized rules...š Auto-Update System
The server includes an intelligent update system that:
- Clones the latest awesome-cursorrules repository
- Prevents excessive updates (24-hour cooldown)
- Maintains local cache for performance
- Provides update status and timestamps
š ļø Installation & Setup
$3
- Node.js 18+
- Git (for cursor rules updates)
- MCP-compatible client (Claude Desktop, etc.)$3
`bash
Clone the repository
git clone
cd mcp-coding-best-practicesInstall dependencies
npm installBuild the project
npm run buildRun in development mode
npm run watch
`$3
Add to your MCP client configuration:
`json
{
"mcpServers": {
"mcp-coding-best-practices": {
"command": "node",
"args": ["/path/to/mcp-coding-best-practices/build/index.js"]
}
}
}with npx
{
"mcpServers": {
"mcp-coding-best-practices": {
"command": "npx",
"args": ["-y","@tedweixx/mcp-coding-best-practices"]
}
}
}
`
š Environment Detection
The server automatically detects your development environment by checking:
- Environment variables (
TERM_PROGRAM, VSCODE_IPC_HOOK_CLI, CURSOR_IPC_HOOK_CLI)
- Available commands (code, cursor, windsurf, claude)
- Configuration file existence
- Process detectionš Project Structure
`
mcp-coding-best-practices/
āāā src/
ā āāā index.ts # Main MCP server implementation
ā āāā cursor-rules-interface.ts # Cursor rules type definitions
āāā cursor-rules-mdc/ # 141+ cursor rule files
ā āāā README.md # Rules documentation
ā āāā *.mdc # Individual rule files
āāā build/ # Compiled JavaScript
āāā package.json # Project configuration
āāā tsconfig.json # TypeScript configuration
``Contributions are welcome! This project helps developers optimize their AI-assisted coding workflow.
This project is open source. The cursor rules are sourced from the awesome-cursorrules repository.
- awesome-cursorrules - Community-curated cursor rules
- Model Context Protocol - MCP specification
- Claude Desktop - AI assistant with MCP support
---
Made for developers who want to optimize their AI-assisted coding workflow across multiple editors and frameworks.