promptgraph-mcp 2.9.11 → 2.9.12
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 +9 -1
- package/commands/init.js +1 -1
- package/package.json +1 -1
- package/platform.js +11 -8
package/README.md
CHANGED
|
@@ -87,10 +87,18 @@ pg setup opencode
|
|
|
87
87
|
**Option 2 — manual.** Add to `~/.config/opencode/opencode.json`:
|
|
88
88
|
```json
|
|
89
89
|
{
|
|
90
|
-
"
|
|
90
|
+
"mcp": {
|
|
91
|
+
"promptgraph": {
|
|
92
|
+
"type": "local",
|
|
93
|
+
"command": ["cmd", "/c", "npx", "promptgraph-mcp"],
|
|
94
|
+
"enabled": true
|
|
95
|
+
}
|
|
96
|
+
}
|
|
91
97
|
}
|
|
92
98
|
```
|
|
93
99
|
|
|
100
|
+
> **Linux/macOS:** use `"command": ["npx", "promptgraph-mcp"]` (without `cmd /c`).
|
|
101
|
+
|
|
94
102
|
### Other clients
|
|
95
103
|
|
|
96
104
|
| Client | Command |
|
package/commands/init.js
CHANGED
|
@@ -13,7 +13,7 @@ const PLATFORM_CONFIGS = {
|
|
|
13
13
|
},
|
|
14
14
|
'opencode': {
|
|
15
15
|
label: 'OpenCode — opencode.json',
|
|
16
|
-
snippet: {
|
|
16
|
+
snippet: { mcp: { promptgraph: { type: 'local', command: ['cmd', '/c', 'npx', 'promptgraph-mcp'], enabled: true } } },
|
|
17
17
|
},
|
|
18
18
|
'cursor': {
|
|
19
19
|
label: 'Cursor — ~/.cursor/mcp.json',
|
package/package.json
CHANGED
package/platform.js
CHANGED
|
@@ -6,7 +6,9 @@ import { spawnSync } from 'child_process';
|
|
|
6
6
|
const HOME = os.homedir();
|
|
7
7
|
|
|
8
8
|
const STD_ENTRY = { command: 'npx', args: ['promptgraph-mcp'] };
|
|
9
|
-
const OC_ENTRY =
|
|
9
|
+
const OC_ENTRY = process.platform === 'win32'
|
|
10
|
+
? { type: 'local', command: ['cmd', '/c', 'npx', 'promptgraph-mcp'], enabled: true }
|
|
11
|
+
: { type: 'local', command: ['npx', 'promptgraph-mcp'], enabled: true };
|
|
10
12
|
|
|
11
13
|
// Shared helper: write standard mcpServers entry (Claude Code, Cursor, Windsurf, Codex format)
|
|
12
14
|
function addStdMcp(configPath) {
|
|
@@ -26,14 +28,15 @@ function addClineMcp(configPath) {
|
|
|
26
28
|
writeJson(configPath, json);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
// OpenCode uses
|
|
31
|
+
// OpenCode uses mcp.promptgraph object
|
|
30
32
|
function addOpenCodeMcp(configPath) {
|
|
31
33
|
const json = readJson(configPath) || {};
|
|
32
|
-
json.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
json.mcp = json.mcp || {};
|
|
35
|
+
if (!json.mcp.promptgraph) {
|
|
36
|
+
json.mcp.promptgraph = OC_ENTRY;
|
|
37
|
+
fs.mkdirSync(path.dirname(configPath), { recursive: true });
|
|
38
|
+
writeJson(configPath, json);
|
|
39
|
+
}
|
|
37
40
|
}
|
|
38
41
|
|
|
39
42
|
export const PLATFORMS = {
|
|
@@ -100,7 +103,7 @@ function isOpenCodeInstalled() {
|
|
|
100
103
|
function isClaudeCodeInstalled() { return isBinaryInstalled('claude'); }
|
|
101
104
|
|
|
102
105
|
function getOpenCodeConfig() {
|
|
103
|
-
if (process.platform === 'win32') return path.join(HOME, '
|
|
106
|
+
if (process.platform === 'win32') return path.join(HOME, '.config', 'opencode', 'opencode.json');
|
|
104
107
|
if (process.platform === 'darwin') return path.join(HOME, 'Library', 'Application Support', 'opencode', 'opencode.json');
|
|
105
108
|
return path.join(HOME, '.config', 'opencode', 'opencode.json');
|
|
106
109
|
}
|