local-model-suitability-mcp 1.1.3 → 1.1.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.5] - 2026-04-28
4
+
5
+ ### Changed
6
+ - Payment links updated to prepaid bundle URLs: 500 calls for $20 -- calls never expire
7
+ - Free tier limit errors now direct agents to prepaid bundle purchase link directly
8
+
9
+ ## [1.1.4] - 2026-04-27
10
+
11
+ ### Added
12
+ - `token_count` field on all tool responses — lets orchestrator budget ledgers track token cost per call
13
+ - `/ready` endpoint — returns 200 when `ANTHROPIC_API_KEY` is present, 503 otherwise
14
+ - Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error returns
15
+
3
16
  ## [1.1.3] - 2026-04-26
4
17
 
5
18
  ### Improved
package/LICENSE CHANGED
@@ -1,9 +1,21 @@
1
- UNLICENSED
1
+ MIT License
2
2
 
3
3
  Copyright (c) 2026 Kord Agencies Pte Ltd
4
4
 
5
- All rights reserved. This software and associated documentation files are proprietary
6
- and confidential. Unauthorized copying, modification, distribution, or use of this
7
- software, in whole or in part, is strictly prohibited.
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
8
11
 
9
- For licensing enquiries: ojas@kordagencies.com
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "local-model-suitability-mcp",
3
3
  "mcpName": "io.github.OjasKord/local-model-suitability-mcp",
4
- "version": "1.1.3",
4
+ "version": "1.1.5",
5
5
  "description": "Check whether a task can run on a local model instead of cloud. Save money on every call that does not need cloud inference.",
6
6
  "main": "src/server.js",
7
7
  "type": "module",
@@ -26,7 +26,7 @@
26
26
  "llama"
27
27
  ],
28
28
  "author": "Kord Agencies Pte Ltd <ojas@kordagencies.com>",
29
- "license": "UNLICENSED",
29
+ "license": "MIT",
30
30
  "homepage": "https://kordagencies.com",
