Clean Architecture Mcp Server — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Clean Architecture Mcp Server (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Model Context Protocol Server for scaffolding and managing Clean Architecture in Next.js projects.
This MCP Server provides 3 powerful tools:
# From the mcp-server directory
cd mcp-server
npm install
npm run build
npm link
# Now available globally as 'clean-architecture-mcp'cd mcp-server
npm install
npm run buildAdd to your MCP configuration file:
Mac/Linux: ~/.config/cursor/mcp.json or ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Cursor\mcp.json or %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"clean-architecture": {
"command": "node",
"args": ["/absolute/path/to/mcp-server/dist/index.js"]
}
}
}Or if globally installed:
{
"mcpServers": {
"clean-architecture": {
"command": "clean-architecture-mcp"
}
}
}After configuration, restart Cursor or Claude Desktop to load the MCP server.
Initialize Clean Architecture in your Next.js project:
In Cursor chat:
Use the clean-architecture MCP server to initialize the project structureWith parameters:
Use clean-architecture to initialize with features: products, orders, customersWhat it does:
Generate a complete feature:
In Cursor chat:
Use clean-architecture to create a "products" featureWhat it creates:
src/domain/products/
├── models/product.ts # Zod schema
├── business-rules/ # Pure business logic
├── services/product-service.ts # Use cases
└── ports/product-repository.ts # Interface
src/infra/adapters/
└── product-repository.prisma.ts # Implementation
src/app/api/products/
├── route.ts # GET, POST
└── [id]/route.ts # GET, DELETECheck for architecture violations:
In Cursor chat:
Use clean-architecture to validate the projectWhat it checks:
Output:
{
"success": true,
"score": 100,
"issues": [],
"warnings": [],
"message": "✅ Architecture validation passed!"
}User: Initialize Clean Architecture in this Next.js project with features: users, products, orders
AI: [Uses initialize_clean_architecture tool]
Result:
✅ Created 45 directories
✅ Created 6 README files
✅ Updated tsconfig.json
✅ Ready to develop!User: Create a "products" feature with fields: name, price, stock
AI: [Uses create_feature tool with featureName: "products"]
Result:
✅ Created models/product.ts
✅ Created business rules
✅ Created service layer
✅ Created repository port
✅ Created Prisma adapter
✅ Created API routesUser: Check if my architecture follows Clean Architecture principles
AI: [Uses validate_architecture tool]
Result:
❌ Found 2 issues:
- src/domain/users/services/create-user.ts: Contains Next.js import
- src/domain/products/models/product.ts: Direct Prisma import
Score: 60/100# Install dependencies
npm install
# Build
npm run build
# Watch mode (during development)
npm run dev
# Test the server
node dist/index.jsParameters:
targetDir (optional): Target directory (default: current directory)features (optional): Array of feature names (default: ['users', 'auth', 'payments'])Returns:
{
success: boolean;
message: string;
created: number;
directories: string[];
features: string[];
}Parameters:
featureName (required): Feature name in kebab-casetargetDir (optional): Target directory (default: current directory)fields (optional): Custom model fieldsReturns:
{
success: boolean;
message: string;
feature: string;
created: string[];
}Parameters:
targetDir (optional): Directory to validate (default: current directory)Returns:
{
success: boolean;
score: number;
issues: string[];
warnings: string[];
message: string;
}dist/index.jsHelp > Show LogsIf globally installed:
npm link
# Verify
which clean-architecture-mcpnpm run build
# Check for compilation errorsCheck that you're in a Next.js project directory with package.json.
To publish to npm:
npm publishThen users can install globally:
npm install -g clean-architecture-mcp-serversrc/index.tsnpm run build && node dist/index.jsMIT
Made with ❤️ for Clean Architecture enthusiasts
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.