@sylphx/mcp 0.24.0 → 0.25.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/bin/sylphx-mcp.js +6 -1
- package/package.json +2 -2
package/bin/sylphx-mcp.js
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
import { spawn } from 'node:child_process'
|
|
6
6
|
import { binaryPath } from '@sylphx/cli/resolve'
|
|
7
7
|
|
|
8
|
+
const args = process.argv.slice(2)
|
|
9
|
+
if (args.includes('--version') || args.includes('-V')) {
|
|
10
|
+
// The server is the CLI's `sylphx mcp`; its version is the CLI's.
|
|
11
|
+
args.splice(0, args.length, '--version')
|
|
12
|
+
}
|
|
8
13
|
let bin
|
|
9
14
|
try {
|
|
10
15
|
bin = binaryPath()
|
|
@@ -12,7 +17,7 @@ try {
|
|
|
12
17
|
console.error(error.message)
|
|
13
18
|
process.exit(1)
|
|
14
19
|
}
|
|
15
|
-
const child = spawn(bin, ['mcp', ...
|
|
20
|
+
const child = spawn(bin, args[0] === '--version' ? args : ['mcp', ...args], { stdio: 'inherit' })
|
|
16
21
|
child.on('error', (error) => {
|
|
17
22
|
console.error(`failed to run ${bin}: ${error.message}`)
|
|
18
23
|
process.exit(1)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sylphx/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "The Sylphx MCP server: every Sylphx API method as MCP tools (runs `sylphx mcp`).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"README.md"
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sylphx/cli": "0.
|
|
27
|
+
"@sylphx/cli": "0.25.0"
|
|
28
28
|
},
|
|
29
29
|
"engines": {
|
|
30
30
|
"node": ">=18"
|