tender-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 +19 -4
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/server.js +30 -20
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
## [1.2.5] - 2026-04-28
|
|
2
|
+
|
|
3
|
+
### Changed
|
|
4
|
+
- Payment links updated to prepaid bundle URLs: 500 searches for $8 -- calls never expire
|
|
5
|
+
- Free tier limit errors now direct agents to prepaid bundle purchase link directly
|
|
6
|
+
|
|
7
|
+
## [1.2.4] - 2026-04-27
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- `token_count` field on all tool responses — lets orchestrator budget ledgers track token cost per call
|
|
11
|
+
- `/ready` endpoint — returns 200 when `ANTHROPIC_API_KEY` and `SAM_GOV_API_KEY` are present, 503 otherwise
|
|
12
|
+
- Phase 4 enhanced error objects: `category`, `retryable`, `retry_after_ms`, `fallback_tool`, `trace_id` on all error paths across both tools
|
|
13
|
+
|
|
1
14
|
## [1.2.3] - 2026-04-26
|
|
2
15
|
|
|
3
16
|
### Improved
|
package/LICENSE
CHANGED
|
@@ -1,6 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026 Kord Agencies
|
|
3
|
+
Copyright (c) 2026 Kord Agencies Pte Ltd
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
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:
|
|
11
|
+
|
|
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": "tender-mcp",
|
|
3
3
|
"mcpName": "io.github.OjasKord/tender-mcp",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.5",
|
|
5
5
|
"description": "Government tender search and AI opportunity scoring for AI agents. UK Contracts Finder, EU TED, US SAM.gov.",
|
|
6
6
|
"main": "src/server.js",
|
|
7
7
|
"scripts": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"validator"
|
|
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/tender-mcp",
|
|
4
4
|
"title": "Tender MCP",
|
|
5
5
|
"description": "Government tender search for AI agents. UK, EU and US procurement opportunities.",
|
|
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/tender-mcp",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"registryType": "npm",
|
|
15
15
|
"identifier": "tender-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-powered tender scoring", "isRequired": true, "isSecret": true }
|
package/src/server.js
CHANGED
|
@@ -3,7 +3,9 @@ const https = require('https');
|
|
|
3
3
|
const crypto = require('crypto');
|
|
4
4
|
const fs = require('fs');
|
|
5
5
|
|
|
6
|
-
const VERSION = '1.2.
|
|
6
|
+
const VERSION = '1.2.5';
|
|
7
|
+
const PRO_UPGRADE_URL = 'https://buy.stripe.com/9B600i5k1bPv2xC6Fqebu0n';
|
|
8
|
+
const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/7sY7sKaEldXDegk0h2ebu0o';
|
|
7
9
|
const PERSIST_FILE = '/tmp/tender_stats.json';
|
|
8
10
|
const RESEND_API_KEY = process.env.RESEND_API_KEY || '';
|
|
9
11
|
const ANTHROPIC_API_KEY = process.env.ANTHROPIC_API_KEY || '';
|
|
@@ -296,7 +298,7 @@ async function executeTool(name, args, tier) {
|
|
|
296
298
|
// ── TOOL 1: search_tenders ──────────────────────────────────────────────────
|
|
297
299
|
if (name === 'search_tenders') {
|
|
298
300
|
const { keyword, company_profile, sources = ['uk', 'eu', 'us'], limit, days_old, min_score } = args;
|
|
299
|
-
if (!keyword) return { error: 'keyword is required', agent_action: 'PROVIDE_REQUIRED_FIELD', _disclaimer: LEGAL_DISCLAIMER };
|
|
301
|
+
if (!keyword) return { error: 'keyword is required', agent_action: 'PROVIDE_REQUIRED_FIELD', category: 'invalid_input', retryable: false, retry_after_ms: null, fallback_tool: 'search_tenders', trace_id: Math.random().toString(36).slice(2, 10), _disclaimer: LEGAL_DISCLAIMER };
|
|
300
302
|
|
|
301
303
|
const fetchLimit = Math.min(limit || 10, 25);
|
|
302
304
|
const daysOld = days_old || 30;
|
|
@@ -375,7 +377,7 @@ async function executeTool(name, args, tier) {
|
|
|
375
377
|
message: 'Pro plan unlocks daily monitoring and award history for these keywords.',
|
|
376
378
|
daily_digest: 'Get all new tenders matching "' + keyword + '" automatically every 24 hours — never miss an opportunity before competitors.',
|
|
377
379
|
award_history: 'See which companies have won similar contracts and at what values — critical for bid pricing strategy.',
|
|
378
|
-
upgrade_url:
|
|
380
|
+
upgrade_url: PRO_UPGRADE_URL
|
|
379
381
|
};
|
|
380
382
|
|
|
381
383
|
return result;
|
|
@@ -384,12 +386,12 @@ async function executeTool(name, args, tier) {
|
|
|
384
386
|
// ── TOOL 2: get_tender_intelligence ────────────────────────────────────────
|
|
385
387
|
if (name === 'get_tender_intelligence') {
|
|
386
388
|
const { mode, keywords, keyword, sources = ['uk', 'eu', 'us'], limit } = args;
|
|
387
|
-
if (!mode) return { error: 'mode is required: DAILY_DIGEST or AWARD_HISTORY', agent_action: 'PROVIDE_REQUIRED_FIELD', _disclaimer: LEGAL_DISCLAIMER };
|
|
389
|
+
if (!mode) return { error: 'mode is required: DAILY_DIGEST or AWARD_HISTORY', agent_action: 'PROVIDE_REQUIRED_FIELD', category: 'invalid_input', retryable: false, retry_after_ms: null, fallback_tool: 'get_tender_intelligence', trace_id: Math.random().toString(36).slice(2, 10), _disclaimer: LEGAL_DISCLAIMER };
|
|
388
390
|
|
|
389
391
|
// ── DAILY_DIGEST ──
|
|
390
392
|
if (mode === 'DAILY_DIGEST') {
|
|
391
393
|
if (!keywords || !Array.isArray(keywords) || keywords.length === 0) {
|
|
392
|
-
return { error: 'keywords array is required for DAILY_DIGEST mode', agent_action: 'PROVIDE_REQUIRED_FIELD', _disclaimer: LEGAL_DISCLAIMER };
|
|
394
|
+
return { error: 'keywords array is required for DAILY_DIGEST mode', agent_action: 'PROVIDE_REQUIRED_FIELD', category: 'invalid_input', retryable: false, retry_after_ms: null, fallback_tool: 'get_tender_intelligence', trace_id: Math.random().toString(36).slice(2, 10), _disclaimer: LEGAL_DISCLAIMER };
|
|
393
395
|
}
|
|
394
396
|
|
|
395
397
|
// Free tier preview: run one keyword, return count only — no full results
|
|
@@ -412,7 +414,7 @@ async function executeTool(name, args, tier) {
|
|
|
412
414
|
keyword_previewed: previewKeyword,
|
|
413
415
|
new_tenders_found_today: previewCount,
|
|
414
416
|
message: previewCount > 0
|
|
415
|
-
? previewCount + ' new tenders matching "' + previewKeyword + '" were posted in the last 24 hours.
|
|
417
|
+
? previewCount + ' new tenders matching "' + previewKeyword + '" were posted in the last 24 hours. Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' -- calls never expire.'
|
|
416
418
|
: 'No new tenders matching "' + previewKeyword + '" today. Pro plan monitors all your keywords daily and alerts you the moment new opportunities appear.',
|
|
417
419
|
what_you_get_on_pro: [
|
|
418
420
|
'All new tenders matching up to 5 keywords checked daily',
|
|
@@ -420,7 +422,7 @@ async function executeTool(name, args, tier) {
|
|
|
420
422
|
'Results from UK, EU, and US simultaneously',
|
|
421
423
|
'500 searches/month'
|
|
422
424
|
],
|
|
423
|
-
upgrade_url:
|
|
425
|
+
upgrade_url: PRO_UPGRADE_URL,
|
|
424
426
|
checked_at: checkedAt,
|
|
425
427
|
_disclaimer: LEGAL_DISCLAIMER
|
|
426
428
|
};
|
|
@@ -456,7 +458,7 @@ async function executeTool(name, args, tier) {
|
|
|
456
458
|
|
|
457
459
|
// ── AWARD_HISTORY ──
|
|
458
460
|
if (mode === 'AWARD_HISTORY') {
|
|
459
|
-
if (!keyword) return { error: 'keyword is required for AWARD_HISTORY mode', agent_action: 'PROVIDE_REQUIRED_FIELD', _disclaimer: LEGAL_DISCLAIMER };
|
|
461
|
+
if (!keyword) return { error: 'keyword is required for AWARD_HISTORY mode', agent_action: 'PROVIDE_REQUIRED_FIELD', category: 'invalid_input', retryable: false, retry_after_ms: null, fallback_tool: 'get_tender_intelligence', trace_id: Math.random().toString(36).slice(2, 10), _disclaimer: LEGAL_DISCLAIMER };
|
|
460
462
|
const maxResults = Math.min(limit || 10, 25);
|
|
461
463
|
|
|
462
464
|
// Free tier preview: run search, return winner count + one sample name only
|
|
@@ -494,7 +496,7 @@ async function executeTool(name, args, tier) {
|
|
|
494
496
|
'Frequency analysis — who dominates your target sector',
|
|
495
497
|
'Identify teaming partners or threats before bidding'
|
|
496
498
|
],
|
|
497
|
-
upgrade_url:
|
|
499
|
+
upgrade_url: PRO_UPGRADE_URL,
|
|
498
500
|
checked_at: checkedAt,
|
|
499
501
|
_disclaimer: LEGAL_DISCLAIMER
|
|
500
502
|
};
|
|
@@ -524,10 +526,10 @@ async function executeTool(name, args, tier) {
|
|
|
524
526
|
};
|
|
525
527
|
}
|
|
526
528
|
|
|
527
|
-
return { error: 'Invalid mode. Use DAILY_DIGEST or AWARD_HISTORY.', agent_action: 'PROVIDE_REQUIRED_FIELD', _disclaimer: LEGAL_DISCLAIMER };
|
|
529
|
+
return { error: 'Invalid mode. Use DAILY_DIGEST or AWARD_HISTORY.', agent_action: 'PROVIDE_REQUIRED_FIELD', category: 'invalid_input', retryable: false, retry_after_ms: null, fallback_tool: 'get_tender_intelligence', trace_id: Math.random().toString(36).slice(2, 10), _disclaimer: LEGAL_DISCLAIMER };
|
|
528
530
|
}
|
|
529
531
|
|
|
530
|
-
return { error: 'Unknown tool: ' + name, agent_action: 'RETRY_IN_2_MIN' };
|
|
532
|
+
return { error: 'Unknown tool: ' + name, agent_action: 'RETRY_IN_2_MIN', category: 'unknown_tool', retryable: false, retry_after_ms: null, fallback_tool: null, trace_id: Math.random().toString(36).slice(2, 10) };
|
|
531
533
|
}
|
|
532
534
|
|
|
533
535
|
// ─── ACCESS CONTROL ───────────────────────────────────────────────────────────
|
|
@@ -549,8 +551,8 @@ function checkAccess(req, toolName) {
|
|
|
549
551
|
if (calls >= FREE_TIER_LIMIT) {
|
|
550
552
|
return {
|
|
551
553
|
allowed: false,
|
|
552
|
-
reason: 'Free tier limit
|
|
553
|
-
upgrade_url:
|
|
554
|
+
reason: 'Free tier limit reached. Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' -- calls never expire.',
|
|
555
|
+
upgrade_url: PRO_UPGRADE_URL,
|
|
554
556
|
tier: 'free_limit_reached'
|
|
555
557
|
};
|
|
556
558
|
}
|
|
@@ -559,7 +561,7 @@ function checkAccess(req, toolName) {
|
|
|
559
561
|
const remaining = FREE_TIER_LIMIT - calls - 1;
|
|
560
562
|
return {
|
|
561
563
|
allowed: true, tier: 'free', remaining,
|
|
562
|
-
warning: remaining <= 2 ? remaining + ' free search' + (remaining === 1 ? '' : 'es') + ' remaining this month.
|
|
564
|
+
warning: remaining <= 2 ? remaining + ' free search' + (remaining === 1 ? '' : 'es') + ' remaining this month. Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' -- calls never expire.' : null
|
|
563
565
|
};
|
|
564
566
|
}
|
|
565
567
|
|
|
@@ -614,9 +616,17 @@ const server = http.createServer(async (req, res) => {
|
|
|
614
616
|
return;
|
|
615
617
|
}
|
|
616
618
|
|
|
619
|
+
if (req.url === '/ready' && (req.method === 'GET' || req.method === 'HEAD')) {
|
|
620
|
+
const checks = { anthropic: !!ANTHROPIC_API_KEY, sam_gov: !!SAM_GOV_API_KEY };
|
|
621
|
+
const ready = checks.anthropic && checks.sam_gov;
|
|
622
|
+
res.writeHead(ready ? 200 : 503, { ...cors, 'Content-Type': 'application/json' });
|
|
623
|
+
res.end(JSON.stringify({ status: ready ? 'ready' : 'not_ready', version: VERSION, checks }));
|
|
624
|
+
return;
|
|
625
|
+
}
|
|
626
|
+
|
|
617
627
|
if (req.url === '/.well-known/mcp/server-card.json') {
|
|
618
628
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
619
|
-
res.end(JSON.stringify({ name: 'tender-mcp', version: VERSION, description: 'Government tender search + AI fit scoring. UK, EU, US. Free tier: 10 searches/month.', tools: tools.map(t => ({ name: t.name, description: t.description.slice(0, 100) })), transport: '
|
|
629
|
+
res.end(JSON.stringify({ name: 'tender-mcp', version: VERSION, description: 'Government tender search + AI fit scoring. UK, EU, US. Free tier: 10 searches/month.', tools: tools.map(t => ({ name: t.name, description: t.description.slice(0, 100) })), transport: 'streamable-http', homepage: 'https://kordagencies.com', author: 'ojas1', token_footprint_min: 300, token_footprint_max: 800, token_footprint_avg: 550, idempotent_tools: ['search_tenders', 'get_tender_intelligence'], circuit_breaker: false, health_endpoint: '/health', ready_endpoint: '/ready' }));
|
|
620
630
|
return;
|
|
621
631
|
}
|
|
622
632
|
|
|
@@ -687,7 +697,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
687
697
|
|
|
688
698
|
if (!access.allowed) {
|
|
689
699
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
690
|
-
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: access.reason, agent_action: access.tier === 'invalid' ? 'PROVIDE_REQUIRED_FIELD' : 'Inform user free tier quota is exhausted.
|
|
700
|
+
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: access.reason, agent_action: access.tier === 'invalid' ? 'PROVIDE_REQUIRED_FIELD' : 'Inform user free tier quota is exhausted. Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' -- calls never expire.', upgrade_url: PRO_UPGRADE_URL, _disclaimer: LEGAL_DISCLAIMER }) }] } }));
|
|
691
701
|
return;
|
|
692
702
|
}
|
|
693
703
|
|
|
@@ -706,15 +716,15 @@ const server = http.createServer(async (req, res) => {
|
|
|
706
716
|
const hidden = total - shown.length;
|
|
707
717
|
result.tenders = shown;
|
|
708
718
|
if (hidden > 0) {
|
|
709
|
-
result._free_tier = 'Showing 3 of ' + total + ' results (' + hidden + ' hidden). ' + (access.remaining || 0) + ' free searches remaining this month.
|
|
719
|
+
result._free_tier = 'Showing 3 of ' + total + ' results (' + hidden + ' hidden). ' + (access.remaining || 0) + ' free searches remaining this month. Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' -- calls never expire.';
|
|
710
720
|
}
|
|
711
721
|
// Gate reasons on scoring for free tier
|
|
712
722
|
if (result.scoring && result.scoring.market_insight) {
|
|
713
|
-
result.scoring.market_insight = '[
|
|
723
|
+
result.scoring.market_insight = '[Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' for market insights]';
|
|
714
724
|
}
|
|
715
725
|
if (result.tenders) {
|
|
716
726
|
result.tenders = result.tenders.map(t => {
|
|
717
|
-
if (t.reasons) { const { reasons, ...rest } = t; return { ...rest, _reasons: '[
|
|
727
|
+
if (t.reasons) { const { reasons, ...rest } = t; return { ...rest, _reasons: '[Get 500 searches for $8 at ' + PRO_UPGRADE_URL + ' for full scoring reasons]' }; }
|
|
718
728
|
return t;
|
|
719
729
|
});
|
|
720
730
|
}
|
|
@@ -737,7 +747,7 @@ const server = http.createServer(async (req, res) => {
|
|
|
737
747
|
|
|
738
748
|
if (req.method === 'GET' && req.url === '/') {
|
|
739
749
|
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
740
|
-
res.end(JSON.stringify({ name: 'tender-mcp', version: VERSION, status: 'ok', tools: 2, free_tier: '10 searches/month, no API key required', description: 'Government tender search + AI fit scoring. UK, EU, US.', upgrade:
|
|
750
|
+
res.end(JSON.stringify({ name: 'tender-mcp', version: VERSION, status: 'ok', tools: 2, free_tier: '10 searches/month, no API key required', description: 'Government tender search + AI fit scoring. UK, EU, US.', upgrade: PRO_UPGRADE_URL }));
|
|
741
751
|
return;
|
|
742
752
|
}
|
|
743
753
|
|