url-safety-validator-mcp 1.2.3 → 1.2.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 +13 -0
- package/LICENSE +18 -7
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/server.js +15 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
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
|
+
|
|
11
|
+
## [1.2.4] — 2026-04-26
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
- `token_count` field on all tool responses — lets orchestrator budget ledgers track token cost per call
|
|
15
|
+
- `/ready` endpoint — returns 200 when `ANTHROPIC_API_KEY` and `GOOGLE_WEB_RISK_API_KEY` are present, 503 otherwise; enables Railway health-gate and orchestrator pre-flight checks
|
|
16
|
+
- Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error returns
|
|
17
|
+
|
|
5
18
|
## [1.2.3] — 2026-04-26
|
|
6
19
|
|
|
7
20
|
### Improved
|
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/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.5",
|
|
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.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.4",
|
|
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.4",
|
|
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.5';
|
|
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 || '';
|
|
@@ -327,6 +329,7 @@ async function checkUrl(rawUrl) {
|
|
|
327
329
|
_disclaimer: LEGAL_DISCLAIMER
|
|
328
330
|
};
|
|
329
331
|
|
|
332
|
+
result.token_count = Math.ceil(JSON.stringify(result).length / 4);
|
|
330
333
|
saveStats();
|
|
331
334
|
return result;
|
|
332
335
|
}
|
|
@@ -417,6 +420,14 @@ const server = http.createServer(async (req, res) => {
|
|
|
417
420
|
return;
|
|
418
421
|
}
|
|
419
422
|
|
|
423
|
+
if (req.url === '/ready' && (req.method === 'GET' || req.method === 'HEAD')) {
|
|
424
|
+
const checks = { anthropic: !!ANTHROPIC_API_KEY, google_web_risk: !!GOOGLE_WEB_RISK_API_KEY };
|
|
425
|
+
const ready = checks.anthropic && checks.google_web_risk;
|
|
426
|
+
res.writeHead(ready ? 200 : 503, { ...cors, 'Content-Type': 'application/json' });
|
|
427
|
+
res.end(JSON.stringify({ status: ready ? 'ready' : 'not_ready', version: VERSION, checks }));
|
|
428
|
+
return;
|
|
429
|
+
}
|
|
430
|
+
|
|
420
431
|
if (req.url === '/deps' && req.method === 'GET') {
|
|
421
432
|
const depCheck = (hostname, path, extraHeaders) => new Promise((resolve) => {
|
|
422
433
|
const r = https.request({ hostname, path, method: 'GET', headers: { 'User-Agent': 'MCP-HealthCheck/1.0', ...(extraHeaders||{}) } }, (res2) => {
|
|
@@ -465,7 +476,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
465
476
|
|
|
466
477
|
if (req.url === '/.well-known/mcp/server-card.json' && req.method === 'GET') {
|
|
467
478
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
468
|
-
res.end(JSON.stringify({ name: 'URL Safety Validator', version: VERSION, description: 'AI-powered URL safety checker for agents. SAFE/SUSPICIOUS/DANGEROUS verdict with trust score.', url: 'https://url-safety-validator-mcp-production.up.railway.app' }));
|
|
479
|
+
res.end(JSON.stringify({ name: 'URL Safety Validator', version: VERSION, description: 'AI-powered URL safety checker for agents. SAFE/SUSPICIOUS/DANGEROUS verdict with trust score.', url: 'https://url-safety-validator-mcp-production.up.railway.app', transport: 'streamable-http', homepage: 'https://kordagencies.com', token_footprint_min: 411, token_footprint_max: 434, token_footprint_avg: 422, idempotent_tools: ['check_url'], circuit_breaker: false, health_endpoint: '/health', ready_endpoint: '/ready' }));
|
|
469
480
|
return;
|
|
470
481
|
}
|
|
471
482
|
|
|
@@ -526,13 +537,13 @@ const server = http.createServer(async (req, res) => {
|
|
|
526
537
|
} else {
|
|
527
538
|
const tier = checkTier(clientIp, apiKey);
|
|
528
539
|
if (!tier.allowed) {
|
|
529
|
-
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'Free tier limit
|
|
540
|
+
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.', agent_action: 'Inform user that free quota is exhausted. Get 500 calls for $20 at ' + PRO_UPGRADE_URL + ' -- calls never expire.', upgrade_url: PRO_UPGRADE_URL, _disclaimer: LEGAL_DISCLAIMER }) }] } };
|
|
530
541
|
} else {
|
|
531
542
|
recordCall(clientIp, apiKey);
|
|
532
543
|
const result = await checkUrl(url);
|
|
533
544
|
usageLog.push({ tool: 'check_url', ip: clientIp, tier: tier.paid ? 'paid' : 'free', timestamp: nowISO() });
|
|
534
545
|
if (tier.remaining <= 4 && !tier.paid) {
|
|
535
|
-
result._notice = 'Warning: ' + (tier.remaining - 1) + ' free calls remaining this month.
|
|
546
|
+
result._notice = 'Warning: ' + (tier.remaining - 1) + ' free calls remaining this month. Get 500 calls for $20 at ' + PRO_UPGRADE_URL + ' -- calls never expire.';
|
|
536
547
|
}
|
|
537
548
|
response = { jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] } };
|
|
538
549
|
}
|