@cognilead/mcp-server 0.1.0
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/LICENSE +21 -0
- package/README.md +138 -0
- package/dist/api-client.d.ts +7 -0
- package/dist/api-client.d.ts.map +1 -0
- package/dist/api-client.js +50 -0
- package/dist/api-client.js.map +1 -0
- package/dist/auth.d.ts +25 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +62 -0
- package/dist/auth.js.map +1 -0
- package/dist/config.d.ts +14 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +21 -0
- package/dist/config.js.map +1 -0
- package/dist/http.d.ts +5 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +169 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +153 -0
- package/dist/index.js.map +1 -0
- package/dist/rate-limit.d.ts +17 -0
- package/dist/rate-limit.d.ts.map +1 -0
- package/dist/rate-limit.js +80 -0
- package/dist/rate-limit.js.map +1 -0
- package/dist/schemas.d.ts +384 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +206 -0
- package/dist/schemas.js.map +1 -0
- package/dist/tools/check-registry-flags.d.ts +2 -0
- package/dist/tools/check-registry-flags.d.ts.map +1 -0
- package/dist/tools/check-registry-flags.js +31 -0
- package/dist/tools/check-registry-flags.js.map +1 -0
- package/dist/tools/draft-pitch.d.ts +15 -0
- package/dist/tools/draft-pitch.d.ts.map +1 -0
- package/dist/tools/draft-pitch.js +69 -0
- package/dist/tools/draft-pitch.js.map +1 -0
- package/dist/tools/evidence-export.d.ts +7 -0
- package/dist/tools/evidence-export.d.ts.map +1 -0
- package/dist/tools/evidence-export.js +42 -0
- package/dist/tools/evidence-export.js.map +1 -0
- package/dist/tools/find-companies-with-triggers.d.ts +2 -0
- package/dist/tools/find-companies-with-triggers.d.ts.map +1 -0
- package/dist/tools/find-companies-with-triggers.js +29 -0
- package/dist/tools/find-companies-with-triggers.js.map +1 -0
- package/dist/tools/generate-seo-content.d.ts +2 -0
- package/dist/tools/generate-seo-content.d.ts.map +1 -0
- package/dist/tools/generate-seo-content.js +14 -0
- package/dist/tools/generate-seo-content.js.map +1 -0
- package/dist/tools/get-business-sheet.d.ts +2 -0
- package/dist/tools/get-business-sheet.d.ts.map +1 -0
- package/dist/tools/get-business-sheet.js +24 -0
- package/dist/tools/get-business-sheet.js.map +1 -0
- package/dist/tools/ingest-lead.d.ts +2 -0
- package/dist/tools/ingest-lead.d.ts.map +1 -0
- package/dist/tools/ingest-lead.js +26 -0
- package/dist/tools/ingest-lead.js.map +1 -0
- package/dist/tools/rank-companies-in-vertical.d.ts +2 -0
- package/dist/tools/rank-companies-in-vertical.d.ts.map +1 -0
- package/dist/tools/rank-companies-in-vertical.js +33 -0
- package/dist/tools/rank-companies-in-vertical.js.map +1 -0
- package/dist/tools/run-campaign.d.ts +2 -0
- package/dist/tools/run-campaign.d.ts.map +1 -0
- package/dist/tools/run-campaign.js +15 -0
- package/dist/tools/run-campaign.js.map +1 -0
- package/dist/tools/score-dd-risk.d.ts +2 -0
- package/dist/tools/score-dd-risk.d.ts.map +1 -0
- package/dist/tools/score-dd-risk.js +22 -0
- package/dist/tools/score-dd-risk.js.map +1 -0
- package/dist/tools/score-signal.d.ts +15 -0
- package/dist/tools/score-signal.d.ts.map +1 -0
- package/dist/tools/score-signal.js +124 -0
- package/dist/tools/score-signal.js.map +1 -0
- package/dist/tools/suppress.d.ts +2 -0
- package/dist/tools/suppress.d.ts.map +1 -0
- package/dist/tools/suppress.js +13 -0
- package/dist/tools/suppress.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// cognilead.run_campaign — gated.
|
|
2
|
+
//
|
|
3
|
+
// POSTs to ${COGNILEAD_API_URL}/api/v1/campaigns/:id/run with Bearer
|
|
4
|
+
// auth. Returns the API's dispatch result verbatim. lead_ids is optional —
|
|
5
|
+
// when omitted the API picks the next ready batch.
|
|
6
|
+
import { RunCampaignInput } from '../schemas.js';
|
|
7
|
+
import { apiPost } from '../api-client.js';
|
|
8
|
+
import { assertGatedAccess } from '../auth.js';
|
|
9
|
+
export async function runCampaign(rawInput) {
|
|
10
|
+
assertGatedAccess();
|
|
11
|
+
const input = RunCampaignInput.parse(rawInput);
|
|
12
|
+
const path = `/api/v1/campaigns/${encodeURIComponent(input.campaign_id)}/run`;
|
|
13
|
+
return apiPost(path, { lead_ids: input.lead_ids ?? null });
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=run-campaign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-campaign.js","sourceRoot":"","sources":["../../src/tools/run-campaign.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAClC,EAAE;AACF,qEAAqE;AACrE,2EAA2E;AAC3E,mDAAmD;AAEnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,QAAiB;IACjD,iBAAiB,EAAE,CAAA;IACnB,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAE9C,MAAM,IAAI,GAAG,qBAAqB,kBAAkB,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAA;IAC7E,OAAO,OAAO,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAA;AAC5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-dd-risk.d.ts","sourceRoot":"","sources":["../../src/tools/score-dd-risk.ts"],"names":[],"mappings":"AAQA,wBAAsB,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAclE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// cognilead.score_dd_risk — gated.
|
|
2
|
+
//
|
|
3
|
+
// Single-company structured DD risk score. Deterministic synthesis over
|
|
4
|
+
// business sheet + registry + signals.
|
|
5
|
+
import { McpAuthError } from '../auth.js';
|
|
6
|
+
import { loadConfig } from '../config.js';
|
|
7
|
+
export async function scoreDdRisk(input) {
|
|
8
|
+
const { domain } = (input ?? {});
|
|
9
|
+
if (!domain)
|
|
10
|
+
throw new Error('domain is required');
|
|
11
|
+
const cfg = loadConfig();
|
|
12
|
+
if (!cfg.apiKey) {
|
|
13
|
+
throw new McpAuthError('cognilead.score_dd_risk requires a CogniLead API key. Set COGNILEAD_API_KEY.');
|
|
14
|
+
}
|
|
15
|
+
const res = await fetch(`${cfg.apiUrl}/v1/intel/dd-risk/${encodeURIComponent(domain)}`, {
|
|
16
|
+
headers: { authorization: `Bearer ${cfg.apiKey}` },
|
|
17
|
+
});
|
|
18
|
+
if (!res.ok)
|
|
19
|
+
throw new Error(`dd-risk ${res.status}: ${await res.text().catch(() => '')}`);
|
|
20
|
+
return res.json();
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=score-dd-risk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-dd-risk.js","sourceRoot":"","sources":["../../src/tools/score-dd-risk.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,EAAE;AACF,wEAAwE;AACxE,uCAAuC;AAEvC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAEzC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAAc;IAC9C,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,EAAE,CAAwB,CAAA;IACvD,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC,CAAA;IAClD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAA;IACxB,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC;QAChB,MAAM,IAAI,YAAY,CACpB,8EAA8E,CAC/E,CAAA;IACH,CAAC;IACD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,GAAG,CAAC,MAAM,qBAAqB,kBAAkB,CAAC,MAAM,CAAC,EAAE,EAAE;QACtF,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,GAAG,CAAC,MAAM,EAAE,EAAE;KACnD,CAAC,CAAA;IACF,IAAI,CAAC,GAAG,CAAC,EAAE;QAAE,MAAM,IAAI,KAAK,CAAC,WAAW,GAAG,CAAC,MAAM,KAAK,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAA;IAC1F,OAAO,GAAG,CAAC,IAAI,EAAE,CAAA;AACnB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export interface ScoreSignalResult {
|
|
2
|
+
fit_score: number;
|
|
3
|
+
reasoning: string;
|
|
4
|
+
recommended_action: 'pitch' | 'enrich' | 'skip';
|
|
5
|
+
breakdown: {
|
|
6
|
+
relevance: number;
|
|
7
|
+
recency: number;
|
|
8
|
+
source_quality: number;
|
|
9
|
+
has_source_url: number;
|
|
10
|
+
};
|
|
11
|
+
upgrade_hint?: string;
|
|
12
|
+
quota_remaining: number | 'unlimited';
|
|
13
|
+
}
|
|
14
|
+
export declare function scoreSignal(rawInput: unknown): Promise<ScoreSignalResult>;
|
|
15
|
+
//# sourceMappingURL=score-signal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-signal.d.ts","sourceRoot":"","sources":["../../src/tools/score-signal.ts"],"names":[],"mappings":"AAyEA,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,kBAAkB,EAAE,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC/C,SAAS,EAAE;QACT,SAAS,EAAE,MAAM,CAAA;QACjB,OAAO,EAAE,MAAM,CAAA;QACf,cAAc,EAAE,MAAM,CAAA;QACtB,cAAc,EAAE,MAAM,CAAA;KACvB,CAAA;IACD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,EAAE,MAAM,GAAG,WAAW,CAAA;CACtC;AAED,wBAAsB,WAAW,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA0D/E"}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
// cognilead.score_signal — free, capped 50/day.
|
|
2
|
+
//
|
|
3
|
+
// Deterministic fit-score (no LLM call). The formula is intentionally
|
|
4
|
+
// transparent so a developer can predict the output:
|
|
5
|
+
//
|
|
6
|
+
// score = clamp(0..100,
|
|
7
|
+
// 30 * keyword_hits / max_keyword_hits // 0..30 — relevance
|
|
8
|
+
// + 30 * recency_factor // 0..30 — freshness
|
|
9
|
+
// + 25 * source_quality // 0..25 — provenance
|
|
10
|
+
// + 15 * url_present // 0 or 15 — verifiability
|
|
11
|
+
// )
|
|
12
|
+
//
|
|
13
|
+
// recency_factor: 1.0 if scraped within 7 days, linearly decaying to 0
|
|
14
|
+
// over the next 30 days, then 0.
|
|
15
|
+
//
|
|
16
|
+
// source_quality: GitHub repo and curated job boards = 1.0; HN = 0.8;
|
|
17
|
+
// LinkedIn jobs = 0.7; BuiltWith = 0.6; unknown = 0.4.
|
|
18
|
+
//
|
|
19
|
+
// recommended_action:
|
|
20
|
+
// - >= 70 → 'pitch'
|
|
21
|
+
// - 40-69 → 'enrich' (need more data before pitching)
|
|
22
|
+
// - < 40 → 'skip'
|
|
23
|
+
import { ScoreSignalInput } from '../schemas.js';
|
|
24
|
+
import { consumeFreeQuota } from '../rate-limit.js';
|
|
25
|
+
import { loadConfig } from '../config.js';
|
|
26
|
+
const TOOL = 'cognilead.score_signal';
|
|
27
|
+
// Product-keyword maps — when a target_product matches a row, those
|
|
28
|
+
// keywords are the ones the scorer looks for in the signal description.
|
|
29
|
+
const PRODUCT_KEYWORDS = {
|
|
30
|
+
chainlog: ['audit', 'audit log', 'compliance', 'sox', 'gdpr', 'soc 2', 'evidence', 'tamper'],
|
|
31
|
+
payprimitives: ['iso 20022', 'pain.008', 'sepa', 'payment', 'reconciliation', 'card', 'acquirer'],
|
|
32
|
+
medisuisse: ['fhir', 'hipaa', 'patient', 'ehr', 'epic', 'cerner', 'health record'],
|
|
33
|
+
agentgate: ['llm', 'agent', 'guardrail', 'prompt injection', 'safety'],
|
|
34
|
+
payforge: ['stripe', 'invoice', 'subscription', 'dunning'],
|
|
35
|
+
};
|
|
36
|
+
// Fallback: any technical hiring/stack keyword counts as 1 hit.
|
|
37
|
+
const GENERIC_TECH_KEYWORDS = [
|
|
38
|
+
'kubernetes', 'terraform', 'postgres', 'graphql', 'grpc', 'rust',
|
|
39
|
+
'typescript', 'react', 'next.js', 'fastapi', 'django',
|
|
40
|
+
];
|
|
41
|
+
const SOURCE_QUALITY = {
|
|
42
|
+
github_repo: 1.0,
|
|
43
|
+
apify_jobs_ch: 1.0,
|
|
44
|
+
hn_who_hiring: 0.8,
|
|
45
|
+
apify_linkedin_jobs: 0.7,
|
|
46
|
+
apify_indeed: 0.65,
|
|
47
|
+
builtwith: 0.6,
|
|
48
|
+
crunchbase: 0.7,
|
|
49
|
+
};
|
|
50
|
+
function recencyFactor(scrapedAt) {
|
|
51
|
+
if (!scrapedAt)
|
|
52
|
+
return 0.5; // unknown → middling
|
|
53
|
+
const ts = Date.parse(scrapedAt);
|
|
54
|
+
if (Number.isNaN(ts))
|
|
55
|
+
return 0.5;
|
|
56
|
+
const daysOld = (Date.now() - ts) / 86_400_000;
|
|
57
|
+
if (daysOld <= 7)
|
|
58
|
+
return 1;
|
|
59
|
+
if (daysOld >= 37)
|
|
60
|
+
return 0;
|
|
61
|
+
return 1 - (daysOld - 7) / 30;
|
|
62
|
+
}
|
|
63
|
+
function countKeywordHits(text, keywords) {
|
|
64
|
+
const lower = text.toLowerCase();
|
|
65
|
+
let hits = 0;
|
|
66
|
+
for (const k of keywords) {
|
|
67
|
+
if (lower.includes(k.toLowerCase()))
|
|
68
|
+
hits++;
|
|
69
|
+
}
|
|
70
|
+
return hits;
|
|
71
|
+
}
|
|
72
|
+
export async function scoreSignal(rawInput) {
|
|
73
|
+
const input = ScoreSignalInput.parse(rawInput);
|
|
74
|
+
const quota = consumeFreeQuota(TOOL);
|
|
75
|
+
const description = [
|
|
76
|
+
input.signal.description ?? '',
|
|
77
|
+
JSON.stringify(input.signal.raw_payload ?? {}),
|
|
78
|
+
].join(' ');
|
|
79
|
+
const productKw = PRODUCT_KEYWORDS[input.target_product.toLowerCase()] ?? GENERIC_TECH_KEYWORDS;
|
|
80
|
+
const maxHits = Math.max(3, Math.min(productKw.length, 6));
|
|
81
|
+
const hits = countKeywordHits(description, productKw);
|
|
82
|
+
const relevance = Math.min(1, hits / maxHits) * 30;
|
|
83
|
+
const recency = recencyFactor(input.signal.scraped_at) * 30;
|
|
84
|
+
const sourceQuality = (SOURCE_QUALITY[input.signal.source] ?? 0.4) * 25;
|
|
85
|
+
const urlPresent = input.signal.source_url ? 15 : 0;
|
|
86
|
+
const raw = relevance + recency + sourceQuality + urlPresent;
|
|
87
|
+
const fit_score = Math.max(0, Math.min(100, Math.round(raw)));
|
|
88
|
+
let recommended_action;
|
|
89
|
+
if (fit_score >= 70)
|
|
90
|
+
recommended_action = 'pitch';
|
|
91
|
+
else if (fit_score >= 40)
|
|
92
|
+
recommended_action = 'enrich';
|
|
93
|
+
else
|
|
94
|
+
recommended_action = 'skip';
|
|
95
|
+
const reasons = [];
|
|
96
|
+
reasons.push(`${hits} of ${maxHits} ${input.target_product} keywords matched`);
|
|
97
|
+
if (input.signal.scraped_at) {
|
|
98
|
+
const days = Math.round((Date.now() - Date.parse(input.signal.scraped_at)) / 86_400_000);
|
|
99
|
+
reasons.push(`signal is ${days}d old`);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
reasons.push('no scrape timestamp');
|
|
103
|
+
}
|
|
104
|
+
reasons.push(`source ${input.signal.source} (quality ${(sourceQuality / 25).toFixed(2)})`);
|
|
105
|
+
reasons.push(input.signal.source_url ? 'has source URL' : 'no source URL — unverifiable');
|
|
106
|
+
const result = {
|
|
107
|
+
fit_score,
|
|
108
|
+
reasoning: reasons.join('; '),
|
|
109
|
+
recommended_action,
|
|
110
|
+
breakdown: {
|
|
111
|
+
relevance: Math.round(relevance),
|
|
112
|
+
recency: Math.round(recency),
|
|
113
|
+
source_quality: Math.round(sourceQuality),
|
|
114
|
+
has_source_url: urlPresent,
|
|
115
|
+
},
|
|
116
|
+
quota_remaining: Number.isFinite(quota.remaining) ? quota.remaining : 'unlimited',
|
|
117
|
+
};
|
|
118
|
+
const cfg = loadConfig();
|
|
119
|
+
if (!cfg.apiKey && typeof result.quota_remaining === 'number' && result.quota_remaining <= 10) {
|
|
120
|
+
result.upgrade_hint = `${result.quota_remaining} free score_signal calls left today. Sign up for higher limits: ${cfg.signupUrl}`;
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
//# sourceMappingURL=score-signal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-signal.js","sourceRoot":"","sources":["../../src/tools/score-signal.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,EAAE;AACF,sEAAsE;AACtE,qDAAqD;AACrD,EAAE;AACF,0BAA0B;AAC1B,sEAAsE;AACtE,sEAAsE;AACtE,uEAAuE;AACvE,0EAA0E;AAC1E,MAAM;AACN,EAAE;AACF,uEAAuE;AACvE,iCAAiC;AACjC,EAAE;AACF,sEAAsE;AACtE,uDAAuD;AACvD,EAAE;AACF,sBAAsB;AACtB,sBAAsB;AACtB,wDAAwD;AACxD,qBAAqB;AAErB,OAAO,EAAE,g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AAY,GAAG,GAAG,MAAM,CAAC,eAAe,mEAAmE,GAAG,CAAC,SAAS,EAAE,CAAA;IACnI,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress.d.ts","sourceRoot":"","sources":["../../src/tools/suppress.ts"],"names":[],"mappings":"AASA,wBAAsB,QAAQ,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAIlE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// cognilead.suppress — gated.
|
|
2
|
+
//
|
|
3
|
+
// POSTs to ${COGNILEAD_API_URL}/api/v1/suppressions. Refines reflect the
|
|
4
|
+
// API's contract: at least one of {email, domain} required.
|
|
5
|
+
import { SuppressInput } from '../schemas.js';
|
|
6
|
+
import { apiPost } from '../api-client.js';
|
|
7
|
+
import { assertGatedAccess } from '../auth.js';
|
|
8
|
+
export async function suppress(rawInput) {
|
|
9
|
+
assertGatedAccess();
|
|
10
|
+
const input = SuppressInput.parse(rawInput);
|
|
11
|
+
return apiPost('/api/v1/suppressions', input);
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=suppress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"suppress.js","sourceRoot":"","sources":["../../src/tools/suppress.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,EAAE;AACF,yEAAyE;AACzE,4DAA4D;AAE5D,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE9C,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,QAAiB;IAC9C,iBAAiB,EAAE,CAAA;IACnB,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;IAC3C,OAAO,OAAO,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAA;AAC/C,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cognilead/mcp-server",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Model Context Protocol server for CogniLead — exposes draft_pitch, score_signal, ingest_lead, run_campaign, suppress, and evidence_export tools to Cursor, Claude Desktop, Windsurf.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"cognilead-mcp": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"main": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"scripts": {
|
|
24
|
+
"build": "tsc",
|
|
25
|
+
"dev": "tsx src/index.ts",
|
|
26
|
+
"typecheck": "tsc --noEmit",
|
|
27
|
+
"start": "node dist/index.js",
|
|
28
|
+
"start:http": "node dist/http.js",
|
|
29
|
+
"prepublishOnly": "npm run build"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"mcp",
|
|
33
|
+
"model-context-protocol",
|
|
34
|
+
"cognilead",
|
|
35
|
+
"cold-outbound",
|
|
36
|
+
"outbound",
|
|
37
|
+
"gdpr",
|
|
38
|
+
"claude",
|
|
39
|
+
"cursor",
|
|
40
|
+
"windsurf",
|
|
41
|
+
"claude-desktop"
|
|
42
|
+
],
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"author": "CogniLead <engineering@cognilead.ai>",
|
|
45
|
+
"homepage": "https://cognilead.ai/mcp",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "https://github.com/medishift/cognilead.git",
|
|
49
|
+
"directory": "packages/mcp-server"
|
|
50
|
+
},
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/medishift/cognilead/issues"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public",
|
|
56
|
+
"registry": "https://registry.npmjs.org/"
|
|
57
|
+
},
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"@modelcontextprotocol/sdk": "^1.0.4",
|
|
60
|
+
"zod": "^3.23.8"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/node": "^22.0.0",
|
|
64
|
+
"tsx": "^4.19.2",
|
|
65
|
+
"typescript": "^5.6.0"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18"
|
|
69
|
+
}
|
|
70
|
+
}
|