@brutalist/mcp 0.1.3 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,83 +1,261 @@
1
- # Brutalist MCP
1
+ # Brutalist MCP 💀
2
2
 
3
- Your architecture will fail. Your startup will burn money. Your code has three unpatched CVEs.
3
+ Your startup will fail. Your architecture will collapse. Your code is a security nightmare.
4
4
 
5
- All AIs are sycophants. This one doesn't lie.
5
+ But this time, you'll know *why* before users do.
6
6
 
7
- ## brutalist workflows
7
+ ## Deploy AI Critics That Don't Lie
8
+
9
+ Every AI tells you what you want to hear. This one tells you what you need to know.
10
+
11
+ Three brutal CLI agents. Zero sugar-coating. Maximum carnage.
12
+
13
+ Three brutal CLI agents that can analyze anything. Each agent brings different perspectives to demolish your work from every angle.
14
+
15
+ Real file-system analysis. Actual brutal prompts. Intelligent pagination for enterprise codebases. No participation trophies.
16
+
17
+ ## Brutalist Workflows
18
+
19
+ ### 🔍 **Codebase Destruction**
20
+
21
+ > Analyze actual files in your repository for security holes, performance disasters, and architectural nightmares.
8
22
 
9
23
  ```bash
10
- # Destroy your architecture before users do
11
- roast_architecture "This microservices design for our startup..."
24
+ # Demolish your entire codebase
25
+ roast_codebase "/path/to/your/project"
12
26
 
13
- # Demolish your code quality with specific models
14
- roast_code(code="authentication.py", models=["google/gemini-2.5-pro", "anthropic/claude-3.5-sonnet"])
27
+ # Target specific modules for focused brutality
28
+ roast_codebase "/src/auth" # Authentication vulnerabilities
29
+ roast_codebase "/src/api/handlers" # API endpoint disasters
30
+ roast_codebase "/components" # React component chaos
31
+ ```
32
+
33
+ ---
15
34
 
16
- # Reality check your ideas with 325+ AI models
17
- roast_idea "We're building a marketplace for..."
35
+ ### 💡 **Idea Obliteration**
18
36
 
19
- # Discover available models (325+ and growing)
20
- model_roster() # Shows all available models
21
- model_roster(search="gemini") # Find specific models
37
+ > Reality-check your startup dreams, product concepts, and technical decisions.
22
38
 
23
- # Multi-model adversarial debate
24
- roast_debate "Should we use TypeScript or Go for this API?"
39
+ ```bash
40
+ # Startup idea destruction
41
+ roast_idea "A social network for developers to share code snippets"
42
+
43
+ # Technical decision analysis
44
+ roast_idea "Migrating our monolith to microservices with Kubernetes"
45
+
46
+ # Product feature validation
47
+ roast_idea "Adding AI-powered code suggestions to our IDE"
25
48
  ```
26
49
 
27
- ## setup
50
+ ---
51
+
52
+ ### 🏗️ **Architecture Annihilation**
53
+
54
+ > Find every scaling bottleneck, cost explosion, and operational nightmare in your system design.
28
55
 
29
56
  ```bash
30
- # VS Code/Cline one-liner
31
- code --add-mcp '{"name":"brutalist","command":"npx","args":["-y","@brutalist/mcp"],"env":{"OPENROUTER_API_KEY":"YOUR_KEY"}}'
57
+ # System architecture review
58
+ roast_architecture "Microservices with event sourcing and CQRS"
59
+
60
+ # Infrastructure design analysis
61
+ roast_architecture """
62
+ API Gateway → Load Balancer → 3 Node.js services → PostgreSQL
63
+ Redis for caching, Docker containers on AWS ECS
64
+ """
65
+ ```
66
+
67
+ ---
68
+
69
+ ### 🔒 **Security Demolition**
32
70
 
33
- # Claude Code
34
- claude mcp add brutalist --scope user -e OPENROUTER_API_KEY=YOUR_KEY -- npx -y @brutalist/mcp
71
+ > Expose authentication bypasses, injection vulnerabilities, and data leak opportunities.
35
72
 
