@hustle-together/api-dev-tools 1.2.0 ā 1.3.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 +2 -2
- package/bin/cli.js +27 -25
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,7 +35,7 @@ Three Python hooks that provide **real programmatic guarantees**:
|
|
|
35
35
|
### State Tracking
|
|
36
36
|
- **`.claude/api-dev-state.json`** - Persistent state file tracking all workflow progress
|
|
37
37
|
|
|
38
|
-
### MCP Servers (Auto-
|
|
38
|
+
### MCP Servers (Auto-installed via `claude mcp add`)
|
|
39
39
|
- **Context7** - Fetches LIVE documentation from library source code (not training data)
|
|
40
40
|
- **GitHub** - Read/create issues, pull requests, and access repository data (requires `GITHUB_PERSONAL_ACCESS_TOKEN`)
|
|
41
41
|
|
|
@@ -432,7 +432,7 @@ Required for `/pr` and `/issue` commands to work with GitHub MCP tools.
|
|
|
432
432
|
export GITHUB_PERSONAL_ACCESS_TOKEN=ghp_your_token_here
|
|
433
433
|
```
|
|
434
434
|
|
|
435
|
-
The
|
|
435
|
+
The installer runs `claude mcp add` commands directly, which registers the servers in your Claude Code config (`~/.claude.json`). Restart Claude Code after installation for MCP tools to be available.
|
|
436
436
|
|
|
437
437
|
## š Documentation
|
|
438
438
|
|
package/bin/cli.js
CHANGED
|
@@ -234,38 +234,40 @@ function main() {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// ========================================
|
|
237
|
-
// 5. Install
|
|
237
|
+
// 5. Install MCP Servers via CLI (Context7, GitHub)
|
|
238
238
|
// ========================================
|
|
239
|
-
|
|
240
|
-
|
|
239
|
+
// NOTE: We use `claude mcp add` directly because .mcp.json requires manual approval
|
|
240
|
+
// and doesn't auto-load. Using the CLI ensures servers are immediately available.
|
|
241
|
+
log('\nš Configuring MCP servers:', 'cyan');
|
|
241
242
|
|
|
242
|
-
|
|
243
|
-
log('\nš Configuring MCP servers:', 'cyan');
|
|
243
|
+
const { execSync } = require('child_process');
|
|
244
244
|
|
|
245
|
+
const mcpServers = [
|
|
246
|
+
{ name: 'context7', command: 'npx -y @upstash/context7-mcp', description: 'Live documentation from library source code' },
|
|
247
|
+
{ name: 'github', command: 'npx -y @modelcontextprotocol/server-github', description: 'GitHub issues, PRs, and repository access' }
|
|
248
|
+
];
|
|
249
|
+
|
|
250
|
+
for (const server of mcpServers) {
|
|
245
251
|
try {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
if (
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
log(
|
|
252
|
+
// Check if server already exists
|
|
253
|
+
const checkResult = execSync(`claude mcp get ${server.name} 2>&1`, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
254
|
+
if (checkResult.includes('Connected') || checkResult.includes('Scope:')) {
|
|
255
|
+
log(` ā ${server.name} - already configured`, 'blue');
|
|
256
|
+
}
|
|
257
|
+
} catch (checkError) {
|
|
258
|
+
// Server doesn't exist, add it
|
|
259
|
+
try {
|
|
260
|
+
execSync(`claude mcp add ${server.name} -- ${server.command}`, { encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
261
|
+
log(` ā
${server.name} - ${server.description}`, 'green');
|
|
262
|
+
} catch (addError) {
|
|
263
|
+
log(` ā ļø ${server.name} - Could not add (run manually: claude mcp add ${server.name} -- ${server.command})`, 'yellow');
|
|
258
264
|
}
|
|
259
|
-
|
|
260
|
-
log('\n MCP servers configured:', 'blue');
|
|
261
|
-
log(' ⢠context7 - Live documentation from library source code', 'blue');
|
|
262
|
-
log(' ⢠github - GitHub issues, PRs, and repository access', 'blue');
|
|
263
|
-
log('\n ā ļø GitHub MCP requires GITHUB_PERSONAL_ACCESS_TOKEN in env', 'yellow');
|
|
264
|
-
} catch (error) {
|
|
265
|
-
log(` ā Failed to configure MCP servers: ${error.message}`, 'red');
|
|
266
265
|
}
|
|
267
266
|
}
|
|
268
267
|
|
|
268
|
+
log('\n ā ļø GitHub MCP requires GITHUB_PERSONAL_ACCESS_TOKEN in env', 'yellow');
|
|
269
|
+
log(' š” Restart Claude Code for MCP tools to be available', 'yellow');
|
|
270
|
+
|
|
269
271
|
// ========================================
|
|
270
272
|
// Success Summary
|
|
271
273
|
// ========================================
|
|
@@ -278,7 +280,7 @@ function main() {
|
|
|
278
280
|
log(' Hooks: .claude/hooks/*.py', 'blue');
|
|
279
281
|
log(' Settings: .claude/settings.json', 'blue');
|
|
280
282
|
log(' State: .claude/api-dev-state.json', 'blue');
|
|
281
|
-
log(' MCP:
|
|
283
|
+
log(' MCP: context7, github (via claude mcp add)', 'blue');
|
|
282
284
|
|
|
283
285
|
log('\nš Enforcement Features:', 'bright');
|
|
284
286
|
log(' ⢠Research MUST happen before code writing', 'cyan');
|
package/package.json
CHANGED