@hoststack.dev/mcp 0.21.0 → 0.22.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 +12 -0
- package/dist/hoststack-mcp.js +40 -3
- package/dist/hoststack-mcp.js.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,6 +83,18 @@ npx @hoststack.dev/mcp --print-config claude-code
|
|
|
83
83
|
|
|
84
84
|
If `HOSTSTACK_API_KEY` is set in your shell, it gets baked into the snippet; otherwise you'll see a `hs_live_your_api_key_here` placeholder you can search-and-replace.
|
|
85
85
|
|
|
86
|
+
`--help` and `--version` work the same way — no key needed, because the people
|
|
87
|
+
most likely to reach for them are the ones who haven't set one up yet:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx @hoststack.dev/mcp --help
|
|
91
|
+
npx @hoststack.dev/mcp --version
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Running it with no arguments starts the server on stdio, and that is the one
|
|
95
|
+
path that does need `HOSTSTACK_API_KEY`. It speaks JSON-RPC, so it isn't much
|
|
96
|
+
use by hand — an MCP client is what should be launching it.
|
|
97
|
+
|
|
86
98
|
## Tool inventory
|
|
87
99
|
|
|
88
100
|
107 tools. The headings are the registry's own categories rather than a friendlier regrouping, so the build can diff this table against the registry and fail when the two disagree — which is how an earlier version of it came to advertise a total from three releases back and send agents to the dashboard for a `create_database` that had already shipped.
|
package/dist/hoststack-mcp.js
CHANGED
|
@@ -8,7 +8,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
8
8
|
import { HostStack } from "@hoststack.dev/sdk";
|
|
9
9
|
|
|
10
10
|
// src/version.ts
|
|
11
|
-
var MCP_VERSION = true ? "0.
|
|
11
|
+
var MCP_VERSION = true ? "0.22.0" : "0.0.0-dev";
|
|
12
12
|
var USER_AGENT = `hoststack-mcp/${MCP_VERSION}`;
|
|
13
13
|
|
|
14
14
|
// src/api-client.ts
|
|
@@ -5335,10 +5335,38 @@ function createMcpServer(options) {
|
|
|
5335
5335
|
|
|
5336
5336
|
// src/cli.ts
|
|
5337
5337
|
var args = process.argv.slice(2);
|
|
5338
|
+
var PRINT_CONFIG_TARGETS = ["claude-desktop", "cursor", "claude-code"];
|
|
5339
|
+
var USAGE = `hoststack-mcp ${MCP_VERSION} \u2014 the HostStack MCP server (stdio transport).
|
|
5340
|
+
|
|
5341
|
+
Usage:
|
|
5342
|
+
hoststack-mcp Serve on stdio. This is what an MCP client runs;
|
|
5343
|
+
it speaks JSON-RPC, so it is not useful by hand.
|
|
5344
|
+
hoststack-mcp --print-config <client> Emit a ready-to-paste config snippet.
|
|
5345
|
+
<client>: ${PRINT_CONFIG_TARGETS.join(" | ")}
|
|
5346
|
+
hoststack-mcp --help This text.
|
|
5347
|
+
hoststack-mcp --version Print the version and exit.
|
|
5348
|
+
|
|
5349
|
+
Environment:
|
|
5350
|
+
HOSTSTACK_API_KEY Required to SERVE. An hs_live_\u2026 or hs_test_\u2026 key from
|
|
5351
|
+
hoststack.dev \u2192 Settings \u2192 API keys. Not needed for
|
|
5352
|
+
--help, --version or --print-config.
|
|
5353
|
+
HOSTSTACK_BASE_URL API host. Default https://hoststack.dev.
|
|
5354
|
+
HOSTSTACK_MCP_TRACE Set to 1 to write one NDJSON line per tool call to
|
|
5355
|
+
stderr, for a local trace (2> mcp-trace.log).
|
|
5356
|
+
`;
|
|
5357
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
5358
|
+
process.stdout.write(USAGE);
|
|
5359
|
+
process.exit(0);
|
|
5360
|
+
}
|
|
5361
|
+
if (args.includes("--version") || args.includes("-v")) {
|
|
5362
|
+
process.stdout.write(`${MCP_VERSION}
|
|
5363
|
+
`);
|
|
5364
|
+
process.exit(0);
|
|
5365
|
+
}
|
|
5338
5366
|
var printIdx = args.indexOf("--print-config");
|
|
5339
5367
|
if (printIdx !== -1) {
|
|
5340
5368
|
const target = args[printIdx + 1];
|
|
5341
|
-
const validTargets =
|
|
5369
|
+
const validTargets = new Set(PRINT_CONFIG_TARGETS);
|
|
5342
5370
|
if (!target || !validTargets.has(target)) {
|
|
5343
5371
|
console.error(
|
|
5344
5372
|
`Usage: hoststack-mcp --print-config <${[...validTargets].join("|")}>
|
|
@@ -5371,9 +5399,18 @@ if (printIdx !== -1) {
|
|
|
5371
5399
|
process.exit(0);
|
|
5372
5400
|
}
|
|
5373
5401
|
}
|
|
5402
|
+
var unknownFlag = args.find((arg) => arg.startsWith("-"));
|
|
5403
|
+
if (unknownFlag) {
|
|
5404
|
+
console.error(`hoststack-mcp: unknown option ${unknownFlag}
|
|
5405
|
+
|
|
5406
|
+
${USAGE}`);
|
|
5407
|
+
process.exit(1);
|
|
5408
|
+
}
|
|
5374
5409
|
var apiKey = process.env["HOSTSTACK_API_KEY"];
|
|
5375
5410
|
if (!apiKey) {
|
|
5376
|
-
console.error(
|
|
5411
|
+
console.error(
|
|
5412
|
+
"hoststack-mcp: HOSTSTACK_API_KEY is required to serve.\nCreate one at hoststack.dev \u2192 Settings \u2192 API keys, then either export it\nor put it in your client config: hoststack-mcp --print-config claude-code\n(--help, --version and --print-config need no key.)"
|
|
5413
|
+
);
|
|
5377
5414
|
process.exit(1);
|
|
5378
5415
|
}
|
|
5379
5416
|
var baseUrl = process.env["HOSTSTACK_BASE_URL"] ?? "https://hoststack.dev";
|