36
- # Gemini CLI
37
- gemini mcp add brutalist -e OPENROUTER_API_KEY=YOUR_KEY -- npx -y @brutalist/mcp
73
+ ```bash
74
+ # Authentication system analysis
75
+ roast_security "JWT tokens with user roles in localStorage"
38
76
 
39
- # Cursor: Add to ~/.cursor/mcp.json or use Settings > MCP & Integrations
40
- # Windsurf: Add to ~/.codeium/windsurf/mcp_config.json or use Plugin Store
77
+ # API security review
78
+ roast_security "GraphQL API with dynamic queries and no rate limiting"
41
79
  ```
42
80
 
43
- **Get key**: https://openrouter.ai/keys
44
- **Models**: 325+ models dynamically fetched from OpenRouter. Always current.
81
+ ---
82
+
83
+ ### 🤺 **Multi-Agent Warfare**
45
84
 
46
- ## why
85
+ > Deploy multiple CLI agents in adversarial combat for maximum destruction.
47
86
 
48
- Every LLM defaults to "great idea!" because conflict doesn't pay. This deploys 325+ models to fight over your assumptions.
87
+ ```bash
88
+ # Technical decision debate
89
+ roast_cli_debate "Should we use TypeScript or Go for this API?"
90
+
91
+ # Architecture comparison battle
92
+ roast_cli_debate "Microservices vs Monolith for our e-commerce platform"
93
+ ```
94
+
95
+ ---
49
96
 
50
- ## model selection
97
+ ### 🛠️ **Meta Commands**
51
98
 
