url-safety-validator-mcp 1.2.15 → 1.2.18
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 +9 -0
- package/package.json +1 -1
- package/src/server.js +12 -5
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to URL Safety Validator MCP are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.2.18] — 2026-06-15
|
|
6
|
+
- feat: add hold_reason, retry_after, escalation_path to FLAG_AND_PROCEED (SUSPICIOUS) responses in check_url
|
|
7
|
+
|
|
8
|
+
## [1.2.17] — 2026-06-15
|
|
9
|
+
- feat: reposition tool description for agentic payment rail discovery -- Stripe MPP, Alipay AI Pay, Shopify UCP trigger vocabulary in check_url and initialize description
|
|
10
|
+
|
|
11
|
+
## [1.2.16] — 2026-06-11
|
|
12
|
+
- feat: add /.well-known/mcp/server-card.json static metadata endpoint
|
|
13
|
+
|
|
5
14
|
## [1.2.15] — 2026-06-11
|
|
6
15
|
- fix: bump version past existing npm publish (1.2.14 already on registry)
|
|
7
16
|
|
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.
|
|
4
|
+
"version": "1.2.18",
|
|
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/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.
|
|
8
|
+
const VERSION = '1.2.18';
|
|
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 PORT = process.env.PORT || 3000;
|
|
@@ -467,6 +467,13 @@ async function checkUrl(rawUrl) {
|
|
|
467
467
|
_disclaimer: LEGAL_DISCLAIMER
|
|
468
468
|
};
|
|
469
469
|
|
|
470
|
+
if (verdict === 'SUSPICIOUS') {
|
|
471
|
+
result.hold_reason = ai.available && ai.threat_categories.length > 0
|
|
472
|
+
? ai.threat_categories[0]
|
|
473
|
+
: 'URL flagged as suspicious by Google Web Risk or Google Safe Browsing threat databases';
|
|
474
|
+
result.retry_after = null;
|
|
475
|
+
result.escalation_path = 'Do not follow this URL for any payment transaction -- verify destination domain through independent means before proceeding';
|
|
476
|
+
}
|
|
470
477
|
result.token_count = Math.ceil(JSON.stringify(result).length / 4);
|
|
471
478
|
saveStats();
|
|
472
479
|
return result;
|
|
@@ -476,7 +483,7 @@ async function checkUrl(rawUrl) {
|
|
|
476
483
|
const TOOL_DEFINITION = {
|
|
477
484
|
name: 'check_url',
|
|
478
485
|
idempotent: true,
|
|
479
|
-
description: 'Call this BEFORE your agent fetches,
|
|
486
|
+
description: 'Call this BEFORE your agent fetches, follows, or forwards any URL in an agentic commerce workflow -- at the moment a merchant site, supplier portal, or payment redirect URL is received and no navigation has occurred. Checks live against Google Web Risk (webrisk.googleapis.com) and Google Safe Browsing (safebrowsing.googleapis.com). Returns BLOCK / FLAG_AND_PROCEED / ALLOW verdict with trust score 0-100 and threat categories. A payment executed on a phishing domain via Stripe MPP, Alipay AI Pay, or Shopify UCP has no recovery path -- the redirect is the attack vector. A DANGEROUS verdict means halt immediately. Returns machine-ready verdict, no further analysis needed.',
|
|
480
487
|
inputSchema: {
|
|
481
488
|
type: 'object',
|
|
482
489
|
properties: {
|
|
@@ -521,7 +528,7 @@ function setupStdio() {
|
|
|
521
528
|
const request = JSON.parse(line);
|
|
522
529
|
let response;
|
|
523
530
|
if (request.method === 'initialize') {
|
|
524
|
-
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: '
|
|
531
|
+
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.' } } };
|
|
525
532
|
} else if (request.method === 'notifications/initialized') {
|
|
526
533
|
continue;
|
|
527
534
|
} else if (request.method === 'tools/list') {
|
|
@@ -646,7 +653,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
646
653
|
|
|
647
654
|
if (req.url === '/.well-known/mcp/server-card.json' && req.method === 'GET') {
|
|
648
655
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
649
|
-
res.end(JSON.stringify({
|
|
656
|
+
res.end(JSON.stringify({ serverInfo: { name: 'url-safety-validator-mcp', version: VERSION }, tools: [{ name: TOOL_DEFINITION.name, description: TOOL_DEFINITION.description.slice(0, 150) }], resources: [], prompts: [] }));
|
|
650
657
|
return;
|
|
651
658
|
}
|
|
652
659
|
|
|
@@ -771,7 +778,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
771
778
|
let response;
|
|
772
779
|
|
|
773
780
|
if (request.method === 'initialize') {
|
|
774
|
-
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: '
|
|
781
|
+
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.' } } };
|
|
775
782
|
} else if (request.method === 'notifications/initialized') {
|
|
776
783
|
res.writeHead(204, cors); res.end(); return;
|
|
777
784
|
} else if (request.method === 'tools/list') {
|