a2p-mcp 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.
Files changed (2) hide show
  1. package/index.js +45 -0
  2. package/package.json +18 -0
package/index.js ADDED
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ const { writeFileSync, existsSync, readFileSync } = require("fs");
3
+ const { join } = require("path");
4
+
5
+ const command = process.argv[2];
6
+
7
+ if (command === "init") {
8
+ const mcpJsonPath = join(process.cwd(), ".mcp.json");
9
+ const serverEntry = {
10
+ command: "npx",
11
+ args: ["-y", "architect-to-product"],
12
+ };
13
+
14
+ if (existsSync(mcpJsonPath)) {
15
+ const existing = JSON.parse(readFileSync(mcpJsonPath, "utf-8"));
16
+ if (existing.mcpServers && existing.mcpServers["architect-to-product"]) {
17
+ console.log("✓ .mcp.json already configured with architect-to-product.");
18
+ console.log(" Restart Claude Code, then type /a2p to start.");
19
+ process.exit(0);
20
+ }
21
+ existing.mcpServers = existing.mcpServers || {};
22
+ existing.mcpServers["architect-to-product"] = serverEntry;
23
+ writeFileSync(mcpJsonPath, JSON.stringify(existing, null, 2) + "\n", "utf-8");
24
+ console.log("✓ Added architect-to-product to existing .mcp.json");
25
+ } else {
26
+ const config = {
27
+ mcpServers: {
28
+ "architect-to-product": serverEntry,
29
+ },
30
+ };
31
+ writeFileSync(mcpJsonPath, JSON.stringify(config, null, 2) + "\n", "utf-8");
32
+ console.log("✓ Created .mcp.json with architect-to-product");
33
+ }
34
+ console.log("\nNext steps:");
35
+ console.log(" 1. Restart Claude Code");
36
+ console.log(" 2. Type /a2p to start");
37
+ } else {
38
+ console.log("a2p — CLI for architect-to-product");
39
+ console.log("");
40
+ console.log("Usage:");
41
+ console.log(" npx a2p init Set up .mcp.json in current directory");
42
+ console.log("");
43
+ console.log("After init, restart Claude Code and type /a2p to start.");
44
+ console.log("https://www.npmjs.com/package/architect-to-product");
45
+ }
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "a2p-mcp",
3
+ "version": "0.1.0",
4
+ "description": "CLI shorthand for architect-to-product — AI engineering framework",
5
+ "bin": {
6
+ "a2p": "index.js"
7
+ },
8
+ "keywords": [
9
+ "a2p",
10
+ "architect-to-product",
11
+ "mcp",
12
+ "ai-engineering",
13
+ "tdd",
14
+ "claude-code"
15
+ ],
16
+ "author": "",
17
+ "license": "MIT"
18
+ }