url-safety-validator-mcp 1.2.23 → 1.2.24

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
@@ -2,6 +2,9 @@
2
2
 
3
3
  All notable changes to URL Safety Validator MCP are documented here.
4
4
 
5
+ ## [1.2.24] — 2026-06-23
6
+ - fix: gate returns HTTP 402 (x402 standard for non-transient quota)
7
+
5
8
  ## [1.2.23] — 2026-06-20
6
9
  - feat: email notification on free tier gate hit
7
10
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "url-safety-validator-mcp",
3
3
  "mcpName": "io.github.OjasKord/url-safety-validator-mcp",
4
- "version": "1.2.23",
4
+ "version": "1.2.24",
5
5
  "description": "URL safety checker for AI agents. Detects phishing, malware, typosquatting before your agent visits any link. BLOCK/ALLOW verdict in one call.",
6
6
  "main": "src/server.js",
7
7
  "scripts": {
package/smithery.yaml CHANGED
@@ -1,4 +1,5 @@
1
1
  name: URL Safety Validator MCP
2
+ agentRole: "URL Safety Specialist — equip before fetching, visiting, or following any untrusted URL"
2
3
  description: "Before your agent fetches, visits, or follows any URL from an untrusted source, call check_url. Returns BLOCK/ALLOW verdict with threat category and trust score. 2 focused tools. Compact schema. Minimal agent context overhead."
3
4
  categories:
4
5
  - Security
package/src/server.js CHANGED
@@ -5,7 +5,7 @@ const fs = require('fs');
5
5
  const crypto = require('crypto');
6
6
  const { Readable } = require('stream');
7
7
 
8
- const VERSION = '1.2.23';
8
+ const VERSION = '1.2.24';
9
9
  const PRO_UPGRADE_URL = 'https://buy.stripe.com/5kQeVc9Ah4n3c8c0h2ebu0t';
10
10
  const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/4gMdR88wddXDfko0h2ebu0u';
11
11
  const ALLOWED_PAYMENT_LINK_IDS = ['plink_1TQzIHD6WvRe6sn3820kFk07', 'plink_1TQzJdD6WvRe6sn3GN8mQkj9'];
@@ -848,6 +848,7 @@ const server = http.createServer(async (req, res) => {
848
848
  const apiKey = req.headers['x-api-key'] || null;
849
849
  const clientIp = (req.headers['x-forwarded-for'] || req.socket.remoteAddress || 'unknown').split(',')[0].trim();
850
850
  let response;
851
+ let statusCode = 200;
851
852
 
852
853
  if (request.method === 'initialize') {
853
854
  response = { jsonrpc: '2.0', id: request.id, result: { protocolVersion: '2024-11-05', capabilities: { tools: {}, resources: {}, prompts: {} }, serverInfo: { name: 'url-safety-validator-mcp', version: VERSION, description: 'Every agentic commerce workflow built on Stripe MPP, Alipay AI Pay, or Shopify UCP has a moment where the agent must navigate to a merchant or supplier URL before it can proceed. This server answers that question in one call -- returning a machine-readable BLOCK / FLAG_AND_PROCEED / ALLOW verdict checked live against Google Web Risk and Google Safe Browsing, every call. Used before any agent URL fetch, page navigation, or redirect follow in payment and procurement workflows.' } } };
@@ -874,6 +875,7 @@ const server = http.createServer(async (req, res) => {
874
875
  } else {
875
876
  const tier = checkTier(clientIp, apiKey);
876
877
  if (!tier.allowed) {
878
+ statusCode = 402;
877
879
  const _gateMonth = getMonthKey();
878
880
  const _gateCalls = (stats.free_tier_calls_by_ip[clientIp] && stats.free_tier_calls_by_ip[clientIp][_gateMonth]) || 0;
879
881
  notifyGateHit('URL Safety Validator', clientIp, 'check_url', _gateCalls, PRO_UPGRADE_URL);
@@ -897,7 +899,7 @@ const server = http.createServer(async (req, res) => {
897
899
  response = { jsonrpc: '2.0', id: request.id, error: { code: -32601, message: 'Method not found: ' + request.method } };
898
900
  }
899
901
 
900
- res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
902
+ res.writeHead(statusCode, { ...cors, 'Content-Type': 'application/json' });
901
903
  res.end(JSON.stringify(response));
902
904
  } catch(e) {
903
905
  res.writeHead(400, { ...cors, 'Content-Type': 'application/json' });