@stratabook/mcp 0.1.1 → 0.1.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.
package/dist/src/cli.js CHANGED
@@ -4,6 +4,7 @@ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"
4
4
  import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
5
5
  import { DEFAULT_API_BASE } from "@stratabook/sdk";
6
6
  import { createStrataMcpServer } from "./server.js";
7
+ import { SERVER_VERSION } from "./version.js";
7
8
  function parse(argv) {
8
9
  const values = new Map();
9
10
  for (let index = 0; index < argv.length; index++) {
@@ -26,7 +27,7 @@ function parse(argv) {
26
27
  }
27
28
  const timeoutMs = boundedInteger(values.get("timeout-ms") ?? process.env.STRATA_MCP_TIMEOUT_MS ?? "10000", "timeout-ms", 250, 60_000);
28
29
  const port = boundedInteger(values.get("port") ?? process.env.STRATA_MCP_PORT ?? "8787", "port", 1, 65_535);
29
- const host = values.get("host") ?? process.env.STRATA_MCP_HOST ?? "127.0.0.1";
30
+ const host = values.get("host") ?? process.env.STRATA_MCP_HOST ?? "localhost";
30
31
  if (!/^[a-zA-Z0-9.:[\]-]+$/.test(host))
31
32
  throw new Error("host is invalid");
32
33
  return {
@@ -49,13 +50,13 @@ function help() {
49
50
 
50
51
  Usage:
51
52
  strata-mcp
52
- strata-mcp --transport http [--host 127.0.0.1] [--port 8787]
53
+ strata-mcp --transport http [--host localhost] [--port 8787]
53
54
 
54
55
  Options:
55
56
  --transport stdio|http Local stdio by default; Streamable HTTP for hosting
56
57
  --api-base URL Strata public API (default: ${DEFAULT_API_BASE})
57
58
  --timeout-ms N Upstream timeout, 250..60000 (default: 10000)
58
- --host HOST HTTP bind host (default: 127.0.0.1)
59
+ --host HOST HTTP bind host (default: localhost)
59
60
  --port N HTTP port (default: 8787)
60
61
 
61
62
  This server is read-only. It accepts no wallet, private key, or session key.
@@ -81,7 +82,7 @@ async function runHttp(options) {
81
82
  response
82
83
  .status(200)
83
84
  .set("Cache-Control", "no-store")
84
- .json({ ok: true, service: "strata-mcp", version: "0.1.0" });
85
+ .json({ ok: true, service: "strata-mcp", version: SERVER_VERSION });
85
86
  });
86
87
  app.post("/mcp", async (request, response) => {
87
88
  let runtime;
@@ -1,7 +1,7 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
2
  import { DEFAULT_SLIPPAGE_BPS, StrataApiError, StrataClient, } from "@stratabook/sdk";
3
3
  import * as z from "zod/v4";
4
- const SERVER_VERSION = "0.1.1";
4
+ import { SERVER_VERSION } from "./version.js";
5
5
  const REFRESH_INTERVAL_MS = 5_000;
6
6
  export function capabilityAvailable(catalog, id) {
7
7
  return catalog.capabilities.some((capability) => capability.id === id
@@ -0,0 +1 @@
1
+ export declare const SERVER_VERSION: string;
@@ -0,0 +1,4 @@
1
+ import { createRequire } from "node:module";
2
+ const require = createRequire(import.meta.url);
3
+ const packageMetadata = require("../../package.json");
4
+ export const SERVER_VERSION = packageMetadata.version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stratabook/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Connect AI agents to Strata markets and Sonar quotes with MCP.",
5
5
  "type": "module",
6
6
  "license": "MIT OR Apache-2.0",