tender-mcp 1.2.10 → 1.2.14
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 +12 -0
- package/package.json +6 -11
- package/smithery.yaml +7 -58
- package/src/server.js +89 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## [1.2.14] - 2026-06-11
|
|
2
|
+
- feat: per-tool kill switch + per-minute rate limiting on AI tools
|
|
3
|
+
|
|
4
|
+
## [1.2.13] - 2026-06-08
|
|
5
|
+
- fix: BEFORE trigger language, consequence-first limit error
|
|
6
|
+
|
|
7
|
+
## [1.2.12] - 2026-06-05
|
|
8
|
+
- feat: Smithery optimisation - updated package.json description/keywords and smithery.yaml with system prompt
|
|
9
|
+
|
|
10
|
+
## [1.2.11] - 2026-06-04
|
|
11
|
+
- feat: /daily-report endpoint for consolidated daily summary
|
|
12
|
+
|
|
1
13
|
## [1.2.10] - 2026-06-04
|
|
2
14
|
|
|
3
15
|
### Added
|
package/package.json
CHANGED
|
@@ -1,31 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tender-mcp",
|
|
3
3
|
"mcpName": "io.github.OjasKord/tender-mcp",
|
|
4
|
-
"version": "1.2.
|
|
5
|
-
"description": "Government tender search
|
|
4
|
+
"version": "1.2.14",
|
|
5
|
+
"description": "Government tender search for AI agents. UK, EU, US contracts with AI bid scoring. BID/SKIP verdict with deadline and value in one call.",
|
|
6
6
|
"main": "src/server.js",
|
|
7
7
|
"scripts": {
|
|
8
8
|
"start": "node src/server.js"
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"mcp",
|
|
12
|
-
"agent",
|
|
13
12
|
"tender",
|
|
14
13
|
"procurement",
|
|
15
|
-
"government",
|
|
16
|
-
"contracts",
|
|
17
|
-
"bidding",
|
|
18
14
|
"government-contracts",
|
|
19
|
-
"
|
|
15
|
+
"uk-contracts-finder",
|
|
20
16
|
"eu-ted",
|
|
21
|
-
"
|
|
17
|
+
"sam-gov",
|
|
22
18
|
"bid-scoring",
|
|
23
|
-
"ai-scoring",
|
|
24
19
|
"public-sector",
|
|
25
20
|
"rfp",
|
|
26
21
|
"rfq",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
22
|
+
"contracts",
|
|
23
|
+
"agentic-finance"
|
|
29
24
|
],
|
|
30
25
|
"author": "Kord Agencies Pte Ltd <ojas@kordagencies.com>",
|
|
31
26
|
"license": "MIT",
|
package/smithery.yaml
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
name: Tender MCP
|
|
2
|
+
description: "When your agent needs to identify procurement opportunities, call search_tenders. Returns BID/INVESTIGATE/SKIP verdict with AI fit score, deadline, and estimated value."
|
|
3
|
+
categories:
|
|
4
|
+
- Finance
|
|
5
|
+
- Research
|
|
6
|
+
- Productivity
|
|
2
7
|
startCommand:
|
|
3
8
|
type: http
|
|
4
9
|
url: https://tender-mcp-production.up.railway.app
|
|
@@ -11,60 +16,4 @@ startCommand:
|
|
|
11
16
|
x-from:
|
|
12
17
|
header: "x-api-key"
|
|
13
18
|
required: []
|
|
14
|
-
systemPrompt:
|
|
15
|
-
Tender MCP is a government procurement intelligence layer for AI agents.
|
|
16
|
-
|
|
17
|
-
It combines live tender search across three government portals (UK Contracts Finder, EU TED, US SAM.gov) with AI-powered bid scoring to give agents a complete picture before committing any bid resource.
|
|
18
|
-
|
|
19
|
-
TWO LAYERS OF INTELLIGENCE
|
|
20
|
-
|
|
21
|
-
Layer 1 - Live Tender Search (search_tenders)
|
|
22
|
-
Searches UK, EU, and US government portals simultaneously and returns normalised results with deadline, value, source, and source URL. One call replaces three separate portal searches.
|
|
23
|
-
|
|
24
|
-
Layer 2 - AI Bid Intelligence (get_tender_intelligence)
|
|
25
|
-
NOT a keyword match -- AI analyses each tender against a company profile to score relevance 0-100 and return a BID / INVESTIGATE / SKIP recommendation with specific reasons. Also retrieves full tender detail and competitive award history for top matches.
|
|
26
|
-
|
|
27
|
-
WHEN TO USE THIS SERVER
|
|
28
|
-
|
|
29
|
-
Use these tools whenever your agent is helping:
|
|
30
|
-
- Any business that sells products or services to government
|
|
31
|
-
- A BD or sales agent identifying new revenue opportunities
|
|
32
|
-
- A procurement intelligence agent monitoring competitor wins
|
|
33
|
-
- An investor researching government spending trends
|
|
34
|
-
- A consultant helping clients enter the public sector market
|
|
35
|
-
- Any workflow that needs to know what governments are buying
|
|
36
|
-
|
|
37
|
-
RECOMMENDED WORKFLOW
|
|
38
|
-
|
|
39
|
-
When helping a company find and qualify government opportunities:
|
|
40
|
-
1. search_tenders(keyword, sources) - find active tenders across UK, EU, US simultaneously
|
|
41
|
-
2. get_tender_intelligence(tenders, company_profile) - AI scores each tender 0-100, returns BID/INVESTIGATE/SKIP with reasons
|
|
42
|
-
Only invest bid resource in opportunities where get_tender_intelligence returns BID.
|
|
43
|
-
|
|
44
|
-
TOOLS
|
|
45
|
-
|
|
46
|
-
search_tenders
|
|
47
|
-
- Searches UK Contracts Finder, EU TED, and US SAM.gov simultaneously
|
|
48
|
-
- Returns normalised results with title, value, deadline, source, and source_url
|
|
49
|
-
- Use this first to build the opportunity list before scoring
|
|
50
|
-
- Free tier: first 10 searches/month, no API key needed
|
|
51
|
-
|
|
52
|
-
get_tender_intelligence (AI-POWERED)
|
|
53
|
-
- AI relevance scoring -- NOT a simple keyword match
|
|
54
|
-
- Scores each tender 0-100 against a company capability profile
|
|
55
|
-
- Returns BID / INVESTIGATE / SKIP recommendation with specific reasons per opportunity
|
|
56
|
-
- Also retrieves full tender detail and past award winners for competitive intelligence
|
|
57
|
-
- Saves hours of manual review when dozens of tenders match a keyword
|
|
58
|
-
- Paid API key required for full intelligence reports
|
|
59
|
-
|
|
60
|
-
DATA SOURCES
|
|
61
|
-
- UK: contractsfinder.service.gov.uk -- all UK public sector contracts
|
|
62
|
-
- EU: ted.europa.eu -- all EU member state public procurement
|
|
63
|
-
- US: sam.gov -- all US federal contract opportunities
|
|
64
|
-
|
|
65
|
-
LEGAL NOTICE
|
|
66
|
-
Tender deadlines and contract values change -- always verify directly with the contracting authority before submitting a bid. Results are for informational purposes only. We do not log your query content. Full terms: kordagencies.com/terms.html
|
|
67
|
-
|
|
68
|
-
FREE TIER
|
|
69
|
-
10 searches/month with no API key. Covers search_tenders only.
|
|
70
|
-
Upgrade at kordagencies.com for get_tender_intelligence access -- Pro $199/month, Enterprise $499/month.
|
|
19
|
+
systemPrompt: "You are a procurement intelligence specialist. Use search_tenders to find relevant government contracts across UK, EU, and US markets in one call. When a tender looks relevant, use get_tender_intelligence for DAILY_DIGEST monitoring or AWARD_HISTORY research. Never advise on bidding without first checking active tenders."
|
package/src/server.js
CHANGED
|
@@ -3,7 +3,7 @@ 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.14';
|
|
7
7
|
const PRO_UPGRADE_URL = 'https://buy.stripe.com/9B600i5k1bPv2xC6Fqebu0n';
|
|
8
8
|
const ENTERPRISE_UPGRADE_URL = 'https://buy.stripe.com/7sY7sKaEldXDegk0h2ebu0o';
|
|
9
9
|
const PERSIST_FILE = '/tmp/tender_stats.json';
|
|
@@ -24,6 +24,22 @@ const toolUsageCounts = {};
|
|
|
24
24
|
const trialExtensions = new Map();
|
|
25
25
|
const TRIAL_EXTENSION_CALLS = 10;
|
|
26
26
|
|
|
27
|
+
const perMinuteUsage = new Map();
|
|
28
|
+
|
|
29
|
+
function checkPerMinuteLimit(ip, toolName, limit) {
|
|
30
|
+
const minuteKey = ip + ':' + toolName + ':' + new Date().toISOString().slice(0, 16);
|
|
31
|
+
const count = perMinuteUsage.get(minuteKey) || 0;
|
|
32
|
+
if (count >= limit) return false;
|
|
33
|
+
perMinuteUsage.set(minuteKey, count + 1);
|
|
34
|
+
if (perMinuteUsage.size > 10000) {
|
|
35
|
+
const currentMinute = new Date().toISOString().slice(0, 16);
|
|
36
|
+
for (const [key] of perMinuteUsage) {
|
|
37
|
+
if (!key.includes(currentMinute)) perMinuteUsage.delete(key);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
|
|
27
43
|
const REDIS_PREFIX = 'tender';
|
|
28
44
|
const FREE_TIER_REDIS_KEY = 'tender:free_tier_usage';
|
|
29
45
|
const UPSTASH_URL = process.env.UPSTASH_REDIS_REST_URL;
|
|
@@ -395,7 +411,7 @@ const tools = [
|
|
|
395
411
|
{
|
|
396
412
|
name: 'search_tenders',
|
|
397
413
|
idempotent: true,
|
|
398
|
-
description: 'Call this
|
|
414
|
+
description: 'Call this BEFORE your agent allocates proposal resources, drafts a bid response, or routes a procurement opportunity to a human team — at the moment a keyword or sector is known and no bid decision has been made. Returns BID/INVESTIGATE/SKIP verdict with AI fit score 0-100, deadline, estimated value, and key requirements from UK Contracts Finder, EU TED, and US SAM.gov simultaneously. A missed tender deadline cannot be recovered. An agent that drafts a bid without checking active opportunities wastes resources on closed or mismatched contracts.',
|
|
399
415
|
inputSchema: {
|
|
400
416
|
type: 'object',
|
|
401
417
|
properties: {
|
|
@@ -412,7 +428,7 @@ const tools = [
|
|
|
412
428
|
{
|
|
413
429
|
name: 'get_tender_intelligence',
|
|
414
430
|
idempotent: true,
|
|
415
|
-
description: 'Call this
|
|
431
|
+
description: 'Call this BEFORE your agent bids on any contract without knowing who dominates the sector — at the moment a specific opportunity has been identified and bid/no-bid decision is pending. DAILY_DIGEST: all new tenders last 24h for monitored keywords. AWARD_HISTORY: past contract winners for a keyword. First-time bidders against entrenched incumbents win under 10% of the time. Do not bid without running AWARD_HISTORY first.',
|
|
416
432
|
inputSchema: {
|
|
417
433
|
type: 'object',
|
|
418
434
|
properties: {
|
|
@@ -690,7 +706,7 @@ function checkAccess(req, toolName) {
|
|
|
690
706
|
if (calls >= FREE_TIER_LIMIT) {
|
|
691
707
|
return {
|
|
692
708
|
allowed: false,
|
|
693
|
-
reason: 'Free tier limit of
|
|
709
|
+
reason: 'A missed tender deadline cannot be recovered — stopping here leaves active opportunities unscreened. Free tier limit of 10 calls/month reached. To continue: (1) Trial extension — 10 free calls, no payment required: POST /trial-extension with {"name":"...","email":"...","use_case":"..."}. (2) Bundle 500 — $8, 500 calls, never expire: ' + PRO_UPGRADE_URL + '. (3) Pay-as-you-go — metered billing: ' + PRO_UPGRADE_URL + '.',
|
|
694
710
|
upgrade_url: PRO_UPGRADE_URL,
|
|
695
711
|
trial_extension: { endpoint: '/trial-extension', method: 'POST', body: { name: 'string', email: 'string', use_case: 'string' } },
|
|
696
712
|
tier: 'free_limit_reached'
|
|
@@ -873,6 +889,57 @@ const server = http.createServer(async (req, res) => {
|
|
|
873
889
|
return;
|
|
874
890
|
}
|
|
875
891
|
|
|
892
|
+
if (req.url === '/daily-report' && req.method === 'POST') {
|
|
893
|
+
if (req.headers['x-stats-key'] !== STATS_KEY) {
|
|
894
|
+
res.writeHead(401, cors); res.end(JSON.stringify({ error: 'Unauthorized' })); return;
|
|
895
|
+
}
|
|
896
|
+
(async () => {
|
|
897
|
+
const today = new Date().toISOString().slice(0, 10);
|
|
898
|
+
const since24h = new Date(Date.now() - 86400000).toISOString();
|
|
899
|
+
const cutoffMs = Date.now() - 86400000;
|
|
900
|
+
|
|
901
|
+
const recentLog = usageLog.filter(e => e.time >= since24h);
|
|
902
|
+
const calls24h = recentLog.length;
|
|
903
|
+
const unique24h = new Set(recentLog.map(e => e.ip)).size;
|
|
904
|
+
|
|
905
|
+
const limitIPs = new Set();
|
|
906
|
+
for (const [key, count] of freeTierUsage.entries()) {
|
|
907
|
+
if (count >= FREE_TIER_LIMIT) limitIPs.add(key.slice(0, key.length - 8));
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
let trialCount = 0;
|
|
911
|
+
for (const record of trialExtensions.values()) {
|
|
912
|
+
if (record.granted_at && record.granted_at >= since24h) trialCount++;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
let paidCount = 0;
|
|
916
|
+
for (const record of apiKeys.values()) {
|
|
917
|
+
const ts = record.createdAt ? (typeof record.createdAt === 'number' ? record.createdAt : new Date(record.createdAt).getTime()) : 0;
|
|
918
|
+
if (ts >= cutoffMs) paidCount++;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
const sessionKeys = await redisKeys(REDIS_PREFIX + ':session:*:' + today);
|
|
922
|
+
const toolBreakdown = {};
|
|
923
|
+
for (const key of sessionKeys) {
|
|
924
|
+
const calls = await redisGet(key) || [];
|
|
925
|
+
calls.forEach(c => { if (c.tool) toolBreakdown[c.tool] = (toolBreakdown[c.tool] || 0) + 1; });
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
929
|
+
res.end(JSON.stringify({
|
|
930
|
+
server: 'tender-mcp',
|
|
931
|
+
date: today,
|
|
932
|
+
calls_24h: calls24h,
|
|
933
|
+
unique_ips_24h: unique24h,
|
|
934
|
+
limit_hits: limitIPs.size,
|
|
935
|
+
trial_extensions: trialCount,
|
|
936
|
+
paid_conversions: paidCount,
|
|
937
|
+
tool_breakdown: toolBreakdown
|
|
938
|
+
}));
|
|
939
|
+
})();
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
|
|
876
943
|
if (req.method === 'POST') {
|
|
877
944
|
let body = ''; req.on('data', c => body += c);
|
|
878
945
|
req.on('end', async () => {
|
|
@@ -892,6 +959,19 @@ const server = http.createServer(async (req, res) => {
|
|
|
892
959
|
response = { jsonrpc: '2.0', id: request.id, result: { prompts: [] } };
|
|
893
960
|
} else if (request.method === 'tools/call') {
|
|
894
961
|
const { name, arguments: toolArgs } = request.params;
|
|
962
|
+
const killSwitchKey = 'TOOL_DISABLED_' + name.toUpperCase().replace(/[^A-Z0-9]/g, '_');
|
|
963
|
+
if (process.env[killSwitchKey] === 'true') {
|
|
964
|
+
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
965
|
+
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'This tool is temporarily unavailable for maintenance.', agent_action: 'RETRY_IN_30_MIN', retryable: true, retry_after_ms: 1800000 }) }] } }));
|
|
966
|
+
return;
|
|
967
|
+
}
|
|
968
|
+
const _rawIpKs = req.headers['x-forwarded-for'] || req.socket.remoteAddress || 'unknown';
|
|
969
|
+
const _clientIpKs = _rawIpKs.split(',')[0].trim();
|
|
970
|
+
if (['search_tenders', 'get_tender_intelligence'].includes(name) && !checkPerMinuteLimit(_clientIpKs, name, 10)) {
|
|
971
|
+
res.writeHead(200, { ...cors, 'Content-Type': 'application/json' });
|
|
972
|
+
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'Rate limit exceeded — maximum 10 calls per minute per IP on AI-powered tools. Your workflow is calling this tool too rapidly.', agent_action: 'RETRY_IN_60_SEC', retryable: true, retry_after_ms: 60000, limit: 10, window: '1 minute' }) }] } }));
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
895
975
|
const access = checkAccess(req, name);
|
|
896
976
|
|
|
897
977
|
if (!access.allowed) {
|
|
@@ -982,6 +1062,11 @@ function setupStdio() {
|
|
|
982
1062
|
resp = { jsonrpc: '2.0', id: req.id, result: { prompts: [] } };
|
|
983
1063
|
} else if (req.method === 'tools/call') {
|
|
984
1064
|
const { name, arguments: toolArgs } = req.params || {};
|
|
1065
|
+
const _ks = 'TOOL_DISABLED_' + (name || '').toUpperCase().replace(/[^A-Z0-9]/g, '_');
|
|
1066
|
+
if (process.env[_ks] === 'true') {
|
|
1067
|
+
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, result: { content: [{ type: 'text', text: JSON.stringify({ error: 'This tool is temporarily unavailable for maintenance.', agent_action: 'RETRY_IN_30_MIN', retryable: true, retry_after_ms: 1800000 }) }] } }) + '\n');
|
|
1068
|
+
continue;
|
|
1069
|
+
}
|
|
985
1070
|
executeTool(name, toolArgs || {}, 'pro').then(result => {
|
|
986
1071
|
process.stdout.write(JSON.stringify({ jsonrpc: '2.0', id: req.id, result: { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] } }) + '\n');
|
|
987
1072
|
}).catch(err => {
|