@vibekiln/cutline-mcp-cli 0.1.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/Dockerfile +11 -0
- package/README.md +248 -0
- package/dist/auth/callback.d.ts +6 -0
- package/dist/auth/callback.js +97 -0
- package/dist/auth/keychain.d.ts +3 -0
- package/dist/auth/keychain.js +16 -0
- package/dist/commands/init.d.ts +4 -0
- package/dist/commands/init.js +309 -0
- package/dist/commands/login.d.ts +7 -0
- package/dist/commands/login.js +166 -0
- package/dist/commands/logout.d.ts +1 -0
- package/dist/commands/logout.js +25 -0
- package/dist/commands/serve.d.ts +1 -0
- package/dist/commands/serve.js +38 -0
- package/dist/commands/setup.d.ts +5 -0
- package/dist/commands/setup.js +278 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.js +127 -0
- package/dist/commands/upgrade.d.ts +3 -0
- package/dist/commands/upgrade.js +112 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +64 -0
- package/dist/servers/chunk-DE7R7WKY.js +331 -0
- package/dist/servers/chunk-KMUSQOTJ.js +47 -0
- package/dist/servers/chunk-OP4EO6FV.js +454 -0
- package/dist/servers/chunk-UBBAYTW3.js +946 -0
- package/dist/servers/chunk-ZVWDXO6M.js +1063 -0
- package/dist/servers/cutline-server.js +10448 -0
- package/dist/servers/data-client-FPUZBUO3.js +160 -0
- package/dist/servers/exploration-server.js +930 -0
- package/dist/servers/graph-metrics-DCNR7JZN.js +12 -0
- package/dist/servers/integrations-server.js +107 -0
- package/dist/servers/output-server.js +107 -0
- package/dist/servers/premortem-server.js +971 -0
- package/dist/servers/tools-server.js +287 -0
- package/dist/utils/config-store.d.ts +8 -0
- package/dist/utils/config-store.js +35 -0
- package/dist/utils/config.d.ts +22 -0
- package/dist/utils/config.js +48 -0
- package/mcpb/manifest.json +77 -0
- package/package.json +76 -0
- package/server.json +42 -0
- package/smithery.yaml +10 -0
package/Dockerfile
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
FROM node:20-slim AS base
|
|
2
|
+
|
|
3
|
+
WORKDIR /app
|
|
4
|
+
|
|
5
|
+
# Install the CLI globally from npm (includes bundled servers)
|
|
6
|
+
RUN npm install -g @vibekiln/cutline-mcp-cli@latest
|
|
7
|
+
|
|
8
|
+
# Default to the main constraints server (cutline-server.js)
|
|
9
|
+
# Override with: docker run ... cutline-mcp serve premortem
|
|
10
|
+
ENTRYPOINT ["cutline-mcp"]
|
|
11
|
+
CMD ["serve", "constraints"]
|
package/README.md
ADDED
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
# Cutline MCP — Engineering Guardrails for Vibecoding
|
|
2
|
+
|
|
3
|
+
**Security, reliability, and scalability constraints for your coding agent.** Free code audits, 9 compliance frameworks, pre-mortem analysis, and a Red-Green-Refactor workflow — all injected directly into Cursor, Claude, Windsurf, or any MCP client.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@vibekiln/cutline-mcp-cli)
|
|
6
|
+
[](https://registry.modelcontextprotocol.io)
|
|
7
|
+
[](https://opensource.org/licenses/MIT)
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
### npm (Recommended)
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install -g @vibekiln/cutline-mcp-cli@latest
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Docker
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker run -i ghcr.io/kylewadegrove/cutline-mcp serve constraints
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Claude Desktop (.mcpb)
|
|
24
|
+
|
|
25
|
+
Download `cutline-mcp.mcpb` from the [latest release](https://github.com/kylewadegrove/cutline/releases) and double-click to install.
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# 1. Authenticate (email only, no password)
|
|
31
|
+
cutline-mcp login
|
|
32
|
+
|
|
33
|
+
# 2. Initialize your project (writes IDE rules)
|
|
34
|
+
cd /path/to/your/project
|
|
35
|
+
cutline-mcp init
|
|
36
|
+
|
|
37
|
+
# 3. Connect MCP servers to your IDE
|
|
38
|
+
cutline-mcp setup
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Then ask your AI agent: **"use cutline"**
|
|
42
|
+
|
|
43
|
+
Cutline interprets intent and tier:
|
|
44
|
+
- Natural variants also work: `use cutline to ...`, `using cutline, ...`, `with cutline ...`
|
|
45
|
+
- Free/default: runs `code_audit` (generic codebase scan)
|
|
46
|
+
- Premium product-linked: runs `engineering_audit` (deep analysis + RGR)
|
|
47
|
+
|
|
48
|
+
## What It Does
|
|
49
|
+
|
|
50
|
+
| Capability | Free | Premium |
|
|
51
|
+
|---|---|---|
|
|
52
|
+
| **Code Audit** — security, reliability, scalability scan | 3/month | Unlimited |
|
|
53
|
+
| **9 Compliance Frameworks** — SOC 2, PCI-DSS, HIPAA, GDPR, OWASP LLM, FedRAMP, GLBA, FERPA/COPPA | Auto-loaded | Auto-loaded |
|
|
54
|
+
| **Engineering Audit** — deep product-linked scan + RGR remediation plan | — | Unlimited |
|
|
55
|
+
| **Pre-Mortem Analysis** — risks, assumptions, competitive threats | — | Unlimited |
|
|
56
|
+
| **Constraint Graph** — product-specific NFR routing | — | Full access |
|
|
57
|
+
| **AI Personas** — stakeholder feedback on features | — | Full access |
|
|
58
|
+
| **Idea Validation** — fast-track from free web validation | — | Included |
|
|
59
|
+
|
|
60
|
+
## 54 MCP Tools
|
|
61
|
+
|
|
62
|
+
### Free Tier
|
|
63
|
+
|
|
64
|
+
| Tool | Description |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `code_audit` | Security, reliability, and scalability scan (3/month) |
|
|
67
|
+
| `exploration_start` | Start a guided product idea exploration |
|
|
68
|
+
| `exploration_chat` | Continue an exploration conversation |
|
|
69
|
+
| `exploration_graduate` | Graduate top idea (teaser for free, full for premium) |
|
|
70
|
+
| `llm_status` | Check AI/LLM provider health |
|
|
71
|
+
| `perf_status` | Check MCP server performance metrics |
|
|
72
|
+
|
|
73
|
+
### Premium Tier (50+ tools)
|
|
74
|
+
|
|
75
|
+
**Pre-Mortem & Deep Dive:** `premortem_run`, `premortem_from_idea`, `premortem_queue`, `premortem_status`, `premortem_kick`, `premortem_list`, `premortem_render_pdf`, `premortem_qa`, `premortem_regen_assumptions`, `premortem_regen_experiments`
|
|
76
|
+
|
|
77
|
+
**Personas:** `personas_list`, `personas_get`, `personas_chat`
|
|
78
|
+
|
|
79
|
+
**Constraint Graph:** `constraints_query`, `constraints_auto`, `constraints_ingest`, `constraints_list`, `constraints_learn`, `constraints_embed`, `constraints_semantic_query`, `constraints_ingest_persona`, `constraints_ingest_wiki`, `constraints_ingest_doc`, `constraints_heal`
|
|
80
|
+
|
|
81
|
+
**Graph Operations:** `graph_ingest_requirements`, `graph_get_boundaries`, `graph_bind_codebase`, `graph_bind_confirm`, `graph_view`, `graph_conflicts`, `graph_metrics`
|
|
82
|
+
|
|
83
|
+
**Code & RGR:** `engineering_audit`, `rgr_plan`, `rgr_complete_phase`, `export_readiness_badge`
|
|
84
|
+
|
|
85
|
+
**Wiki & Integrations:** `wiki_load`, `wiki_save`, `wiki_apply_edits`, `agent_chat`, `integrations_create_issues`
|
|
86
|
+
|
|
87
|
+
**Templates:** `template_list`, `template_get`, `template_create`, `template_discover`
|
|
88
|
+
|
|
89
|
+
**Config:** `generate_cutline_md`
|
|
90
|
+
|
|
91
|
+
## Commands
|
|
92
|
+
|
|
93
|
+
### `login`
|
|
94
|
+
|
|
95
|
+
Authenticate with Cutline. Opens your browser for a quick email-only signup (no password needed). Stores credentials in your system keychain.
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
cutline-mcp login
|
|
99
|
+
cutline-mcp login --staging # Use staging environment
|
|
100
|
+
cutline-mcp login --signup # Full sign-up page (email + password)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### `init`
|
|
104
|
+
|
|
105
|
+
Generate IDE-specific config files for your project. Adapts to your tier:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
cutline-mcp init
|
|
109
|
+
cutline-mcp init --project-root /path/to/project
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
**Free tier writes:**
|
|
113
|
+
- `.cursor/rules/rgr-workflow.mdc` — RGR cycle with `code_audit`
|
|
114
|
+
- `.cursor/rules/ambient-constraints.mdc` — Constraint checking guidance
|
|
115
|
+
- `CLAUDE.local.md` — Same instructions for Claude Code
|
|
116
|
+
|
|
117
|
+
**Premium tier adds:**
|
|
118
|
+
- `.cursor/rules/cutline.mdc` — Points agent to `.cutline.md`
|
|
119
|
+
|
|
120
|
+
All files are gitignored automatically.
|
|
121
|
+
|
|
122
|
+
### `setup`
|
|
123
|
+
|
|
124
|
+
Print the MCP server configuration to add to your IDE.
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
cutline-mcp setup
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `serve <server>`
|
|
131
|
+
|
|
132
|
+
Start an MCP server (used by IDE MCP configs).
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
cutline-mcp serve constraints # Main server (engineering audit, constraints, graph)
|
|
136
|
+
cutline-mcp serve premortem # Pre-mortem and deep dive
|
|
137
|
+
cutline-mcp serve exploration # Idea exploration
|
|
138
|
+
cutline-mcp serve tools # Utility tools
|
|
139
|
+
cutline-mcp serve output # Export and rendering
|
|
140
|
+
cutline-mcp serve integrations # External integrations
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### `upgrade`
|
|
144
|
+
|
|
145
|
+
Open the upgrade page and refresh your session.
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
cutline-mcp upgrade
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### `status` / `logout`
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
cutline-mcp status # Check auth and subscription
|
|
155
|
+
cutline-mcp logout # Remove stored credentials
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
## How It Works
|
|
159
|
+
|
|
160
|
+
### Authentication
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
1. cutline-mcp login
|
|
164
|
+
2. CLI starts local callback server on localhost:8765
|
|
165
|
+
3. Browser opens — enter email, receive magic link, click it
|
|
166
|
+
4. CLI receives token and stores it in your OS keychain
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Existing users who are already signed in complete automatically. Password sign-in is also available.
|
|
170
|
+
|
|
171
|
+
### RGR Workflow
|
|
172
|
+
|
|
173
|
+
The `init` command creates rules that make your AI coding agent follow the Red-Green-Refactor cycle automatically:
|
|
174
|
+
|
|
175
|
+
1. **Plan** — Check constraints before implementing
|
|
176
|
+
2. **Implement** — Write code addressing the constraints
|
|
177
|
+
3. **Verify** — Run a code audit to check coverage
|
|
178
|
+
4. **Complete** — Mark the phase done to update readiness scores
|
|
179
|
+
|
|
180
|
+
### Compliance Frameworks
|
|
181
|
+
|
|
182
|
+
Cutline auto-detects your stack and loads the appropriate compliance constraints:
|
|
183
|
+
|
|
184
|
+
| Framework | Triggers |
|
|
185
|
+
|---|---|
|
|
186
|
+
| SOC 2 | Always loaded |
|
|
187
|
+
| Security Baseline | Always loaded |
|
|
188
|
+
| PCI-DSS | Stripe, payment libs |
|
|
189
|
+
| HIPAA | Health/FHIR/HL7 libs |
|
|
190
|
+
| GDPR / CCPA | Analytics, auth libs |
|
|
191
|
+
| OWASP LLM Top 10 | OpenAI, LangChain, RAG |
|
|
192
|
+
| FedRAMP | GovCloud, FIPS |
|
|
193
|
+
| GLBA | Plaid, banking SDKs |
|
|
194
|
+
| FERPA / COPPA | Clever, Canvas, EdTech |
|
|
195
|
+
|
|
196
|
+
## Registry Listings
|
|
197
|
+
|
|
198
|
+
### Official MCP Registry
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
# Verify namespace
|
|
202
|
+
mcp-publisher login dns --domain thecutline.ai
|
|
203
|
+
|
|
204
|
+
# Publish
|
|
205
|
+
mcp-publisher publish
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Config: [`server.json`](./server.json)
|
|
209
|
+
|
|
210
|
+
### Smithery
|
|
211
|
+
|
|
212
|
+
Config: [`smithery.yaml`](./smithery.yaml) with [`Dockerfile`](./Dockerfile)
|
|
213
|
+
|
|
214
|
+
### Claude Desktop Extension
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
npm run build:mcpb
|
|
218
|
+
# → cutline-mcp.mcpb (drag into Claude Desktop)
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Config: [`mcpb/manifest.json`](./mcpb/manifest.json)
|
|
222
|
+
|
|
223
|
+
## Troubleshooting
|
|
224
|
+
|
|
225
|
+
### Port 8765 in use
|
|
226
|
+
|
|
227
|
+
```bash
|
|
228
|
+
lsof -i :8765
|
|
229
|
+
kill -9 <PID>
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Authentication timeout
|
|
233
|
+
|
|
234
|
+
The browser didn't complete within 10 minutes. Run `cutline-mcp login` again.
|
|
235
|
+
|
|
236
|
+
### Failed to refresh token
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
cutline-mcp logout
|
|
240
|
+
cutline-mcp login
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
### Keychain Access Denied (macOS)
|
|
244
|
+
|
|
245
|
+
1. Open Keychain Access
|
|
246
|
+
2. Find "cutline-mcp" entry
|
|
247
|
+
3. Right-click → Get Info → Access Control
|
|
248
|
+
4. Add your Terminal/IDE to allowed applications
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import express from 'express';
|
|
2
|
+
const CALLBACK_PORT = 8765;
|
|
3
|
+
const TIMEOUT_MS = 10 * 60 * 1000; // 10 minutes (allows time for email magic link)
|
|
4
|
+
export async function startCallbackServer(source = 'login') {
|
|
5
|
+
return new Promise((resolve, reject) => {
|
|
6
|
+
const app = express();
|
|
7
|
+
let server;
|
|
8
|
+
// Timeout handler
|
|
9
|
+
const timeout = setTimeout(() => {
|
|
10
|
+
server?.close();
|
|
11
|
+
reject(new Error('Authentication timeout - no callback received'));
|
|
12
|
+
}, TIMEOUT_MS);
|
|
13
|
+
// Callback endpoint
|
|
14
|
+
app.get('/', (req, res) => {
|
|
15
|
+
const token = req.query.token;
|
|
16
|
+
const email = req.query.email;
|
|
17
|
+
if (!token) {
|
|
18
|
+
res.status(400).send('Missing token parameter');
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
res.send(`
|
|
22
|
+
<!DOCTYPE html>
|
|
23
|
+
<html>
|
|
24
|
+
<head>
|
|
25
|
+
<title>Cutline MCP - Authentication Successful</title>
|
|
26
|
+
<style>
|
|
27
|
+
body {
|
|
28
|
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
29
|
+
display: flex;
|
|
30
|
+
justify-content: center;
|
|
31
|
+
align-items: center;
|
|
32
|
+
height: 100vh;
|
|
33
|
+
margin: 0;
|
|
34
|
+
background: #0a0a0a;
|
|
35
|
+
color: #fff;
|
|
36
|
+
}
|
|
37
|
+
.container {
|
|
38
|
+
background: #111;
|
|
39
|
+
padding: 2.5rem;
|
|
40
|
+
border-radius: 1rem;
|
|
41
|
+
border: 1px solid rgba(0, 255, 65, 0.2);
|
|
42
|
+
text-align: center;
|
|
43
|
+
max-width: 420px;
|
|
44
|
+
}
|
|
45
|
+
.checkmark { font-size: 3rem; margin-bottom: 0.5rem; }
|
|
46
|
+
h1 { color: #00ff41; font-size: 1.4rem; margin-bottom: 0.5rem; }
|
|
47
|
+
.email { color: #888; font-size: 0.9rem; margin-bottom: 1.5rem; }
|
|
48
|
+
.steps { text-align: left; margin: 1.5rem 0; padding: 1rem 1.2rem; background: rgba(0,255,65,0.05); border: 1px solid rgba(0,255,65,0.15); border-radius: 0.5rem; }
|
|
49
|
+
.steps h3 { font-size: 0.8rem; color: #888; margin: 0 0 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
|
|
50
|
+
.step { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 0.6rem; font-size: 0.85rem; color: #ccc; }
|
|
51
|
+
.step:last-child { margin-bottom: 0; }
|
|
52
|
+
.num { color: #00ff41; font-weight: 600; min-width: 1.2rem; }
|
|
53
|
+
code { background: rgba(255,255,255,0.1); padding: 0.15rem 0.4rem; border-radius: 3px; font-size: 0.8rem; }
|
|
54
|
+
.close { color: #666; font-size: 0.8rem; margin-top: 1rem; }
|
|
55
|
+
</style>
|
|
56
|
+
</head>
|
|
57
|
+
<body>
|
|
58
|
+
<div class="container">
|
|
59
|
+
<div class="checkmark">✓</div>
|
|
60
|
+
<h1>You're in!</h1>
|
|
61
|
+
${email ? `<p class="email">${email}</p>` : ''}
|
|
62
|
+
${source === 'login' ? `
|
|
63
|
+
<div class="steps">
|
|
64
|
+
<h3>Next in your terminal</h3>
|
|
65
|
+
<div class="step"><span class="num">1</span><span>Run <code>cutline-mcp init</code> to generate IDE rules</span></div>
|
|
66
|
+
<div class="step"><span class="num">2</span><span>Run <code>cutline-mcp setup</code> to connect MCP servers</span></div>
|
|
67
|
+
<div class="step"><span class="num">3</span><span>Ask your agent: <em>"Run an engineering audit"</em></span></div>
|
|
68
|
+
</div>` : `
|
|
69
|
+
<div class="steps">
|
|
70
|
+
<h3>Go back to your terminal</h3>
|
|
71
|
+
<div class="step"><span class="num">✓</span><span>Setup is finishing automatically — check your terminal for next steps.</span></div>
|
|
72
|
+
</div>`}
|
|
73
|
+
<p class="close">You can close this tab.</p>
|
|
74
|
+
</div>
|
|
75
|
+
</body>
|
|
76
|
+
</html>
|
|
77
|
+
`);
|
|
78
|
+
// Clean up and resolve
|
|
79
|
+
clearTimeout(timeout);
|
|
80
|
+
server.close();
|
|
81
|
+
resolve({ token, email });
|
|
82
|
+
});
|
|
83
|
+
// Start server
|
|
84
|
+
server = app.listen(CALLBACK_PORT, () => {
|
|
85
|
+
console.log(`Callback server listening on http://localhost:${CALLBACK_PORT}`);
|
|
86
|
+
});
|
|
87
|
+
server.on('error', (err) => {
|
|
88
|
+
clearTimeout(timeout);
|
|
89
|
+
if (err.code === 'EADDRINUSE') {
|
|
90
|
+
reject(new Error(`Port ${CALLBACK_PORT} is already in use. Please close other applications and try again.`));
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
reject(err);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { saveConfig, loadConfig } from '../utils/config-store.js';
|
|
2
|
+
export async function storeRefreshToken(token) {
|
|
3
|
+
saveConfig({ refreshToken: token });
|
|
4
|
+
}
|
|
5
|
+
export async function getRefreshToken() {
|
|
6
|
+
const config = loadConfig();
|
|
7
|
+
return config.refreshToken || null;
|
|
8
|
+
}
|
|
9
|
+
export async function deleteRefreshToken() {
|
|
10
|
+
const config = loadConfig();
|
|
11
|
+
if (!config.refreshToken)
|
|
12
|
+
return false;
|
|
13
|
+
delete config.refreshToken;
|
|
14
|
+
saveConfig(config);
|
|
15
|
+
return true;
|
|
16
|
+
}
|