Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mirdanwrite a secure user authentication endpoint in Python"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mirdan
AI Code Quality Orchestrator - Automatically transforms developer prompts into high-quality, structured requests that maximize AI coding assistant capabilities.
The Problem
AI coding assistants produce "slop" not because the models are incapable, but because developers provide prompts that lack context, structure, and quality constraints. Research shows properly structured prompts achieve 15-74% better results.
The Solution
Mirdan is an MCP server that intercepts prompts, automatically enhances them with quality requirements, codebase context, and architectural patterns, then intelligently orchestrates other available MCPs to ground the AI in reality.
Features
Intent Analysis: Classifies task type (generation, refactor, debug, review, test)
Quality Injection: Applies language-specific coding standards and security requirements
Prompt Composition: Structures prompts using proven frameworks (Role/Goal/Constraints)
MCP Orchestration: Recommends which tools to use for context gathering
Verification Checklists: Generates task-specific verification steps
Installation
Prerequisites
Python 3.11 or higher
uv (recommended) or pip
From PyPI (Recommended)
From Source (Development)
Quick Start
Next steps: See the Claude Code Integration section below for automatic orchestration setup.
For other MCP clients (Cursor, Claude Desktop), see MCP Configuration Reference.
Claude Code Integration
Claude Code provides multiple integration points for maximizing mirdan's effectiveness. This section covers all available methods from simple to advanced.
Automatic Orchestration
Mirdan works best when it automatically enhances every coding task. Claude Code offers several integration levels:
Level | Method | Effort | Enforcement |
Basic | CLAUDE.md | Copy-paste | Soft (instructions) |
Standard | CLAUDE.md + Slash Commands | Copy-paste | Medium (explicit trigger) |
Advanced | CLAUDE.md + Hooks | Configuration | Hard (automatic checks) |
Enterprise | Managed Settings + Hooks | IT deployment | Mandatory |
Level 1: CLAUDE.md Instructions (Recommended Start)
Add these instructions to your project's CLAUDE.md file. Claude will automatically follow them for all coding tasks.
File location: ./CLAUDE.md (project) or ~/.claude/CLAUDE.md (global)
Level 2: Slash Commands (Explicit Control)
Create custom slash commands for different workflows. Slash commands provide explicit triggers with full context.
/code - General Coding Tasks
File: .claude/commands/code.md
Usage:
/debug - Debugging Tasks
File: .claude/commands/debug.md
/review - Code Review
File: .claude/commands/review.md
Level 3: Hooks (Automatic Enforcement)
Hooks provide automatic enforcement without requiring explicit commands. They run before or after specific tool calls.
Pre-Implementation Reminder
Reminds to use mirdan before writing code. Add to .claude/settings.json:
Post-Implementation Validation Gate
Automatically prompts for validation after code changes:
Combined Hooks Configuration
File: .claude/settings.json
Level 4: Project Rules (Path-Specific Enforcement)
Use .claude/rules/ for path-specific quality requirements.
Security-Critical Paths
File: .claude/rules/security.md
API Code Rules
File: .claude/rules/api.md
Project Settings
Configure mirdan-related settings in .claude/settings.json:
Enterprise Deployment
For organization-wide mirdan enforcement, IT can deploy managed configuration.
Managed MCP Configuration
File (macOS): /Library/Application Support/ClaudeCode/managed-mcp.json
File (Linux): /etc/claude-code/managed-mcp.json
File (Windows): C:\Program Files\ClaudeCode\managed-mcp.json
Managed Settings (Enforcement)
File: Same paths as above, but managed-settings.json
Which Approach Should I Use?
Scenario | Recommended Setup |
Individual developer, trying mirdan | Level 1 (CLAUDE.md only) |
Individual developer, daily use | Level 1 + Level 2 (CLAUDE.md + slash commands) |
Team project | Level 1 + Level 3 (CLAUDE.md + hooks) |
Security-sensitive project | All levels including path-specific rules |
Enterprise/regulated environment | Level 4 (managed settings + hooks) |
Recommended progression:
Start with CLAUDE.md (copy-paste, immediate benefit)
Add
/codeslash command for explicit controlAdd hooks when you want automatic enforcement
Add path-specific rules for security-critical code
Cursor: Project Rules (Cursor 2.2+)
Cursor's Project Rules provide persistent instructions that activate automatically based on what you're doing. mirdan leverages this for invisible quality orchestration - you just code normally, mirdan handles the rest.
Quick Start: AGENTS.md
For immediate setup, create AGENTS.md in your project root:
Full Integration: Granular Project Rules
For teams and power users, create focused rules in .cursor/rules/. Each rule uses the RULE.md format with YAML frontmatter.
.cursor/rules/mirdan-code-quality/RULE.md - Auto-attaches on code files:
.cursor/rules/mirdan-debug/RULE.md - For Debug Mode (Cursor 2.2):
.cursor/rules/mirdan-security/RULE.md - Auto-attaches on auth/security paths:
How Rules Activate
Your Action | Rule That Activates | Why |
Edit | mirdan-code-quality | Glob matches |
Edit | mirdan-code-quality + mirdan-security | Matches |
Say "debug this error" | mirdan-debug | Description matches intent |
Plan an implementation | mirdan-code-quality (on execution) | Applies when code is written |
Cursor 2.2 Feature Integration
Debug Mode: mirdan augments Cursor's hypothesis-driven debugging. analyze_intent classifies the bug, validate_code_quality ensures fixes don't introduce new vulnerabilities.
Plan Mode: When using Plan Mode with Mermaid diagrams, enhance_prompt at planning stage surfaces security considerations. When delegating steps to parallel agents, each follows mirdan-code-quality.
Multi-Agent Judging: When Cursor evaluates parallel agent runs, mirdan validation results inform which solution is "best" - quality-validated code wins.
Background Agents: mirdan rules provide guardrails for autonomous agents running in the background, ensuring quality even without human oversight.
Which Approach to Use?
Approach | Best For |
AGENTS.md | Quick start, individual developers, trying mirdan out |
Project Rules | Teams, production projects, fine-grained control |
Both | AGENTS.md baseline + specific rules for security paths |
Recommended: Start with AGENTS.md for immediate benefit. Add granular Project Rules as your team's needs grow.
Available Tools
enhance_prompt
Automatically enhance a coding prompt with quality requirements and tool recommendations.
analyze_intent
Analyze a prompt without enhancement to understand the detected intent.
get_quality_standards
Retrieve quality standards for a language/framework combination.
suggest_tools
Get recommendations for which MCP tools to use.
get_verification_checklist
Get a verification checklist for a specific task type (generation, refactor, debug, review, test).
validate_code_quality
Validate generated code against quality standards. Checks for security issues, architecture patterns, and language-specific style violations.
MCP Configuration Reference
Mirdan works with any MCP-compatible client. This section provides quick configuration for each client.
Note: For Claude Code users, see the comprehensive Claude Code Integration section above for advanced setup including hooks, slash commands, and enterprise deployment.
Claude Code (Quick Reference)
CLI setup (recommended):
Or manual configuration:
Scope | File |
Project (team-shared) |
|
User (personal) |
|
Claude Desktop
File locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Configuration:
Cursor
File locations:
Global:
~/.cursor/mcp.jsonProject:
.cursor/mcp.json
Configuration:
UI setup: File → Preferences → Cursor Settings → MCP
From Source (Development)
If running from a local clone instead of PyPI:
Configuration
Create a .mirdan/config.yaml in your project:
Troubleshooting
Server Not Connecting
Check uvx is available:
uvx --versionTest server manually:
uvx mirdan # Should start without errors, waiting for MCP protocolCheck server status in Claude Code:
/mcp
Debug Logging
Enable verbose output for troubleshooting:
Common Issues
Issue | Solution |
| Install uv: |
Server starts but no tools appear | Restart Claude Code after config changes |
Python version error | Ensure Python 3.11+ is installed |
Development
License
MIT