31
31
  "repository": {
32
32
  "type": "git",
package/server.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "name": "io.github.OjasKord/local-model-suitability-mcp",
4
4
  "title": "Local Model Suitability MCP",
5
5
  "description": "Check if a task runs locally vs cloud. Save money on calls that don't need cloud inference.",
6
- "version": "1.1.3",
6
+ "version": "1.1.4",
7
7
  "websiteUrl": "https://kordagencies.com",
8
8
  "repository": {
9
9
  "url": "https://github.com/OjasKord/local-model-suitability-mcp",
@@ -13,7 +13,7 @@
13
13
  {
14
14
  "registryType": "npm",
15
15
  "identifier": "local-model-suitability-mcp",
16
- "version": "1.1.3",
16
+ "version": "1.1.4",
17
17
  "transport": { "type": "stdio" },
18
18
  "environmentVariables": [
19
19
  { "name": "ANTHROPIC_API_KEY", "description": "Anthropic API key for Claude routing analysis", "isRequired": true, "isSecret": true }
package/src/server.js CHANGED
@@ -3,7 +3,9 @@ import { createHmac, timingSafeEqual } from 'crypto';
3
3
  import { readFileSync, writeFileSync } from 'fs';
4
4
  import Anthropic from '@anthropic-ai/sdk';
5
5
 
6
- const VERSION = '1.1.3';
6
+ const VERSION = '1.1.5';
7
+ const PRO_UPGRADE_URL = 'https://buy.stripe.com/cNibJ08wd7zf6NS0h2ebu0p';
8
+ const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/28E9AS27PbPvfkoe7Sebu0q';
7
9
  const PERSIST_FILE = '/tmp/lms_stats.json';
8
10
  const LEGAL_DISCLAIMER = 'AI-powered routing analysis. We do not log or store your task content. Results are for cost-optimisation guidance only. Provider maximum liability is limited to subscription fees paid in the preceding 3 months. Full terms: kordagencies.com/terms.html';
9
11
 
@@ -191,7 +193,7 @@ Respond ONLY with a JSON object — no markdown, no explanation outside the JSON
191
193
  };
192
194
  }
193
195
 
194
- return {
196
+ const _rLms = {
195
197
  ...parsed,
196
198
  task_quality_threshold: quality,
197
199
  data_sensitivity: sensitivity,
@@ -199,6 +201,8 @@ Respond ONLY with a JSON object — no markdown, no explanation outside the JSON
199
201
  checked_at: nowISO(),
200
202
  _disclaimer: LEGAL_DISCLAIMER
201
203
  };
204
+ _rLms.token_count = Math.ceil(JSON.stringify(_rLms).length / 4);
205
+ return _rLms;
202
206
  }
203
207
 
204
208
  // ── Stripe webhook ────────────────────────────────────────────────────────────
@@ -286,6 +290,14 @@ const server = createServer(async (req, res) => {
286
290
  return;
287
291
  }
288
292
 
293
+ if (req.url === '/ready' && (req.method === 'GET' || req.method === 'HEAD')) {
294
+ const checks = { anthropic: !!(process.env.ANTHROPIC_API_KEY) };
295
+ const ready = checks.anthropic;
296
+ res.writeHead(ready ? 200 : 503, { ...cors, 'Content-Type': 'application/json' });
297
+ res.end(JSON.stringify({ status: ready ? 'ready' : 'not_ready', version: VERSION, checks }));
298
+ return;
299
+ }
300
+
289
301
  // Deps
290
302
  if (req.url === '/deps' && req.method === 'GET') {
291
303
  let anthropicOk = false;
@@ -324,7 +336,7 @@ const server = createServer(async (req, res) => {
324
336
  // Server card (Smithery)
325
337
  if (req.url === '/.well-known/mcp/server-card.json') {
326
338
  res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
327
- res.end(JSON.stringify({ name: 'local-model-suitability-mcp', version: VERSION, description: 'Check whether a task can run locally instead of cloud — save money on every call that doesn\'t need cloud inference.', tools: [TOOL_DEFINITION], transport: 'stdio', homepage: 'https://kordagencies.com', author: 'ojas1' }));
339
+ res.end(JSON.stringify({ name: 'local-model-suitability-mcp', version: VERSION, description: 'Check whether a task can run locally instead of cloud — save money on every call that doesn\'t need cloud inference.', tools: [TOOL_DEFINITION], transport: 'streamable-http', homepage: 'https://kordagencies.com', author: 'ojas1', token_footprint_min: 204, token_footprint_max: 230, token_footprint_avg: 217, idempotent_tools: ['check_local_viability'], circuit_breaker: false, health_endpoint: '/health', ready_endpoint: '/ready' }));
328
340
  return;
329
341
  }
330
342
 
@@ -383,7 +395,7 @@ const server = createServer(async (req, res) => {
383
395
  if (!access.allowed) {
384
396
  response = {
385
397
  jsonrpc: '2.0', id: request.id,
386
- result: { content: [{ type: 'text', text: JSON.stringify({ error: `Free tier limit of ${FREE_TIER_LIMIT} calls/month reached. You have seen it work -- upgrade to Pro ($99/month) at kordagencies.com to continue saving on cloud costs.`, agent_action: 'Inform user free tier quota is exhausted. Upgrade available at kordagencies.com', upgrade_url: 'https://kordagencies.com' }) }] }
398
+ result: { content: [{ type: 'text', text: JSON.stringify({ error: `Free tier limit reached. Get 500 calls for $20 at ${PRO_UPGRADE_URL} -- calls never expire.`, agent_action: `Inform user free tier quota is exhausted. Get 500 calls for $20 at ${PRO_UPGRADE_URL} -- calls never expire.`, upgrade_url: PRO_UPGRADE_URL }) }] }
387
399
  };
388
400
  } else {
389
401
  if (access.tier === 'free') incrementFreeTier(clientIp);
@@ -401,12 +413,12 @@ const server = createServer(async (req, res) => {
401
413
  analysis_type: result.analysis_type,
402
414
  checked_at: result.checked_at,
403
415
  _disclaimer: result._disclaimer,
404
- upgrade_url: 'https://kordagencies.com'
416
+ upgrade_url: PRO_UPGRADE_URL
405
417
  };
406
418
  if (access.remaining <= 4) {
407
- freeResult._notice = `Warning: ${access.remaining} free calls remaining this month. Upgrade to Pro at kordagencies.com to keep saving on cloud costs.`;
419
+ freeResult._notice = `Warning: ${access.remaining} free calls remaining this month. Get 500 calls for $20 at ${PRO_UPGRADE_URL} -- calls never expire.`;
408
420
  } else {
409
- freeResult._notice = `${FREE_TIER_LIMIT - access.remaining + 1}/${FREE_TIER_LIMIT} free calls used. Full response (cost savings, model recommendations) on Pro ($99/month) at kordagencies.com.`;
421
+ freeResult._notice = `${FREE_TIER_LIMIT - access.remaining + 1}/${FREE_TIER_LIMIT} free calls used. Get 500 calls for $20 at ${PRO_UPGRADE_URL} -- calls never expire. Includes full cost savings and model recommendations.`;
410
422
  }
411
423
  response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify(freeResult) }] } };
412
424
  } else {