52
99
  ```bash
53
- # Specific models
54
- roast_code(code="...", models=["google/gemini-2.5-pro", "openai/gpt-4o"])
100
+ # Check which CLI agents are available
101
+ cli_agent_roster()
102
+ ```
103
+
104
+ ## How It Works
105
+
106
+ This MCP server orchestrates brutal feedback from locally installed CLI agents:
107
+ - **Claude Code CLI** - Anthropic's code assistant with brutal system prompts
108
+ - **Codex CLI** - OpenAI's code-focused model for technical criticism
109
+ - **Gemini CLI** - Google's model for architectural and system analysis
110
+
111
+ Each agent runs locally on your machine with custom brutal prompts to find real problems before production fails.
112
+
113
+ **⏱️ Analysis Timeout:** 25 minutes default - thorough analysis takes time to find real issues. Complex codebases and architectural reviews need deep analysis to catch subtle problems that quick scans miss.
114
+
115
+ ## Setup
116
+
117
+ ### Prerequisites
118
+
119
+ Install at least one CLI agent:
120
+ - **Claude Code**: `npm install -g claude` (or via Claude desktop app)
121
+ - **Codex**: Install from [OpenAI Codex](https://github.com/openai/codex-cli)
122
+ - **Gemini**: `npm install -g @google/gemini-cli` or authenticate via `gemini auth`
123
+
124
+ <details>
125
+ <summary><strong>Claude Code</strong> — One-liner</summary>
55
126
 
56
- # Random from 325+ models
57
- roast_idea "..." # Chaos mode
127
+ ```bash
128
+ claude mcp add brutalist --scope user -- npx -y @brutalist/mcp
129
+ ```
130
+ </details>
131
+
132
+ <details>
133
+ <summary><strong>VS Code / Cline</strong> — Manual config</summary>
134
+
135
+ ```bash
136
+ code --add-mcp '{"name":"brutalist","command":"npx","args":["-y","@brutalist/mcp"]}'
58
137
  ```
138
+ </details>
139
+
140
+ <details>
141
+ <summary><strong>Gemini CLI</strong> — One-liner</summary>
142
+
143
+ ```bash
144
+ gemini mcp add brutalist -- npx -y @brutalist/mcp
145
+ ```
146
+ </details>
147
+
148
+ <details>
149
+ <summary><strong>Cursor</strong> — Manual config</summary>
59
150
 
60
- ## tools
151
+ Add to `~/.cursor/mcp.json` or use **Settings → MCP & Integrations**
61
152
 
62
- - **`roast_idea`** — Why imagination fails to become reality
63
- - **`roast_code`** — Security holes, performance disasters, maintainability nightmares
64
- - **`roast_architecture`** — Scaling failures, cost explosions, operational complexity
65
- - **`roast_research`** — Methodological flaws, irreproducible results, statistical crimes
66
- - **`roast_data`** — Overfitting, bias, correlation fallacies
67
- - **`roast_security`** — Attack vectors, authentication bypasses, data leaks
68
- - **`roast_product`** — UX disasters, adoption barriers, user abandonment
69
- - **`roast_infrastructure`** — Single points of failure, hidden costs, 3AM outages
70
- - **`roast_debate`** — Multiple models argue until truth emerges
71
- - **`model_roster`** — Browse and search 325+ available critics
153
+ ```json
154
+ {
155
+ "brutalist": {
156
+ "command": "npx",
157
+ "args": ["-y", "@brutalist/mcp"]
158
+ }
159
+ }
160
+ ```
161
+ </details>
162
+
163
+ <details>
164
+ <summary><strong>Windsurf</strong> — Manual config</summary>
165
+
166
+ Add to `~/.codeium/windsurf/mcp_config.json` or use **Plugin Store**
167
+
168
+ ```json
169
+ {
170
+ "brutalist": {
171
+ "command": "npx",
172
+ "args": ["-y", "@brutalist/mcp"]
173
+ }
174
+ }
175
+ ```
176
+ </details>
177
+
178
+ ## 📄 Pagination Support (v0.5.0+)
179
+
180
+ Handle enterprise-scale analyses that exceed Claude Code's 25K token limit:
181
+
182
+ ```bash
183
+ # Enable pagination for large codebases
184
+ roast_codebase({targetPath: "/monorepo", limit: 20000})
72
185
 
73
- ## why this works
186
+ # Continue reading from where you left off
187
+ roast_codebase({targetPath: "/monorepo", offset: 20000, limit: 20000})
188
+
189
+ # Smart chunking preserves readability
190
+ roast_codebase({targetPath: "/complex-system", cursor: "offset:25000"})
191
+ ```
192
+
193
+ **Features:**
194
+ - **Smart Boundary Detection** - Preserves paragraphs and sentences
195
+ - **Token Estimation** - Real-time cost awareness (~4 chars = 1 token)
196
+ - **Rich Metadata** - Progress indicators and continuation instructions
197
+ - **Configurable Chunks** - 1K to 100K characters per response
198
+
199
+ ## Tools
200
+
201
+ ### Code & Architecture Analysis
202
+ | Tool | What gets destroyed | CLI Agents Used |
203
+ |------|-------------------|-----------------|
204
+ | `roast_codebase` | Security holes, performance disasters, maintainability nightmares in actual files | All available |
205
+ | `roast_file_structure` | Directory chaos, naming disasters, structural nightmares | All available |
206
+ | `roast_dependencies` | Version conflicts, security vulns, dependency hell | All available |
207
+ | `roast_git_history` | Commit disasters, branching chaos, collaboration failures | All available |
208
+ | `roast_test_coverage` | Testing gaps, quality blind spots, coverage lies | All available |
209
+
210
+ ### Conceptual Analysis
211
+ | Tool | What gets destroyed | CLI Agents Used |
212
+ |------|-------------------|-----------------|
213
+ | `roast_idea` | Why imagination fails to become reality | All available |
214
+ | `roast_architecture` | Scaling failures, cost explosions, operational complexity | All available |
215
+ | `roast_research` | Methodological flaws, irreproducible results, statistical crimes | All available |
216
+ | `roast_security` | Attack vectors, authentication bypasses, data leaks | All available |
217
+ | `roast_product` | UX disasters, adoption barriers, user abandonment | All available |
218
+ | `roast_infrastructure` | Single points of failure, hidden costs, 3AM outages | All available |
219
+
220
+ ### Meta Tools
221
+ | Tool | What it does |
222
+ |------|--------------|
223
+ | `roast_cli_debate` | Multiple CLI agents argue until truth emerges |
224
+ | `cli_agent_roster` | Shows which CLI agents are available on your system |
225
+
226
+ ## CLI Agent Selection
227
+
228
+ The system automatically detects and uses available CLI agents:
229
+
230
+ ```bash
231
+ # Use specific CLI agent
232
+ roast_codebase(targetPath="/src", preferredCLI="claude")
233
+
234
+ # Let system choose based on analysis type
235
+ roast_security "/auth/module" # Prefers Codex for security
236
+
237
+ # Force multi-agent analysis (default)
238
+ roast_idea "..." # All available agents analyze in parallel
239
+ ```
240
+
241
+ ### Smart Selection Rules
242
+
243
+ Different CLI agents excel at different analysis types:
244
+ - **Code review**: Claude > Codex > Gemini
245
+ - **Architecture**: Gemini > Claude > Codex
246
+ - **Security**: Codex > Claude > Gemini
247
+ - **Research**: Claude > Gemini > Codex
248
+
249
+ ## Why This Works
74
250
 
75
251
  **Problem:** AI optimizes for engagement, not truth.
76
- **Solution:** Deploy multiple models with conflicting incentives.
77
- **Result:** Brutal honesty before expensive failures.
252
+ **Solution:** Deploy multiple local CLI agents with adversarial perspectives.
253
+ **Result:** Brutal honesty through systematic destruction before expensive failures.
254
+
255
+ Your code will fail. Your startup will struggle. Better to learn this from brutal CLI agents than from production outages at 3AM.
78
256
 
79
- Your code will fail. Your startup will struggle. Better to learn this from AI critics than users.
257
+ The only AI that prevents disasters instead of causing them.
80
258
 
81
259
  ---
82
260
 
83
- OpenRouter API325+ models → Parallel execution → Adversarial synthesis
261
+ Local CLI agents Brutal system prompts → Parallel execution → Adversarial synthesis → Production survival
@@ -3,14 +3,20 @@ import { BrutalistServerConfig } from './types/brutalist.js';
3
3
  export declare class BrutalistServer {
4
4
  server: McpServer;
5
5
  config: BrutalistServerConfig;
6
- private openrouter;
6
+ private cliOrchestrator;
7
+ private httpTransport?;
7
8
  constructor(config?: BrutalistServerConfig);
9
+ private handleStreamingEvent;
10
+ private handleProgressUpdate;
8
11
  start(): Promise<void>;
12
+ private startStdioServer;
13
+ private startHttpServer;
9
14
  private registerTools;
10
- private executeRoast;
11
- private executeDebate;
15
+ private executeCLIDebate;
12
16
  private synthesizeDebate;
17
+ private executeBrutalistAnalysis;
13
18
  private formatToolResponse;
19
+ private formatPaginatedResponse;
14
20
  private formatErrorResponse;
15
21
  private handleToolExecution;
16
22
  }
@@ -1 +1 @@
1
- {"version":3,"file":"brutalist-server.d.ts","sourceRoot":"","sources":["../src/brutalist-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAKpE,OAAO,EACL,qBAAqB,EAItB,MAAM,sBAAsB,CAAC;AAG9B,qBAAa,eAAe;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,qBAAqB,CAAC;IACrC,OAAO,CAAC,UAAU,CAAmB;gBAEzB,MAAM,GAAE,qBAA0B;IA0BxC,KAAK;IAWX,OAAO,CAAC,aAAa;YAkTP,YAAY;YAiCZ,aAAa;IAkC3B,OAAO,CAAC,gBAAgB;IA0BxB,OAAO,CAAC,kBAAkB;IAS1B,OAAO,CAAC,mBAAmB;YAUb,mBAAmB;CAUlC"}
1
+ {"version":3,"file":"brutalist-server.d.ts","sourceRoot":"","sources":["../src/brutalist-server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAQpE,OAAO,EACL,qBAAqB,EAKtB,MAAM,sBAAsB,CAAC;AAa9B,qBAAa,eAAe;IACnB,MAAM,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,qBAAqB,CAAC;IACrC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,aAAa,CAAC,CAAgC;gBAE1C,MAAM,GAAE,qBAA0B;IAwB9C,OAAO,CAAC,oBAAoB,CAgB1B;IAEF,OAAO,CAAC,oBAAoB,CAmB1B;IAEI,KAAK;YAeG,gBAAgB;YAMhB,eAAe;IAqE7B,OAAO,CAAC,aAAa;YAqhBP,gBAAgB;IAkK9B,OAAO,CAAC,gBAAgB;YAwFV,wBAAwB;IAuFtC,OAAO,CAAC,kBAAkB;IAwD1B,OAAO,CAAC,uBAAuB;IAwE/B,OAAO,CAAC,mBAAmB;YA8Bb,mBAAmB;CAUlC"}