what-mcp 0.11.0 → 0.11.2

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/package.json +1 -1
  2. package/src/index.js +31 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "what-mcp",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "[DEPRECATED — use what-devtools-mcp instead] MCP Server for What Framework documentation and assistance",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -1,5 +1,35 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import { readFileSync } from 'node:fs';
4
+
5
+ const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf-8'));
6
+
7
+ // --help / --version print and exit BEFORE the MCP stdio transport starts.
8
+ const cliArgs = process.argv.slice(2);
9
+ if (cliArgs.includes('--help') || cliArgs.includes('-h')) {
10
+ console.log(`what-mcp ${pkg.version} — MCP server for What Framework documentation [DEPRECATED]
11
+
12
+ DEPRECATED: superseded by what-devtools-mcp (all documentation plus live
13
+ devtools). Install what-devtools-mcp and remove what-mcp from your MCP config.
14
+
15
+ Usage:
16
+ what-mcp [flags]
17
+
18
+ Runs an MCP server on stdio (add it to your MCP client config). No other
19
+ arguments are accepted.
20
+
21
+ Flags:
22
+ -h, --help Show this help and exit
23
+ -v, --version Print the version and exit
24
+
25
+ Docs: https://whatfw.com`);
26
+ process.exit(0);
27
+ }
28
+ if (cliArgs.includes('--version') || cliArgs.includes('-v')) {
29
+ console.log(pkg.version);
30
+ process.exit(0);
31
+ }
32
+
3
33
  console.warn(
4
34
  '[what-mcp] DEPRECATED: This package is superseded by what-devtools-mcp, ' +
5
35
  'which includes all documentation plus live devtools. ' +
@@ -485,7 +515,7 @@ export default {
485
515
  const server = new Server(
486
516
  {
487
517
  name: 'what-framework',
488
- version: '0.1.0',
518
+ version: pkg.version,
489
519
  },
490
520
  {
491
521
  capabilities: {