@tokcalc/mcp-server 0.2.3 → 0.2.4

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/dist/server.js +25 -5
  2. package/package.json +1 -1
package/dist/server.js CHANGED
@@ -16303,11 +16303,23 @@ var TOOL_DEFINITIONS = [
16303
16303
  inputSchema: formatInputSchema(GetMlperfBenchmarksSchema)
16304
16304
  }
16305
16305
  ];
16306
+ var SERVER_VERSION = "0.2.4";
16307
+ function withProvenance(result) {
16308
+ return {
16309
+ ...result,
16310
+ provenance: {
16311
+ serverVersion: SERVER_VERSION,
16312
+ catalogVersion: "0.3.0",
16313
+ buildStamp: `tokcalc-mcp/${SERVER_VERSION}`
16314
+ }
16315
+ };
16316
+ }
16306
16317
  function createMcpServer() {
16307
- const server = new Server({ name: "tokcalc", version: "0.2.0" }, {
16318
+ const server = new Server({ name: "tokcalc", version: SERVER_VERSION }, {
16308
16319
  capabilities: {
16309
16320
  tools: {}
16310
- }
16321
+ },
16322
+ instructions: `tokcalc MCP server ${SERVER_VERSION} — LLM serving capacity planner. ` + `Use list_models / list_gpus to discover canonical IDs before calling ` + `estimate_capacity, compare_gpus, recommend_topology, or ` + `estimate_api_vs_self_host. All estimates are planning projections, not ` + `deployment guarantees. Every response carries provenance.serverVersion.`
16311
16323
  });
16312
16324
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
16313
16325
  tools: TOOL_DEFINITIONS
@@ -16359,17 +16371,24 @@ function createMcpServer() {
16359
16371
  };
16360
16372
  }
16361
16373
  const isHandlerError = !!result && typeof result === "object" && "error" in result;
16374
+ const stamped = withProvenance(result);
16362
16375
  return {
16363
16376
  content: [
16364
- { type: "text", text: JSON.stringify(result, null, 2) }
16377
+ { type: "text", text: JSON.stringify(stamped, null, 2) }
16365
16378
  ],
16366
- structuredContent: result,
16379
+ structuredContent: stamped,
16367
16380
  ...isHandlerError ? { isError: true } : {}
16368
16381
  };
16369
16382
  } catch (error) {
16370
16383
  return {
16371
16384
  content: [
16372
- { type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }
16385
+ {
16386
+ type: "text",
16387
+ text: JSON.stringify({
16388
+ error: error instanceof Error ? error.message : String(error),
16389
+ provenance: { serverVersion: SERVER_VERSION, buildStamp: `tokcalc-mcp/${SERVER_VERSION}` }
16390
+ }, null, 2)
16391
+ }
16373
16392
  ],
16374
16393
  isError: true
16375
16394
  };
@@ -16378,5 +16397,6 @@ function createMcpServer() {
16378
16397
  return server;
16379
16398
  }
16380
16399
  export {
16400
+ SERVER_VERSION,
16381
16401
  createMcpServer
16382
16402
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokcalc/mcp-server",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "mcpName": "io.github.stevecrates489-commits/tokcalc",
5
5
  "description": "tokcalc MCP server — open-source LLM serving capacity planner for AI agents. v0.2.1: stdio + stateless HTTP transport with bearer API key auth + KV-backed rate limiting + public hosted endpoint. 7 read-only tools: estimate_capacity, compare_gpus, recommend_topology, estimate_api_vs_self_host, list_models, list_gpus, get_mlperf_benchmarks.",
6
6
  "type": "module",