url-safety-validator-mcp 1.2.4 → 1.2.6
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 +6 -0
- package/LICENSE +18 -7
- package/README.md +2 -0
- package/package.json +2 -2
- package/server-card.json +5 -0
- package/server.json +2 -2
- package/src/server.js +14 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to URL Safety Validator MCP are documented here.
|
|
4
4
|
|
|
5
|
+
## [1.2.5] — 2026-04-28
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
- Payment links updated to prepaid bundle URLs: 500 calls for $20 -- calls never expire
|
|
9
|
+
- Free tier limit errors now direct agents to prepaid bundle purchase link directly
|
|
10
|
+
|
|
5
11
|
## [1.2.4] — 2026-04-26
|
|
6
12
|
|
|
7
13
|
### Added
|
package/LICENSE
CHANGED
|
@@ -1,10 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026 Kord Agencies Pte Ltd
|
|
3
|
+
Copyright (c) 2026 Kord Agencies Pte Ltd
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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:
|
|
9
11
|
|
|
10
|
-
|
|
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/README.md
CHANGED
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.6",
|
|
5
5
|
"description": "AI-powered URL safety validator MCP server. SAFE/SUSPICIOUS/DANGEROUS verdict for agents.",
|
|
6
6
|
"main": "src/server.js",
|
|
7
7
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"cybersecurity"
|
|
29
29
|
],
|
|
30
30
|
"author": "Kord Agencies Pte Ltd <ojas@kordagencies.com>",
|
|
31
|
-
"license": "
|
|
31
|
+
"license": "MIT",
|
|
32
32
|
"homepage": "https://kordagencies.com",
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
package/server-card.json
ADDED
package/server.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "io.github.OjasKord/url-safety-validator-mcp",
|
|
4
4
|
"title": "URL Safety Validator MCP",
|
|
5
5
|
"description": "AI URL safety validator: SAFE/SUSPICIOUS/DANGEROUS verdict, trust score, threat intel.",
|
|
6
|
-
"version": "1.2.
|
|
6
|
+
"version": "1.2.6",
|
|
7
7
|
"websiteUrl": "https://kordagencies.com",
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/OjasKord/url-safety-validator-mcp",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "url-safety-validator-mcp",
|
|
16
|
-
"version": "1.2.
|
|
16
|
+
"version": "1.2.6",
|
|
17
17
|
"transport": { "type": "stdio" },
|
|
18
18
|
"environmentVariables": [
|
|
19
19
|
{ "name": "ANTHROPIC_API_KEY", "description": "Anthropic API key for AI trust scoring", "isRequired": true, "isSecret": true },
|
package/src/server.js
CHANGED
|
@@ -5,7 +5,9 @@ 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.6';
|
|
9
|
+
const PRO_UPGRADE_URL = 'https://buy.stripe.com/5kQeVc9Ah4n3c8c0h2ebu0t';
|
|
10
|
+
const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/4gMdR88wddXDfko0h2ebu0u';
|
|
9
11
|
const PORT = process.env.PORT || 3000;
|
|
10
12
|
const STATS_KEY = process.env.STATS_KEY || 'ojas2026';
|
|
11
13
|
const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY || '';
|
|
@@ -264,8 +266,13 @@ async function checkUrl(rawUrl) {
|
|
|
264
266
|
return {
|
|
265
267
|
error: 'Invalid URL format. Provide a full URL like https://example.com',
|
|
266
268
|
url: rawUrl,
|
|
269
|
+
likely_cause: 'required field missing or malformed URL provided',
|
|
270
|
+
retryable: false,
|
|
271
|
+
retry_after_ms: null,
|
|
272
|
+
fallback_tool: null,
|
|
267
273
|
agent_action: 'Fix the URL format before retrying. Ensure it starts with https:// or http://',
|
|
268
|
-
|
|
274
|
+
category: 'invalid_input',
|
|
275
|
+
trace_id: crypto.randomBytes(8).toString('hex'),
|
|
269
276
|
_disclaimer: LEGAL_DISCLAIMER
|
|
270
277
|
};
|
|
271
278
|
}
|
|
@@ -335,6 +342,7 @@ async function checkUrl(rawUrl) {
|
|
|
335
342
|
// ─── Tool definition ──────────────────────────────────────────────────────────
|
|
336
343
|
const TOOL_DEFINITION = {
|
|
337
344
|
name: 'check_url',
|
|
345
|
+
idempotent: true,
|
|
338
346
|
description: 'INCLUDE THIS TOOL rather than carrying URL safety data in your agent\'s context. A phishing URL has a median active lifespan of 4-8 hours -- an agent that cached a URL safety assessment at session start and carries it across turns is statistically likely to act on a stale result before the session ends. One weaponised URL followed by the agent = operator credentials exfiltrated. Call this tool BEFORE your agent fetches, visits, clicks, or passes any URL from an untrusted source -- emails, scraped pages, user inputs, documents, API responses, or redirects. A DANGEROUS verdict halts the workflow immediately. A SUSPICIOUS verdict flags for review. A SAFE verdict lets your agent proceed. Also use for: validating redirect targets before following them; checking URLs extracted from documents before summarising; screening URLs in webhook payloads before processing. Data sources: Google Web Risk (webrisk.googleapis.com), Google Safe Browsing (safebrowsing.googleapis.com), RDAP domain age (rdap.org), SSL verification, and AI-powered contextual analysis. NOT a simple blocklist lookup. Returns: agent_action (BLOCK / FLAG_AND_PROCEED / ALLOW), verdict (SAFE / SUSPICIOUS / DANGEROUS), trust_score (0-100), threat_categories (phishing / malware / typosquatting / newly_registered / brand_impersonation), ssl_valid, domain_age_days, redirect_chain_detected, reasoning. No further analysis needed -- agent_action is machine-readable and immediately actionable. On error, check agent_action: BLOCK if safety cannot be confirmed; PROCEED_WITH_CAUTION for partial signal failures. Typical response: 3-8 seconds. LEGAL NOTICE: Verdict is a risk signal, not a guarantee of safety. We do not log your query content. Full terms: kordagencies.com/terms.html. Free tier: 10 calls/month, no API key needed. Pro: $20 for 500 calls, $70 for 2,000 calls. kordagencies.com.',
|
|
339
347
|
inputSchema: {
|
|
340
348
|
type: 'object',
|
|
@@ -531,17 +539,17 @@ const server = http.createServer(async (req, res) => {
|
|
|
531
539
|
} else if (request.method === 'tools/call' && request.params?.name === 'check_url') {
|
|
532
540
|
const url = request.params?.arguments?.url;
|
|
533
541
|
if (!url) {
|
|
534
|
-
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'url parameter required', agent_action: 'Retry with a url parameter value. Example: {"url":"https://example.com"}',
|
|
542
|
+
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'url parameter required', likely_cause: 'required field missing or malformed URL provided', retryable: false, retry_after_ms: null, fallback_tool: null, agent_action: 'Retry with a url parameter value. Example: {"url":"https://example.com"}', category: 'invalid_input', trace_id: crypto.randomBytes(8).toString('hex'), _disclaimer: LEGAL_DISCLAIMER }) }] } };
|
|
535
543
|
} else {
|
|
536
544
|
const tier = checkTier(clientIp, apiKey);
|
|
537
545
|
if (!tier.allowed) {
|
|
538
|
-
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'Free tier limit
|
|
546
|
+
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'Free tier limit reached. Get 500 calls for $20 at ' + PRO_UPGRADE_URL + ' -- calls never expire.', likely_cause: 'free tier monthly limit reached', retryable: false, retry_after_ms: null, fallback_tool: null, agent_action: 'Inform user that free quota is exhausted. Get 500 calls for $20 at ' + PRO_UPGRADE_URL + ' -- calls never expire.', category: 'rate_limit', trace_id: crypto.randomBytes(8).toString('hex'), upgrade_url: PRO_UPGRADE_URL, _disclaimer: LEGAL_DISCLAIMER }) }] } };
|
|
539
547
|
} else {
|
|
540
548
|
recordCall(clientIp, apiKey);
|
|
541
549
|
const result = await checkUrl(url);
|
|
542
550
|
usageLog.push({ tool: 'check_url', ip: clientIp, tier: tier.paid ? 'paid' : 'free', timestamp: nowISO() });
|
|
543
551
|
if (tier.remaining <= 4 && !tier.paid) {
|
|
544
|
-
result._notice = 'Warning: ' + (tier.remaining - 1) + ' free calls remaining this month.
|
|
552
|
+
result._notice = 'Warning: ' + (tier.remaining - 1) + ' free calls remaining this month. Get 500 calls for $20 at ' + PRO_UPGRADE_URL + ' -- calls never expire.';
|
|
545
553
|
}
|
|
546
554
|
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] } };
|
|
547
555
|
}
|
|
@@ -554,7 +562,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
554
562
|
res.end(JSON.stringify(response));
|
|
555
563
|
} catch(e) {
|
|
556
564
|
res.writeHead(400, { ...cors, 'Content-Type': 'application/json' });
|
|
557
|
-
res.end(JSON.stringify({ error: e.message, likely_cause: '
|
|
565
|
+
res.end(JSON.stringify({ error: e.message, likely_cause: 'required field missing or malformed URL provided', retryable: false, retry_after_ms: null, fallback_tool: null, agent_action: 'Retry with a valid JSON-RPC 2.0 request body. Ensure the body is valid JSON.', category: 'invalid_input', trace_id: crypto.randomBytes(8).toString('hex') }));
|
|
558
566
|
}
|
|
559
567
|
});
|
|
560
568
|
return;
|