@backendkit-labs/mcp-connectors 0.1.3 → 0.1.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/dist/ai-vault/server.d.ts +0 -32
- package/dist/ai-vault/server.d.ts.map +1 -1
- package/dist/ai-vault/server.js +2 -163
- package/dist/ai-vault/server.js.map +1 -1
- package/dist/ai-vault/tools.d.ts +35 -0
- package/dist/ai-vault/tools.d.ts.map +1 -0
- package/dist/ai-vault/tools.js +166 -0
- package/dist/ai-vault/tools.js.map +1 -0
- package/dist/gcal/server.js +2 -146
- package/dist/gcal/server.js.map +1 -1
- package/dist/gcal/tools.d.ts +3 -0
- package/dist/gcal/tools.d.ts.map +1 -0
- package/dist/gcal/tools.js +149 -0
- package/dist/gcal/tools.js.map +1 -0
- package/dist/hubspot/server.js +3 -115
- package/dist/hubspot/server.js.map +1 -1
- package/dist/hubspot/tools.d.ts +3 -0
- package/dist/hubspot/tools.d.ts.map +1 -0
- package/dist/hubspot/tools.js +117 -0
- package/dist/hubspot/tools.js.map +1 -0
- package/dist/jira/server.js +3 -112
- package/dist/jira/server.js.map +1 -1
- package/dist/jira/tools.d.ts +3 -0
- package/dist/jira/tools.d.ts.map +1 -0
- package/dist/jira/tools.js +114 -0
- package/dist/jira/tools.js.map +1 -0
- package/dist/odoo/server.js +2 -158
- package/dist/odoo/server.js.map +1 -1
- package/dist/odoo/tools.d.ts +3 -0
- package/dist/odoo/tools.d.ts.map +1 -0
- package/dist/odoo/tools.js +161 -0
- package/dist/odoo/tools.js.map +1 -0
- package/dist/shared/http-client.d.ts.map +1 -1
- package/dist/shared/http-client.js +7 -3
- package/dist/shared/http-client.js.map +1 -1
- package/dist/shared/server-runner.d.ts +11 -1
- package/dist/shared/server-runner.d.ts.map +1 -1
- package/dist/shared/server-runner.js +51 -8
- package/dist/shared/server-runner.js.map +1 -1
- package/package.json +22 -11
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildServer = buildServer;
|
|
4
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
+
const node_crypto_1 = require("node:crypto");
|
|
6
|
+
const zod_1 = require("zod");
|
|
7
|
+
const http_client_js_1 = require("../shared/http-client.js");
|
|
8
|
+
let tokenCache = null;
|
|
9
|
+
async function getToken() {
|
|
10
|
+
// Return valid cached token (60 s buffer before expiry)
|
|
11
|
+
if (tokenCache && Date.now() < tokenCache.expiresAt - 60_000) {
|
|
12
|
+
return tokenCache.token;
|
|
13
|
+
}
|
|
14
|
+
const saKeyJson = process.env.GCAL_SERVICE_ACCOUNT_KEY;
|
|
15
|
+
if (saKeyJson) {
|
|
16
|
+
const key = JSON.parse(saKeyJson);
|
|
17
|
+
const token = await exchangeServiceAccountToken(key);
|
|
18
|
+
tokenCache = { token, expiresAt: Date.now() + 3_600_000 };
|
|
19
|
+
return token;
|
|
20
|
+
}
|
|
21
|
+
const staticToken = process.env.GCAL_ACCESS_TOKEN;
|
|
22
|
+
if (staticToken)
|
|
23
|
+
return staticToken;
|
|
24
|
+
throw new Error('Set GCAL_SERVICE_ACCOUNT_KEY (recommended) or GCAL_ACCESS_TOKEN');
|
|
25
|
+
}
|
|
26
|
+
async function exchangeServiceAccountToken(key) {
|
|
27
|
+
const now = Math.floor(Date.now() / 1000);
|
|
28
|
+
const tokenUri = key.token_uri ?? 'https://oauth2.googleapis.com/token';
|
|
29
|
+
const payload = {
|
|
30
|
+
iss: key.client_email,
|
|
31
|
+
scope: 'https://www.googleapis.com/auth/calendar',
|
|
32
|
+
aud: tokenUri,
|
|
33
|
+
exp: now + 3600,
|
|
34
|
+
iat: now,
|
|
35
|
+
};
|
|
36
|
+
const header = Buffer.from(JSON.stringify({ alg: 'RS256', typ: 'JWT' })).toString('base64url');
|
|
37
|
+
const body = Buffer.from(JSON.stringify(payload)).toString('base64url');
|
|
38
|
+
const toSign = `${header}.${body}`;
|
|
39
|
+
const sign = (0, node_crypto_1.createSign)('RSA-SHA256');
|
|
40
|
+
sign.update(toSign);
|
|
41
|
+
const sig = sign.sign(key.private_key.replace(/\\n/g, '\n'), 'base64url');
|
|
42
|
+
const assertion = `${toSign}.${sig}`;
|
|
43
|
+
const res = await fetch(tokenUri, {
|
|
44
|
+
method: 'POST',
|
|
45
|
+
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
|
|
46
|
+
body: new URLSearchParams({
|
|
47
|
+
grant_type: 'urn:ietf:params:oauth:grant-type:jwt-bearer',
|
|
48
|
+
assertion,
|
|
49
|
+
}),
|
|
50
|
+
});
|
|
51
|
+
if (!res.ok) {
|
|
52
|
+
throw new Error(`Service account token exchange failed (${res.status}): ${await res.text()}`);
|
|
53
|
+
}
|
|
54
|
+
const data = await res.json();
|
|
55
|
+
return data.access_token;
|
|
56
|
+
}
|
|
57
|
+
async function gcal(method, path, body) {
|
|
58
|
+
const token = await getToken();
|
|
59
|
+
const url = path.startsWith('http') ? path : `https://www.googleapis.com/calendar/v3${path}`;
|
|
60
|
+
return (0, http_client_js_1.fetchJson)('Google Calendar', url, {
|
|
61
|
+
method,
|
|
62
|
+
headers: {
|
|
63
|
+
'Authorization': `Bearer ${token}`,
|
|
64
|
+
'Content-Type': 'application/json',
|
|
65
|
+
},
|
|
66
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// ── Tools ─────────────────────────────────────────────────────────────────────
|
|
70
|
+
function buildServer() {
|
|
71
|
+
const srv = new mcp_js_1.McpServer({ name: 'bk-mcp-gcal', version: '0.1.0' });
|
|
72
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
+
const t = srv.tool.bind(srv);
|
|
74
|
+
t('calendar_list_calendars', 'List all Google Calendars accessible to the authenticated account.', {}, async () => {
|
|
75
|
+
const data = await gcal('GET', '/users/me/calendarList');
|
|
76
|
+
const lines = data.items.map(c => `${c.id} "${c.summary}"${c.primary ? ' (primary)' : ''} [${c.accessRole}]`);
|
|
77
|
+
return { content: [{ type: 'text', text: lines.join('\n') }] };
|
|
78
|
+
});
|
|
79
|
+
t('calendar_list_events', 'List upcoming events in a Google Calendar within a time range.', {
|
|
80
|
+
calendar_id: zod_1.z.string().optional().describe('Calendar ID (default: "primary")'),
|
|
81
|
+
time_min: zod_1.z.string().optional().describe('Start of range, ISO 8601 (default: now)'),
|
|
82
|
+
time_max: zod_1.z.string().optional().describe('End of range, ISO 8601 (default: 7 days from now)'),
|
|
83
|
+
limit: zod_1.z.number().min(1).max(100).optional().describe('Max events (default 10, max 100)'),
|
|
84
|
+
}, async ({ calendar_id, time_min, time_max, limit }) => {
|
|
85
|
+
const calId = encodeURIComponent(calendar_id ?? 'primary');
|
|
86
|
+
const tMin = time_min ?? new Date().toISOString();
|
|
87
|
+
const tMax = time_max ?? new Date(Date.now() + 7 * 86_400_000).toISOString();
|
|
88
|
+
const params = new URLSearchParams({
|
|
89
|
+
timeMin: tMin, timeMax: tMax,
|
|
90
|
+
maxResults: String(limit ?? 10),
|
|
91
|
+
singleEvents: 'true', orderBy: 'startTime',
|
|
92
|
+
});
|
|
93
|
+
const data = await gcal('GET', `/calendars/${calId}/events?${params}`);
|
|
94
|
+
const lines = data.items.map(e => {
|
|
95
|
+
const start = e.start.dateTime?.slice(0, 16) ?? e.start.date ?? '?';
|
|
96
|
+
const end = e.end.dateTime?.slice(11, 16) ?? e.end.date ?? '?';
|
|
97
|
+
const attendeeCount = e.attendees?.length ?? 0;
|
|
98
|
+
return `[${start} – ${end}] ${e.summary ?? '(no title)'}${attendeeCount ? ` (${attendeeCount} attendees)` : ''}`;
|
|
99
|
+
});
|
|
100
|
+
return {
|
|
101
|
+
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No events found in this range.' }],
|
|
102
|
+
};
|
|
103
|
+
});
|
|
104
|
+
t('calendar_create_event', 'Create a new event in a Google Calendar.', {
|
|
105
|
+
summary: zod_1.z.string().describe('Event title'),
|
|
106
|
+
start: zod_1.z.string().describe('Start time ISO 8601 (e.g. 2026-06-15T10:00:00)'),
|
|
107
|
+
end: zod_1.z.string().describe('End time ISO 8601 (e.g. 2026-06-15T11:00:00)'),
|
|
108
|
+
description: zod_1.z.string().optional().describe('Event description'),
|
|
109
|
+
attendees: zod_1.z.array(zod_1.z.string()).optional().describe('List of attendee email addresses'),
|
|
110
|
+
timezone: zod_1.z.string().optional().describe('IANA timezone (e.g. America/New_York). Default: UTC'),
|
|
111
|
+
calendar_id: zod_1.z.string().optional().describe('Calendar ID (default: "primary")'),
|
|
112
|
+
}, async ({ summary, start, end, description, attendees, timezone, calendar_id }) => {
|
|
113
|
+
const tz = timezone ?? 'UTC';
|
|
114
|
+
const cal = encodeURIComponent(calendar_id ?? 'primary');
|
|
115
|
+
const event = {
|
|
116
|
+
summary,
|
|
117
|
+
start: { dateTime: start, timeZone: tz },
|
|
118
|
+
end: { dateTime: end, timeZone: tz },
|
|
119
|
+
};
|
|
120
|
+
if (description)
|
|
121
|
+
event.description = description;
|
|
122
|
+
if (attendees?.length)
|
|
123
|
+
event.attendees = attendees.map(email => ({ email }));
|
|
124
|
+
const data = await gcal('POST', `/calendars/${cal}/events`, event);
|
|
125
|
+
return {
|
|
126
|
+
content: [{ type: 'text', text: `Event created: ${data.id}\n${data.htmlLink}` }],
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
t('calendar_get_freebusy', 'Check the free/busy availability for one or more users in a time range.', {
|
|
130
|
+
emails: zod_1.z.array(zod_1.z.string()).describe('List of email addresses to check'),
|
|
131
|
+
time_min: zod_1.z.string().describe('Start of range, ISO 8601'),
|
|
132
|
+
time_max: zod_1.z.string().describe('End of range, ISO 8601'),
|
|
133
|
+
}, async ({ emails, time_min, time_max }) => {
|
|
134
|
+
const data = await gcal('POST', '/freeBusy', {
|
|
135
|
+
timeMin: time_min, timeMax: time_max,
|
|
136
|
+
items: emails.map(id => ({ id })),
|
|
137
|
+
});
|
|
138
|
+
const lines = emails.map(email => {
|
|
139
|
+
const slots = data.calendars[email]?.busy ?? [];
|
|
140
|
+
if (!slots.length)
|
|
141
|
+
return `${email}: FREE all day`;
|
|
142
|
+
const busyStr = slots.map(s => ` BUSY ${s.start.slice(11, 16)} – ${s.end.slice(11, 16)}`).join('\n');
|
|
143
|
+
return `${email}:\n${busyStr}`;
|
|
144
|
+
});
|
|
145
|
+
return { content: [{ type: 'text', text: lines.join('\n\n') }] };
|
|
146
|
+
});
|
|
147
|
+
return srv;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/gcal/tools.ts"],"names":[],"mappings":";;AA2FA,kCA0HC;AArND,oEAAoE;AACpE,6CAAyC;AACzC,6BAAwB;AACxB,6DAAqD;AAiBrD,IAAI,UAAU,GAAgD,IAAI,CAAC;AAEnE,KAAK,UAAU,QAAQ;IACnB,wDAAwD;IACxD,IAAI,UAAU,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,CAAC,SAAS,GAAG,MAAM,EAAE,CAAC;QAC3D,OAAO,UAAU,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC;IACvD,IAAI,SAAS,EAAE,CAAC;QACZ,MAAM,GAAG,GAAsB,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,MAAM,2BAA2B,CAAC,GAAG,CAAC,CAAC;QACrD,UAAU,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,EAAE,CAAC;QAC1D,OAAO,KAAK,CAAC;IACjB,CAAC;IAED,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,iBAAiB,CAAC;IAClD,IAAI,WAAW;QAAE,OAAO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IAAI,IAAI,EAAE,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,MAAM;gBAAE,OAAO,GAAG,KAAK,gBAAgB,CAAC;YACnD,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAC1B,UAAU,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAC7D,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACb,OAAO,GAAG,KAAK,MAAM,OAAO,EAAE,CAAC;QACnC,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC;IAC9E,CAAC,CACJ,CAAC;IAEF,OAAO,GAAG,CAAC;AACf,CAAC"}
|
package/dist/hubspot/server.js
CHANGED
|
@@ -1,127 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
4
|
const server_runner_js_1 = require("../shared/server-runner.js");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const TOKEN = process.env.HUBSPOT_TOKEN;
|
|
10
|
-
if (!TOKEN) {
|
|
5
|
+
const tools_js_1 = require("./tools.js");
|
|
6
|
+
if (!process.env.HUBSPOT_TOKEN) {
|
|
11
7
|
process.stderr.write('[bk-mcp-hubspot] HUBSPOT_TOKEN env var is required (HubSpot Private App token).\n');
|
|
12
8
|
process.exit(1);
|
|
13
9
|
}
|
|
14
|
-
const BASE = 'https://api.hubapi.com';
|
|
15
|
-
async function hs(method, path, body) {
|
|
16
|
-
return (0, http_client_js_1.fetchJson)('HubSpot', `${BASE}${path}`, {
|
|
17
|
-
method,
|
|
18
|
-
headers: {
|
|
19
|
-
'Authorization': `Bearer ${TOKEN}`,
|
|
20
|
-
'Content-Type': 'application/json',
|
|
21
|
-
},
|
|
22
|
-
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
// ── Tools ─────────────────────────────────────────────────────────────────────
|
|
26
|
-
function buildServer() {
|
|
27
|
-
const srv = new mcp_js_1.McpServer({ name: 'bk-mcp-hubspot', version: '0.1.0' });
|
|
28
|
-
// Cast to any to prevent TypeScript from attempting deep Zod schema inference
|
|
29
|
-
// during declaration emit — the MCP SDK validates schemas at runtime.
|
|
30
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
31
|
-
const t = srv.tool.bind(srv);
|
|
32
|
-
t('crm_search_contacts', 'Search HubSpot CRM contacts by name, email, or company.', {
|
|
33
|
-
query: zod_1.z.string().describe('Search term — name, email, or company'),
|
|
34
|
-
limit: zod_1.z.number().min(1).max(100).optional().describe('Max results (default 10, max 100)'),
|
|
35
|
-
}, async ({ query, limit }) => {
|
|
36
|
-
const data = await hs('POST', '/crm/v3/objects/contacts/search', {
|
|
37
|
-
query,
|
|
38
|
-
limit: limit ?? 10,
|
|
39
|
-
properties: ['firstname', 'lastname', 'email', 'phone', 'company'],
|
|
40
|
-
});
|
|
41
|
-
const lines = data.results.map(c => {
|
|
42
|
-
const p = c.properties;
|
|
43
|
-
return `ID:${c.id} ${p.firstname ?? ''} ${p.lastname ?? ''} <${p.email ?? ''}> ${p.company ?? ''} ${p.phone ?? ''}`.trim();
|
|
44
|
-
});
|
|
45
|
-
return {
|
|
46
|
-
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No contacts found.' }],
|
|
47
|
-
};
|
|
48
|
-
});
|
|
49
|
-
t('crm_get_contact', 'Get full property details for a HubSpot contact by ID.', {
|
|
50
|
-
id: zod_1.z.string().describe('HubSpot contact ID'),
|
|
51
|
-
}, async ({ id }) => {
|
|
52
|
-
const props = 'firstname,lastname,email,phone,company,jobtitle,lifecyclestage,createdate,lastmodifieddate';
|
|
53
|
-
const data = await hs('GET', `/crm/v3/objects/contacts/${id}?properties=${props}`);
|
|
54
|
-
const lines = Object.entries(data.properties)
|
|
55
|
-
.filter(([, v]) => v)
|
|
56
|
-
.map(([k, v]) => `${k}: ${v}`);
|
|
57
|
-
return {
|
|
58
|
-
content: [{ type: 'text', text: `Contact ${id}\n${lines.join('\n')}` }],
|
|
59
|
-
};
|
|
60
|
-
});
|
|
61
|
-
t('crm_create_contact', 'Create a new contact in HubSpot CRM.', {
|
|
62
|
-
email: zod_1.z.string().describe('Email address (required)'),
|
|
63
|
-
firstname: zod_1.z.string().optional(),
|
|
64
|
-
lastname: zod_1.z.string().optional(),
|
|
65
|
-
phone: zod_1.z.string().optional(),
|
|
66
|
-
company: zod_1.z.string().optional(),
|
|
67
|
-
jobtitle: zod_1.z.string().optional(),
|
|
68
|
-
}, async (props) => {
|
|
69
|
-
const properties = {};
|
|
70
|
-
for (const [k, v] of Object.entries(props)) {
|
|
71
|
-
if (v)
|
|
72
|
-
properties[k] = v;
|
|
73
|
-
}
|
|
74
|
-
const data = await hs('POST', '/crm/v3/objects/contacts', { properties });
|
|
75
|
-
return { content: [{ type: 'text', text: `Created contact ID: ${data.id}` }] };
|
|
76
|
-
});
|
|
77
|
-
t('crm_search_deals', 'Search HubSpot CRM deals by name and/or deal stage.', {
|
|
78
|
-
query: zod_1.z.string().optional().describe('Deal name search term'),
|
|
79
|
-
stage: zod_1.z.string().optional().describe('Deal stage key (e.g. appointmentscheduled, closedwon)'),
|
|
80
|
-
limit: zod_1.z.number().min(1).max(100).optional().describe('Max results (default 10, max 100)'),
|
|
81
|
-
}, async ({ query, stage, limit }) => {
|
|
82
|
-
const body = {
|
|
83
|
-
limit: limit ?? 10,
|
|
84
|
-
properties: ['dealname', 'dealstage', 'amount', 'closedate'],
|
|
85
|
-
};
|
|
86
|
-
if (query)
|
|
87
|
-
body.query = query;
|
|
88
|
-
if (stage) {
|
|
89
|
-
body.filterGroups = [{
|
|
90
|
-
filters: [{ propertyName: 'dealstage', operator: 'EQ', value: stage }],
|
|
91
|
-
}];
|
|
92
|
-
}
|
|
93
|
-
const data = await hs('POST', '/crm/v3/objects/deals/search', body);
|
|
94
|
-
const lines = data.results.map(d => {
|
|
95
|
-
const p = d.properties;
|
|
96
|
-
return `ID:${d.id} ${p.dealname ?? ''} stage:${p.dealstage ?? ''} $${p.amount ?? '0'} close:${p.closedate?.slice(0, 10) ?? '-'}`;
|
|
97
|
-
});
|
|
98
|
-
return {
|
|
99
|
-
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No deals found.' }],
|
|
100
|
-
};
|
|
101
|
-
});
|
|
102
|
-
t('crm_create_note', 'Log an activity note in HubSpot, optionally associated with a contact or deal.', {
|
|
103
|
-
body: zod_1.z.string().describe('Note text content'),
|
|
104
|
-
contact_id: zod_1.z.string().optional().describe('HubSpot contact ID to associate'),
|
|
105
|
-
deal_id: zod_1.z.string().optional().describe('HubSpot deal ID to associate'),
|
|
106
|
-
}, async ({ body, contact_id, deal_id }) => {
|
|
107
|
-
const associations = [];
|
|
108
|
-
if (contact_id) {
|
|
109
|
-
associations.push({ to: { id: contact_id }, types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 202 }] });
|
|
110
|
-
}
|
|
111
|
-
if (deal_id) {
|
|
112
|
-
associations.push({ to: { id: deal_id }, types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 214 }] });
|
|
113
|
-
}
|
|
114
|
-
const data = await hs('POST', '/crm/v3/objects/notes', {
|
|
115
|
-
properties: { hs_note_body: body, hs_timestamp: Date.now().toString() },
|
|
116
|
-
associations,
|
|
117
|
-
});
|
|
118
|
-
return { content: [{ type: 'text', text: `Created note ID: ${data.id}` }] };
|
|
119
|
-
});
|
|
120
|
-
return srv;
|
|
121
|
-
}
|
|
122
10
|
// ── Start ─────────────────────────────────────────────────────────────────────
|
|
123
11
|
const { httpMode, port } = (0, server_runner_js_1.parseCliArgs)();
|
|
124
|
-
(0, server_runner_js_1.runMcpServer)(buildServer, { httpMode, port, label: 'bk-mcp-hubspot' }).catch(err => {
|
|
12
|
+
(0, server_runner_js_1.runMcpServer)(tools_js_1.buildServer, { httpMode, port, label: 'bk-mcp-hubspot' }).catch(err => {
|
|
125
13
|
process.stderr.write(`[bk-mcp-hubspot] Fatal: ${err.message}\n`);
|
|
126
14
|
process.exit(1);
|
|
127
15
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/hubspot/server.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/hubspot/server.ts"],"names":[],"mappings":";;;AACA,iEAAwE;AACxE,yCAAyC;AAEzC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,CAAC;IAC7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;IAC1G,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,iFAAiF;AAEjF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,+BAAY,GAAE,CAAC;AAC1C,IAAA,+BAAY,EAAC,sBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IAC/E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,2BAA4B,GAAa,CAAC,OAAO,IAAI,CAAC,CAAC;IAC5E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/hubspot/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAsBpE,wBAAgB,WAAW,IAAI,SAAS,CAmIvC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildServer = buildServer;
|
|
4
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
+
const zod_1 = require("zod");
|
|
6
|
+
const http_client_js_1 = require("../shared/http-client.js");
|
|
7
|
+
// ── Auth ──────────────────────────────────────────────────────────────────────
|
|
8
|
+
const TOKEN = process.env.HUBSPOT_TOKEN;
|
|
9
|
+
const BASE = 'https://api.hubapi.com';
|
|
10
|
+
async function hs(method, path, body) {
|
|
11
|
+
return (0, http_client_js_1.fetchJson)('HubSpot', `${BASE}${path}`, {
|
|
12
|
+
method,
|
|
13
|
+
headers: {
|
|
14
|
+
'Authorization': `Bearer ${TOKEN}`,
|
|
15
|
+
'Content-Type': 'application/json',
|
|
16
|
+
},
|
|
17
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
// ── Tools ─────────────────────────────────────────────────────────────────────
|
|
21
|
+
function buildServer() {
|
|
22
|
+
const srv = new mcp_js_1.McpServer({ name: 'bk-mcp-hubspot', version: '0.1.0' });
|
|
23
|
+
// Cast to any to prevent TypeScript from attempting deep Zod schema inference
|
|
24
|
+
// during declaration emit — the MCP SDK validates schemas at runtime.
|
|
25
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26
|
+
const t = srv.tool.bind(srv);
|
|
27
|
+
t('crm_search_contacts', 'Search HubSpot CRM contacts by name, email, or company.', {
|
|
28
|
+
query: zod_1.z.string().describe('Search term — name, email, or company'),
|
|
29
|
+
limit: zod_1.z.number().min(1).max(100).optional().describe('Max results (default 10, max 100)'),
|
|
30
|
+
}, async ({ query, limit }) => {
|
|
31
|
+
const data = await hs('POST', '/crm/v3/objects/contacts/search', {
|
|
32
|
+
query,
|
|
33
|
+
limit: limit ?? 10,
|
|
34
|
+
properties: ['firstname', 'lastname', 'email', 'phone', 'company'],
|
|
35
|
+
});
|
|
36
|
+
const lines = data.results.map(c => {
|
|
37
|
+
const p = c.properties;
|
|
38
|
+
return `ID:${c.id} ${p.firstname ?? ''} ${p.lastname ?? ''} <${p.email ?? ''}> ${p.company ?? ''} ${p.phone ?? ''}`.trim();
|
|
39
|
+
});
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No contacts found.' }],
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
t('crm_get_contact', 'Get full property details for a HubSpot contact by ID.', {
|
|
45
|
+
id: zod_1.z.string().describe('HubSpot contact ID'),
|
|
46
|
+
}, async ({ id }) => {
|
|
47
|
+
const props = 'firstname,lastname,email,phone,company,jobtitle,lifecyclestage,createdate,lastmodifieddate';
|
|
48
|
+
const data = await hs('GET', `/crm/v3/objects/contacts/${id}?properties=${props}`);
|
|
49
|
+
const lines = Object.entries(data.properties)
|
|
50
|
+
.filter(([, v]) => v)
|
|
51
|
+
.map(([k, v]) => `${k}: ${v}`);
|
|
52
|
+
return {
|
|
53
|
+
content: [{ type: 'text', text: `Contact ${id}\n${lines.join('\n')}` }],
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
t('crm_create_contact', 'Create a new contact in HubSpot CRM.', {
|
|
57
|
+
email: zod_1.z.string().describe('Email address (required)'),
|
|
58
|
+
firstname: zod_1.z.string().optional(),
|
|
59
|
+
lastname: zod_1.z.string().optional(),
|
|
60
|
+
phone: zod_1.z.string().optional(),
|
|
61
|
+
company: zod_1.z.string().optional(),
|
|
62
|
+
jobtitle: zod_1.z.string().optional(),
|
|
63
|
+
}, async (props) => {
|
|
64
|
+
const properties = {};
|
|
65
|
+
for (const [k, v] of Object.entries(props)) {
|
|
66
|
+
if (v)
|
|
67
|
+
properties[k] = v;
|
|
68
|
+
}
|
|
69
|
+
const data = await hs('POST', '/crm/v3/objects/contacts', { properties });
|
|
70
|
+
return { content: [{ type: 'text', text: `Created contact ID: ${data.id}` }] };
|
|
71
|
+
});
|
|
72
|
+
t('crm_search_deals', 'Search HubSpot CRM deals by name and/or deal stage.', {
|
|
73
|
+
query: zod_1.z.string().optional().describe('Deal name search term'),
|
|
74
|
+
stage: zod_1.z.string().optional().describe('Deal stage key (e.g. appointmentscheduled, closedwon)'),
|
|
75
|
+
limit: zod_1.z.number().min(1).max(100).optional().describe('Max results (default 10, max 100)'),
|
|
76
|
+
}, async ({ query, stage, limit }) => {
|
|
77
|
+
const body = {
|
|
78
|
+
limit: limit ?? 10,
|
|
79
|
+
properties: ['dealname', 'dealstage', 'amount', 'closedate'],
|
|
80
|
+
};
|
|
81
|
+
if (query)
|
|
82
|
+
body.query = query;
|
|
83
|
+
if (stage) {
|
|
84
|
+
body.filterGroups = [{
|
|
85
|
+
filters: [{ propertyName: 'dealstage', operator: 'EQ', value: stage }],
|
|
86
|
+
}];
|
|
87
|
+
}
|
|
88
|
+
const data = await hs('POST', '/crm/v3/objects/deals/search', body);
|
|
89
|
+
const lines = data.results.map(d => {
|
|
90
|
+
const p = d.properties;
|
|
91
|
+
return `ID:${d.id} ${p.dealname ?? ''} stage:${p.dealstage ?? ''} $${p.amount ?? '0'} close:${p.closedate?.slice(0, 10) ?? '-'}`;
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No deals found.' }],
|
|
95
|
+
};
|
|
96
|
+
});
|
|
97
|
+
t('crm_create_note', 'Log an activity note in HubSpot, optionally associated with a contact or deal.', {
|
|
98
|
+
body: zod_1.z.string().describe('Note text content'),
|
|
99
|
+
contact_id: zod_1.z.string().optional().describe('HubSpot contact ID to associate'),
|
|
100
|
+
deal_id: zod_1.z.string().optional().describe('HubSpot deal ID to associate'),
|
|
101
|
+
}, async ({ body, contact_id, deal_id }) => {
|
|
102
|
+
const associations = [];
|
|
103
|
+
if (contact_id) {
|
|
104
|
+
associations.push({ to: { id: contact_id }, types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 202 }] });
|
|
105
|
+
}
|
|
106
|
+
if (deal_id) {
|
|
107
|
+
associations.push({ to: { id: deal_id }, types: [{ associationCategory: 'HUBSPOT_DEFINED', associationTypeId: 214 }] });
|
|
108
|
+
}
|
|
109
|
+
const data = await hs('POST', '/crm/v3/objects/notes', {
|
|
110
|
+
properties: { hs_note_body: body, hs_timestamp: Date.now().toString() },
|
|
111
|
+
associations,
|
|
112
|
+
});
|
|
113
|
+
return { content: [{ type: 'text', text: `Created note ID: ${data.id}` }] };
|
|
114
|
+
});
|
|
115
|
+
return srv;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/hubspot/tools.ts"],"names":[],"mappings":";;AAsBA,kCAmIC;AAzJD,oEAAoE;AACpE,6BAAwB;AACxB,6DAAqD;AAErD,iFAAiF;AAEjF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AACxC,MAAM,IAAI,GAAG,wBAAwB,CAAC;AAEtC,KAAK,UAAU,EAAE,CAAI,MAAc,EAAE,IAAY,EAAE,IAAc;IAC7D,OAAO,IAAA,0BAAS,EAAI,SAAS,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,EAAE;QAC7C,MAAM;QACN,OAAO,EAAE;YACL,eAAe,EAAE,UAAU,KAAK,EAAE;YAClC,cAAc,EAAE,kBAAkB;SACrC;QACD,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;KAC9D,CAAC,CAAC;AACP,CAAC;AAED,iFAAiF;AA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
|
|
4
|
-
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
5
|
-
const zod_1 = require("zod");
|
|
6
4
|
const server_runner_js_1 = require("../shared/server-runner.js");
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
const HOST = process.env.JIRA_HOST; // e.g. mycompany.atlassian.net
|
|
10
|
-
const EMAIL = process.env.JIRA_EMAIL;
|
|
11
|
-
const TOKEN = process.env.JIRA_TOKEN; // Jira API token (not password)
|
|
12
|
-
const missing = [!HOST && 'JIRA_HOST', !EMAIL && 'JIRA_EMAIL', !TOKEN && 'JIRA_TOKEN'].filter(Boolean);
|
|
5
|
+
const tools_js_1 = require("./tools.js");
|
|
6
|
+
const missing = [!process.env.JIRA_HOST && 'JIRA_HOST', !process.env.JIRA_EMAIL && 'JIRA_EMAIL', !process.env.JIRA_TOKEN && 'JIRA_TOKEN'].filter(Boolean);
|
|
13
7
|
if (missing.length) {
|
|
14
8
|
process.stderr.write(`[bk-mcp-jira] Missing env vars: ${missing.join(', ')}\n`);
|
|
15
9
|
process.exit(1);
|
|
16
10
|
}
|
|
17
|
-
const BASE = `https://${HOST}/rest/api/3`;
|
|
18
|
-
const AUTH = Buffer.from(`${EMAIL}:${TOKEN}`).toString('base64');
|
|
19
|
-
async function jira(method, path, body) {
|
|
20
|
-
return (0, http_client_js_1.fetchJson)('Jira', `${BASE}${path}`, {
|
|
21
|
-
method,
|
|
22
|
-
headers: {
|
|
23
|
-
'Authorization': `Basic ${AUTH}`,
|
|
24
|
-
'Content-Type': 'application/json',
|
|
25
|
-
'Accept': 'application/json',
|
|
26
|
-
},
|
|
27
|
-
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
function adfText(node) {
|
|
31
|
-
if (!node)
|
|
32
|
-
return '';
|
|
33
|
-
if (node.text)
|
|
34
|
-
return node.text;
|
|
35
|
-
if (!node.content)
|
|
36
|
-
return '';
|
|
37
|
-
const sep = node.type === 'paragraph' || node.type === 'doc' ? '\n' : '';
|
|
38
|
-
return node.content.map(adfText).join(sep);
|
|
39
|
-
}
|
|
40
|
-
function adfDoc(text) {
|
|
41
|
-
return {
|
|
42
|
-
type: 'doc', version: 1,
|
|
43
|
-
content: [{ type: 'paragraph', content: [{ type: 'text', text }] }],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
// ── Tools ─────────────────────────────────────────────────────────────────────
|
|
47
|
-
function buildServer() {
|
|
48
|
-
const srv = new mcp_js_1.McpServer({ name: 'bk-mcp-jira', version: '0.1.0' });
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
const t = srv.tool.bind(srv);
|
|
51
|
-
t('jira_search', 'Search Jira issues using JQL (Jira Query Language). Returns key, summary, status, and assignee.', {
|
|
52
|
-
jql: zod_1.z.string().describe('JQL query (e.g. "project=PROJ AND status=\\"In Progress\\"")'),
|
|
53
|
-
limit: zod_1.z.number().min(1).max(100).optional().describe('Max results (default 20, max 100)'),
|
|
54
|
-
}, async ({ jql, limit }) => {
|
|
55
|
-
const data = await jira('GET', `/search?jql=${encodeURIComponent(jql)}&maxResults=${limit ?? 20}&fields=summary,status,assignee,priority`);
|
|
56
|
-
const lines = data.issues.map(i => {
|
|
57
|
-
const f = i.fields;
|
|
58
|
-
return `${i.key} [${f.status.name}] ${f.priority?.name ?? '-'} ${f.summary} @${f.assignee?.displayName ?? 'unassigned'}`;
|
|
59
|
-
});
|
|
60
|
-
return {
|
|
61
|
-
content: [{ type: 'text', text: lines.length ? lines.join('\n') : 'No issues found.' }],
|
|
62
|
-
};
|
|
63
|
-
});
|
|
64
|
-
t('jira_get_issue', 'Get full details for a Jira issue including description and recent comments.', {
|
|
65
|
-
key: zod_1.z.string().describe('Jira issue key (e.g. PROJ-123)'),
|
|
66
|
-
}, async ({ key }) => {
|
|
67
|
-
const data = await jira('GET', `/issue/${key}?fields=summary,status,assignee,description,comment`);
|
|
68
|
-
const f = data.fields;
|
|
69
|
-
const desc = adfText(f.description);
|
|
70
|
-
const comments = f.comment.comments.slice(-3).map(c => ` [${c.author.displayName} · ${c.created.slice(0, 10)}]: ${adfText(c.body)}`);
|
|
71
|
-
const parts = [
|
|
72
|
-
`${key}: ${f.summary}`,
|
|
73
|
-
`Status: ${f.status.name} Assignee: ${f.assignee?.displayName ?? 'unassigned'}`,
|
|
74
|
-
desc ? `\nDescription:\n${desc}` : '',
|
|
75
|
-
comments.length ? `\nComments (last ${comments.length}):\n${comments.join('\n')}` : '',
|
|
76
|
-
].filter(Boolean);
|
|
77
|
-
return { content: [{ type: 'text', text: parts.join('\n') }] };
|
|
78
|
-
});
|
|
79
|
-
t('jira_create_issue', 'Create a new Jira issue.', {
|
|
80
|
-
project: zod_1.z.string().describe('Project key (e.g. PROJ)'),
|
|
81
|
-
summary: zod_1.z.string().describe('Issue title/summary'),
|
|
82
|
-
description: zod_1.z.string().optional().describe('Issue description (plain text)'),
|
|
83
|
-
issue_type: zod_1.z.string().optional().describe('Issue type (e.g. Task, Bug, Story). Default: Task'),
|
|
84
|
-
priority: zod_1.z.string().optional().describe('Priority (e.g. High, Medium, Low)'),
|
|
85
|
-
}, async ({ project, summary, description, issue_type, priority }) => {
|
|
86
|
-
const fields = {
|
|
87
|
-
project: { key: project },
|
|
88
|
-
summary,
|
|
89
|
-
issuetype: { name: issue_type ?? 'Task' },
|
|
90
|
-
};
|
|
91
|
-
if (description)
|
|
92
|
-
fields.description = adfDoc(description);
|
|
93
|
-
if (priority)
|
|
94
|
-
fields.priority = { name: priority };
|
|
95
|
-
const data = await jira('POST', '/issue', { fields });
|
|
96
|
-
return { content: [{ type: 'text', text: `Created ${data.key} (ID: ${data.id})` }] };
|
|
97
|
-
});
|
|
98
|
-
t('jira_add_comment', 'Add a comment to a Jira issue.', {
|
|
99
|
-
key: zod_1.z.string().describe('Issue key (e.g. PROJ-123)'),
|
|
100
|
-
body: zod_1.z.string().describe('Comment text'),
|
|
101
|
-
}, async ({ key, body }) => {
|
|
102
|
-
await jira('POST', `/issue/${key}/comment`, { body: adfDoc(body) });
|
|
103
|
-
return { content: [{ type: 'text', text: `Comment added to ${key}.` }] };
|
|
104
|
-
});
|
|
105
|
-
t('jira_transition', 'Move a Jira issue to a new status (e.g. "In Progress", "Done").', {
|
|
106
|
-
key: zod_1.z.string().describe('Issue key (e.g. PROJ-123)'),
|
|
107
|
-
status: zod_1.z.string().describe('Target status name (e.g. Done, In Progress, To Do)'),
|
|
108
|
-
}, async ({ key, status }) => {
|
|
109
|
-
const { transitions } = await jira('GET', `/issue/${key}/transitions`);
|
|
110
|
-
const match = transitions.find(t => t.name.toLowerCase() === status.toLowerCase());
|
|
111
|
-
if (!match) {
|
|
112
|
-
const available = transitions.map(t => t.name).join(', ');
|
|
113
|
-
throw new Error(`Status "${status}" not available for ${key}. Options: ${available}`);
|
|
114
|
-
}
|
|
115
|
-
await jira('POST', `/issue/${key}/transitions`, { transition: { id: match.id } });
|
|
116
|
-
return { content: [{ type: 'text', text: `${key} → "${match.name}"` }] };
|
|
117
|
-
});
|
|
118
|
-
return srv;
|
|
119
|
-
}
|
|
120
11
|
// ── Start ─────────────────────────────────────────────────────────────────────
|
|
121
12
|
const { httpMode, port } = (0, server_runner_js_1.parseCliArgs)();
|
|
122
|
-
(0, server_runner_js_1.runMcpServer)(buildServer, { httpMode, port, label: 'bk-mcp-jira' }).catch(err => {
|
|
13
|
+
(0, server_runner_js_1.runMcpServer)(tools_js_1.buildServer, { httpMode, port, label: 'bk-mcp-jira' }).catch(err => {
|
|
123
14
|
process.stderr.write(`[bk-mcp-jira] Fatal: ${err.message}\n`);
|
|
124
15
|
process.exit(1);
|
|
125
16
|
});
|
package/dist/jira/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/jira/server.ts"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/jira/server.ts"],"names":[],"mappings":";;;AACA,iEAAwE;AACxE,yCAAyC;AAEzC,MAAM,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,WAAW,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,YAAY,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AAC1J,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,mCAAmC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC;AAED,iFAAiF;AAEjF,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAA,+BAAY,GAAE,CAAC;AAC1C,IAAA,+BAAY,EAAC,sBAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;IAC5E,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,wBAAyB,GAAa,CAAC,OAAO,IAAI,CAAC,CAAC;IACzE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/jira/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA2CpE,wBAAgB,WAAW,IAAI,SAAS,CA+HvC"}
|