@burdenoff/mcp-libs 2026.511.1
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/README.md +76 -0
- package/dist/chunk-4GBVJ4OY.js +847 -0
- package/dist/chunk-4GBVJ4OY.js.map +1 -0
- package/dist/chunk-H2OYWLOA.js +919 -0
- package/dist/chunk-H2OYWLOA.js.map +1 -0
- package/dist/chunk-JFEQYSWM.js +174 -0
- package/dist/chunk-JFEQYSWM.js.map +1 -0
- package/dist/chunk-WWFVD7BO.js +273 -0
- package/dist/chunk-WWFVD7BO.js.map +1 -0
- package/dist/context-1jV4NsLv.d.cts +138 -0
- package/dist/context-1jV4NsLv.d.ts +138 -0
- package/dist/core/index.cjs +953 -0
- package/dist/core/index.cjs.map +1 -0
- package/dist/core/index.d.cts +59 -0
- package/dist/core/index.d.ts +59 -0
- package/dist/core/index.js +3 -0
- package/dist/core/index.js.map +1 -0
- package/dist/http-BP4c721D.d.cts +22 -0
- package/dist/http-DXTeCD5r.d.ts +22 -0
- package/dist/index.cjs +1013 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/module-DBcfA-i3.d.ts +67 -0
- package/dist/module-DFQBZNK6.d.cts +67 -0
- package/dist/modules/auth/index.cjs +533 -0
- package/dist/modules/auth/index.cjs.map +1 -0
- package/dist/modules/auth/index.d.cts +51 -0
- package/dist/modules/auth/index.d.ts +51 -0
- package/dist/modules/auth/index.js +159 -0
- package/dist/modules/auth/index.js.map +1 -0
- package/dist/modules/billing/index.cjs +655 -0
- package/dist/modules/billing/index.cjs.map +1 -0
- package/dist/modules/billing/index.d.cts +8 -0
- package/dist/modules/billing/index.d.ts +8 -0
- package/dist/modules/billing/index.js +606 -0
- package/dist/modules/billing/index.js.map +1 -0
- package/dist/modules/channels/index.cjs +443 -0
- package/dist/modules/channels/index.cjs.map +1 -0
- package/dist/modules/channels/index.d.cts +8 -0
- package/dist/modules/channels/index.d.ts +8 -0
- package/dist/modules/channels/index.js +394 -0
- package/dist/modules/channels/index.js.map +1 -0
- package/dist/modules/conversations/index.cjs +288 -0
- package/dist/modules/conversations/index.cjs.map +1 -0
- package/dist/modules/conversations/index.d.cts +8 -0
- package/dist/modules/conversations/index.d.ts +8 -0
- package/dist/modules/conversations/index.js +239 -0
- package/dist/modules/conversations/index.js.map +1 -0
- package/dist/modules/devportal/index.cjs +796 -0
- package/dist/modules/devportal/index.cjs.map +1 -0
- package/dist/modules/devportal/index.d.cts +8 -0
- package/dist/modules/devportal/index.d.ts +8 -0
- package/dist/modules/devportal/index.js +747 -0
- package/dist/modules/devportal/index.js.map +1 -0
- package/dist/modules/export/index.cjs +333 -0
- package/dist/modules/export/index.cjs.map +1 -0
- package/dist/modules/export/index.d.cts +8 -0
- package/dist/modules/export/index.d.ts +8 -0
- package/dist/modules/export/index.js +284 -0
- package/dist/modules/export/index.js.map +1 -0
- package/dist/modules/files/index.cjs +278 -0
- package/dist/modules/files/index.cjs.map +1 -0
- package/dist/modules/files/index.d.cts +8 -0
- package/dist/modules/files/index.d.ts +8 -0
- package/dist/modules/files/index.js +229 -0
- package/dist/modules/files/index.js.map +1 -0
- package/dist/modules/groups/index.cjs +451 -0
- package/dist/modules/groups/index.cjs.map +1 -0
- package/dist/modules/groups/index.d.cts +8 -0
- package/dist/modules/groups/index.d.ts +8 -0
- package/dist/modules/groups/index.js +402 -0
- package/dist/modules/groups/index.js.map +1 -0
- package/dist/modules/health/index.cjs +159 -0
- package/dist/modules/health/index.cjs.map +1 -0
- package/dist/modules/health/index.d.cts +8 -0
- package/dist/modules/health/index.d.ts +8 -0
- package/dist/modules/health/index.js +36 -0
- package/dist/modules/health/index.js.map +1 -0
- package/dist/modules/integrations/index.cjs +316 -0
- package/dist/modules/integrations/index.cjs.map +1 -0
- package/dist/modules/integrations/index.d.cts +8 -0
- package/dist/modules/integrations/index.d.ts +8 -0
- package/dist/modules/integrations/index.js +267 -0
- package/dist/modules/integrations/index.js.map +1 -0
- package/dist/modules/notifications/index.cjs +222 -0
- package/dist/modules/notifications/index.cjs.map +1 -0
- package/dist/modules/notifications/index.d.cts +8 -0
- package/dist/modules/notifications/index.d.ts +8 -0
- package/dist/modules/notifications/index.js +173 -0
- package/dist/modules/notifications/index.js.map +1 -0
- package/dist/modules/organizations/index.cjs +267 -0
- package/dist/modules/organizations/index.cjs.map +1 -0
- package/dist/modules/organizations/index.d.cts +8 -0
- package/dist/modules/organizations/index.d.ts +8 -0
- package/dist/modules/organizations/index.js +218 -0
- package/dist/modules/organizations/index.js.map +1 -0
- package/dist/modules/products/index.cjs +736 -0
- package/dist/modules/products/index.cjs.map +1 -0
- package/dist/modules/products/index.d.cts +8 -0
- package/dist/modules/products/index.d.ts +8 -0
- package/dist/modules/products/index.js +687 -0
- package/dist/modules/products/index.js.map +1 -0
- package/dist/modules/rbac/index.cjs +378 -0
- package/dist/modules/rbac/index.cjs.map +1 -0
- package/dist/modules/rbac/index.d.cts +8 -0
- package/dist/modules/rbac/index.d.ts +8 -0
- package/dist/modules/rbac/index.js +329 -0
- package/dist/modules/rbac/index.js.map +1 -0
- package/dist/modules/sandbox/index.cjs +318 -0
- package/dist/modules/sandbox/index.cjs.map +1 -0
- package/dist/modules/sandbox/index.d.cts +8 -0
- package/dist/modules/sandbox/index.d.ts +8 -0
- package/dist/modules/sandbox/index.js +225 -0
- package/dist/modules/sandbox/index.js.map +1 -0
- package/dist/modules/scheduler/index.cjs +267 -0
- package/dist/modules/scheduler/index.cjs.map +1 -0
- package/dist/modules/scheduler/index.d.cts +8 -0
- package/dist/modules/scheduler/index.d.ts +8 -0
- package/dist/modules/scheduler/index.js +218 -0
- package/dist/modules/scheduler/index.js.map +1 -0
- package/dist/modules/security/index.cjs +529 -0
- package/dist/modules/security/index.cjs.map +1 -0
- package/dist/modules/security/index.d.cts +8 -0
- package/dist/modules/security/index.d.ts +8 -0
- package/dist/modules/security/index.js +480 -0
- package/dist/modules/security/index.js.map +1 -0
- package/dist/modules/store/index.cjs +450 -0
- package/dist/modules/store/index.cjs.map +1 -0
- package/dist/modules/store/index.d.cts +8 -0
- package/dist/modules/store/index.d.ts +8 -0
- package/dist/modules/store/index.js +401 -0
- package/dist/modules/store/index.js.map +1 -0
- package/dist/modules/support/index.cjs +285 -0
- package/dist/modules/support/index.cjs.map +1 -0
- package/dist/modules/support/index.d.cts +8 -0
- package/dist/modules/support/index.d.ts +8 -0
- package/dist/modules/support/index.js +236 -0
- package/dist/modules/support/index.js.map +1 -0
- package/dist/modules/tags/index.cjs +421 -0
- package/dist/modules/tags/index.cjs.map +1 -0
- package/dist/modules/tags/index.d.cts +8 -0
- package/dist/modules/tags/index.d.ts +8 -0
- package/dist/modules/tags/index.js +372 -0
- package/dist/modules/tags/index.js.map +1 -0
- package/dist/modules/tours/index.cjs +225 -0
- package/dist/modules/tours/index.cjs.map +1 -0
- package/dist/modules/tours/index.d.cts +8 -0
- package/dist/modules/tours/index.d.ts +8 -0
- package/dist/modules/tours/index.js +176 -0
- package/dist/modules/tours/index.js.map +1 -0
- package/dist/modules/vibecontrols/index.cjs +5551 -0
- package/dist/modules/vibecontrols/index.cjs.map +1 -0
- package/dist/modules/vibecontrols/index.d.cts +8 -0
- package/dist/modules/vibecontrols/index.d.ts +8 -0
- package/dist/modules/vibecontrols/index.js +4380 -0
- package/dist/modules/vibecontrols/index.js.map +1 -0
- package/dist/modules/workspaces/index.cjs +552 -0
- package/dist/modules/workspaces/index.cjs.map +1 -0
- package/dist/modules/workspaces/index.d.cts +8 -0
- package/dist/modules/workspaces/index.d.ts +8 -0
- package/dist/modules/workspaces/index.js +503 -0
- package/dist/modules/workspaces/index.js.map +1 -0
- package/dist/tool-name-CQf_IqAj.d.cts +47 -0
- package/dist/tool-name-DlnrBsZ6.d.ts +47 -0
- package/dist/transports/index.cjs +183 -0
- package/dist/transports/index.cjs.map +1 -0
- package/dist/transports/index.d.cts +13 -0
- package/dist/transports/index.d.ts +13 -0
- package/dist/transports/index.js +3 -0
- package/dist/transports/index.js.map +1 -0
- package/package.json +125 -0
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
|
|
4
|
+
var crypto = require('crypto');
|
|
5
|
+
var streamableHttp_js = require('@modelcontextprotocol/sdk/server/streamableHttp.js');
|
|
6
|
+
var types_js = require('@modelcontextprotocol/sdk/types.js');
|
|
7
|
+
|
|
8
|
+
// src/transports/stdio.ts
|
|
9
|
+
async function startStdioServer(server, ctx, _opts = {}) {
|
|
10
|
+
ctx.logger.info("Starting MCP server with stdio transport", {
|
|
11
|
+
name: ctx.serverName,
|
|
12
|
+
version: ctx.serverVersion
|
|
13
|
+
});
|
|
14
|
+
const transport = new stdio_js.StdioServerTransport();
|
|
15
|
+
await server.connect(transport);
|
|
16
|
+
ctx.logger.info("MCP stdio server started");
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/transports/security.ts
|
|
20
|
+
var SESSION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
21
|
+
function parseCorsOrigins(origins) {
|
|
22
|
+
if (Array.isArray(origins)) return origins;
|
|
23
|
+
const value = origins?.trim();
|
|
24
|
+
if (!value || value === "*") {
|
|
25
|
+
return ["http://127.0.0.1", "http://localhost"];
|
|
26
|
+
}
|
|
27
|
+
return value.split(",").map((origin) => origin.trim()).filter(Boolean);
|
|
28
|
+
}
|
|
29
|
+
function isAuthorizedRequest(req, apiKey) {
|
|
30
|
+
return req.headers.authorization === `Bearer ${apiKey}` || req.headers["x-api-key"] === apiKey;
|
|
31
|
+
}
|
|
32
|
+
function requireAuthorizedRequest(req, res, apiKey) {
|
|
33
|
+
if (!apiKey) {
|
|
34
|
+
res.status(503).json({ error: "Transport authentication is not configured" });
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
if (!isAuthorizedRequest(req, apiKey)) {
|
|
38
|
+
res.status(401).json({ error: "Unauthorized" });
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
function assertTransportAuthConfigured(transport, apiKey) {
|
|
44
|
+
if ((transport === "sse" || transport === "http") && !apiKey) {
|
|
45
|
+
throw new Error("MCP_API_KEY must be configured for HTTP/SSE transports");
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function isValidSessionId(sessionId) {
|
|
49
|
+
return SESSION_ID_PATTERN.test(sessionId);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/transports/http.ts
|
|
53
|
+
async function createHttpApp(ctx, createServerFn, options = {}) {
|
|
54
|
+
const expressMod = await import('express');
|
|
55
|
+
const corsMod = await import('cors');
|
|
56
|
+
const express = expressMod.default ?? expressMod;
|
|
57
|
+
const cors = corsMod.default ?? corsMod;
|
|
58
|
+
const cfg = ctx.config.read();
|
|
59
|
+
const app = express();
|
|
60
|
+
app.use(express.json());
|
|
61
|
+
if (options.enableCors !== false) {
|
|
62
|
+
const corsOrigins = options.corsOrigins ?? cfg.corsOrigins;
|
|
63
|
+
app.use(
|
|
64
|
+
cors({
|
|
65
|
+
origin: parseCorsOrigins(corsOrigins),
|
|
66
|
+
exposedHeaders: ["Mcp-Session-Id"],
|
|
67
|
+
allowedHeaders: ["Content-Type", "Authorization", "X-API-Key", "mcp-session-id"]
|
|
68
|
+
})
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
const transports = {};
|
|
72
|
+
const apiKey = options.apiKey ?? cfg.apiKey;
|
|
73
|
+
app.post("/mcp", async (req, res) => {
|
|
74
|
+
if (!requireAuthorizedRequest(req, res, apiKey)) return;
|
|
75
|
+
try {
|
|
76
|
+
const sessionId = req.headers["mcp-session-id"];
|
|
77
|
+
let transport;
|
|
78
|
+
if (sessionId && !isValidSessionId(sessionId)) {
|
|
79
|
+
res.status(400).json({
|
|
80
|
+
jsonrpc: "2.0",
|
|
81
|
+
error: { code: -32e3, message: "Bad Request: Invalid session ID provided" },
|
|
82
|
+
id: null
|
|
83
|
+
});
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (sessionId && transports[sessionId]) {
|
|
87
|
+
transport = transports[sessionId];
|
|
88
|
+
} else if (!sessionId && types_js.isInitializeRequest(req.body)) {
|
|
89
|
+
transport = new streamableHttp_js.StreamableHTTPServerTransport({
|
|
90
|
+
sessionIdGenerator: () => crypto.randomUUID(),
|
|
91
|
+
onsessioninitialized: (sid) => {
|
|
92
|
+
transports[sid] = transport;
|
|
93
|
+
ctx.logger.info("New MCP session initialized", { sessionId: sid });
|
|
94
|
+
},
|
|
95
|
+
enableDnsRebindingProtection: options.enableDnsRebindingProtection ?? true,
|
|
96
|
+
allowedHosts: options.allowedHosts ?? cfg.allowedHosts.split(",")
|
|
97
|
+
});
|
|
98
|
+
transport.onclose = () => {
|
|
99
|
+
if (transport.sessionId) {
|
|
100
|
+
delete transports[transport.sessionId];
|
|
101
|
+
ctx.logger.info("MCP session closed", { sessionId: transport.sessionId });
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const server = createServerFn();
|
|
105
|
+
await server.connect(transport);
|
|
106
|
+
} else {
|
|
107
|
+
res.status(400).json({
|
|
108
|
+
jsonrpc: "2.0",
|
|
109
|
+
error: { code: -32e3, message: "Bad Request: No valid session ID provided" },
|
|
110
|
+
id: null
|
|
111
|
+
});
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
await transport.handleRequest(req, res, req.body);
|
|
115
|
+
} catch (error) {
|
|
116
|
+
ctx.logger.error("Error handling MCP request", {
|
|
117
|
+
error: error instanceof Error ? error.message : String(error)
|
|
118
|
+
});
|
|
119
|
+
if (!res.headersSent) {
|
|
120
|
+
res.status(500).json({
|
|
121
|
+
jsonrpc: "2.0",
|
|
122
|
+
error: { code: -32603, message: "Internal server error" },
|
|
123
|
+
id: null
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const handleSessionRequest = async (req, res) => {
|
|
129
|
+
if (!requireAuthorizedRequest(req, res, apiKey)) return;
|
|
130
|
+
const sessionId = req.headers["mcp-session-id"];
|
|
131
|
+
if (!sessionId || !isValidSessionId(sessionId) || !transports[sessionId]) {
|
|
132
|
+
res.status(400).send("Invalid or missing session ID");
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
await transports[sessionId].handleRequest(req, res);
|
|
136
|
+
};
|
|
137
|
+
app.get("/mcp", handleSessionRequest);
|
|
138
|
+
app.delete("/mcp", handleSessionRequest);
|
|
139
|
+
app.get("/health", (_req, res) => {
|
|
140
|
+
res.json({
|
|
141
|
+
status: "healthy",
|
|
142
|
+
server: ctx.serverName,
|
|
143
|
+
version: ctx.serverVersion,
|
|
144
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
145
|
+
uptime: process.uptime(),
|
|
146
|
+
activeSessions: Object.keys(transports).length
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
return app;
|
|
150
|
+
}
|
|
151
|
+
async function startHttpServer(ctx, createServerFn, options = {}) {
|
|
152
|
+
const cfg = ctx.config.read();
|
|
153
|
+
const port = options.port ?? cfg.httpPort;
|
|
154
|
+
const host = options.host ?? cfg.host;
|
|
155
|
+
ctx.logger.info("Starting MCP server with HTTP transport", {
|
|
156
|
+
port,
|
|
157
|
+
host,
|
|
158
|
+
name: ctx.serverName,
|
|
159
|
+
version: ctx.serverVersion
|
|
160
|
+
});
|
|
161
|
+
const app = await createHttpApp(ctx, createServerFn, options);
|
|
162
|
+
await new Promise((resolve, reject) => {
|
|
163
|
+
const server = app.listen(port, host, (err) => {
|
|
164
|
+
if (err) reject(err);
|
|
165
|
+
else {
|
|
166
|
+
ctx.logger.info("MCP HTTP server started", { port, host });
|
|
167
|
+
resolve();
|
|
168
|
+
}
|
|
169
|
+
});
|
|
170
|
+
server.on("error", reject);
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
exports.assertTransportAuthConfigured = assertTransportAuthConfigured;
|
|
175
|
+
exports.createHttpApp = createHttpApp;
|
|
176
|
+
exports.isAuthorizedRequest = isAuthorizedRequest;
|
|
177
|
+
exports.isValidSessionId = isValidSessionId;
|
|
178
|
+
exports.parseCorsOrigins = parseCorsOrigins;
|
|
179
|
+
exports.requireAuthorizedRequest = requireAuthorizedRequest;
|
|
180
|
+
exports.startHttpServer = startHttpServer;
|
|
181
|
+
exports.startStdioServer = startStdioServer;
|
|
182
|
+
//# sourceMappingURL=index.cjs.map
|
|
183
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/transports/stdio.ts","../../src/transports/security.ts","../../src/transports/http.ts"],"names":["StdioServerTransport","isInitializeRequest","StreamableHTTPServerTransport","randomUUID"],"mappings":";;;;;;;;AAgBA,eAAsB,gBAAA,CACpB,MAAA,EACA,GAAA,EACA,KAAA,GAAsB,EAAC,EACR;AACf,EAAA,GAAA,CAAI,MAAA,CAAO,KAAK,0CAAA,EAA4C;AAAA,IAC1D,MAAM,GAAA,CAAI,UAAA;AAAA,IACV,SAAS,GAAA,CAAI;AAAA,GACd,CAAA;AAED,EAAA,MAAM,SAAA,GAAY,IAAIA,6BAAA,EAAqB;AAC3C,EAAA,MAAM,MAAA,CAAO,QAAQ,SAAS,CAAA;AAE9B,EAAA,GAAA,CAAI,MAAA,CAAO,KAAK,0BAA0B,CAAA;AAC5C;;;AClBA,IAAM,kBAAA,GACJ,4EAAA;AAEK,SAAS,iBAAiB,OAAA,EAAkD;AACjF,EAAA,IAAI,KAAA,CAAM,OAAA,CAAQ,OAAO,CAAA,EAAG,OAAO,OAAA;AAEnC,EAAA,MAAM,KAAA,GAAQ,SAAS,IAAA,EAAK;AAC5B,EAAA,IAAI,CAAC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M,IAAI,OAAA,CAAc,CAAC,OAAA,EAAS,MAAA,KAAW;AAC3C,IAAA,MAAM,SAAS,GAAA,CAAI,MAAA,CAAO,IAAA,EAAM,IAAA,EAAM,CAAC,GAAA,KAAgB;AACrD,MAAA,IAAI,GAAA,SAAY,GAAG,CAAA;AAAA,WACd;AACH,QAAA,GAAA,CAAI,OAAO,IAAA,CAAK,yBAAA,EAA2B,EAAE,IAAA,EAAM,MAAM,CAAA;AACzD,QAAA,OAAA,EAAQ;AAAA,MACV;AAAA,IACF,CAAC,CAAA;AACD,IAAA,MAAA,CAAO,EAAA,CAAG,SAAS,MAAM,CAAA;AAAA,EAC3B,CAAC,CAAA;AACH","file":"index.cjs","sourcesContent":["/**\n * Stdio transport — connects an existing McpServer over process.stdin/stdout.\n *\n * Stdio reserves stdout for JSON-RPC; ALL diagnostic output must go to stderr.\n * Modules that use ctx.logger are safe; raw console.log is not.\n */\n\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext } from '../core/context.js';\n\nexport interface StdioOptions {\n /** No-op hook for symmetry with HTTP options. */\n signal?: AbortSignal;\n}\n\nexport async function startStdioServer(\n server: McpServer,\n ctx: McpContext,\n _opts: StdioOptions = {},\n): Promise<void> {\n ctx.logger.info('Starting MCP server with stdio transport', {\n name: ctx.serverName,\n version: ctx.serverVersion,\n });\n\n const transport = new StdioServerTransport();\n await server.connect(transport);\n\n ctx.logger.info('MCP stdio server started');\n}\n","/**\n * HTTP transport security helpers — ported verbatim from\n * vibecontrols-mcp/src/transports/security.ts.\n *\n * - parseCorsOrigins: comma-separated string → array (defaults to localhost-only)\n * - isAuthorizedRequest: Bearer or X-API-Key header check\n * - requireAuthorizedRequest: 401/503 short-circuit middleware\n * - isValidSessionId: UUID v1-8 pattern guard\n */\n\nimport type { Request, Response } from 'express';\n\nconst SESSION_ID_PATTERN =\n /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;\n\nexport function parseCorsOrigins(origins: string | string[] | undefined): string[] {\n if (Array.isArray(origins)) return origins;\n\n const value = origins?.trim();\n if (!value || value === '*') {\n return ['http://127.0.0.1', 'http://localhost'];\n }\n\n return value\n .split(',')\n .map((origin) => origin.trim())\n .filter(Boolean);\n}\n\nexport function isAuthorizedRequest(req: Request, apiKey: string): boolean {\n return req.headers.authorization === `Bearer ${apiKey}` || req.headers['x-api-key'] === apiKey;\n}\n\nexport function requireAuthorizedRequest(\n req: Request,\n res: Response,\n apiKey: string | undefined,\n): boolean {\n if (!apiKey) {\n res.status(503).json({ error: 'Transport authentication is not configured' });\n return false;\n }\n\n if (!isAuthorizedRequest(req, apiKey)) {\n res.status(401).json({ error: 'Unauthorized' });\n return false;\n }\n\n return true;\n}\n\nexport function assertTransportAuthConfigured(\n transport: 'stdio' | 'sse' | 'http',\n apiKey: string | undefined,\n): void {\n if ((transport === 'sse' || transport === 'http') && !apiKey) {\n throw new Error('MCP_API_KEY must be configured for HTTP/SSE transports');\n }\n}\n\nexport function isValidSessionId(sessionId: string): boolean {\n return SESSION_ID_PATTERN.test(sessionId);\n}\n","/**\n * HTTP transport — Streamable HTTP via Express + CORS.\n *\n * express + cors are OPTIONAL peer deps; we dynamic-import them so stdio-only\n * consumers don't pay the install cost.\n *\n * Ported from vibecontrols-mcp/src/transports/http-simple.ts. Notable:\n * - DNS-rebinding protection ON by default (don't relax!)\n * - Per-session UUID transport instances (multi-client multiplex)\n * - Optional API-key auth (Bearer or X-API-Key)\n *\n * NOTE: each new MCP session re-runs the createServerFn to mint a fresh\n * server instance. The shell passes a factory so each session gets its own\n * registered tools/resources/prompts (current vibecontrols-mcp pattern).\n */\n\nimport { randomUUID } from 'node:crypto';\nimport { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';\nimport { isInitializeRequest } from '@modelcontextprotocol/sdk/types.js';\nimport type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { McpContext } from '../core/context.js';\nimport { isValidSessionId, parseCorsOrigins, requireAuthorizedRequest } from './security.js';\n\nexport interface HttpServerOptions {\n port?: number;\n host?: string;\n apiKey?: string;\n enableCors?: boolean;\n corsOrigins?: string | string[];\n enableDnsRebindingProtection?: boolean;\n allowedHosts?: string[];\n}\n\nexport type CreateServerFn = () => McpServer;\n\n/**\n * Build an Express app exposing /mcp + /health endpoints. The createServerFn\n * is invoked once per new MCP session.\n */\nexport async function createHttpApp(\n ctx: McpContext,\n createServerFn: CreateServerFn,\n options: HttpServerOptions = {},\n): Promise<unknown /* express.Application */> {\n // Dynamic-import express + cors so stdio-only consumers don't pay the cost.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const expressMod = (await import('express' as any)) as any;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const corsMod = (await import('cors' as any)) as any;\n\n const express = expressMod.default ?? expressMod;\n const cors = corsMod.default ?? corsMod;\n\n const cfg = ctx.config.read();\n const app = express();\n\n app.use(express.json());\n\n if (options.enableCors !== false) {\n const corsOrigins = options.corsOrigins ?? cfg.corsOrigins;\n app.use(\n cors({\n origin: parseCorsOrigins(corsOrigins),\n exposedHeaders: ['Mcp-Session-Id'],\n allowedHeaders: ['Content-Type', 'Authorization', 'X-API-Key', 'mcp-session-id'],\n }),\n );\n }\n\n const transports: Record<string, StreamableHTTPServerTransport> = {};\n const apiKey = options.apiKey ?? cfg.apiKey;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n app.post('/mcp', async (req: any, res: any) => {\n if (!requireAuthorizedRequest(req, res, apiKey)) return;\n\n try {\n const sessionId = req.headers['mcp-session-id'] as string | undefined;\n let transport: StreamableHTTPServerTransport;\n\n if (sessionId && !isValidSessionId(sessionId)) {\n res.status(400).json({\n jsonrpc: '2.0',\n error: { code: -32000, message: 'Bad Request: Invalid session ID provided' },\n id: null,\n });\n return;\n }\n\n if (sessionId && transports[sessionId]) {\n transport = transports[sessionId];\n } else if (!sessionId && isInitializeRequest(req.body)) {\n transport = new StreamableHTTPServerTransport({\n sessionIdGenerator: () => randomUUID(),\n onsessioninitialized: (sid) => {\n transports[sid] = transport;\n ctx.logger.info('New MCP session initialized', { sessionId: sid });\n },\n enableDnsRebindingProtection: options.enableDnsRebindingProtection ?? true,\n allowedHosts: options.allowedHosts ?? cfg.allowedHosts.split(','),\n });\n\n transport.onclose = (): void => {\n if (transport.sessionId) {\n delete transports[transport.sessionId];\n ctx.logger.info('MCP session closed', { sessionId: transport.sessionId });\n }\n };\n\n const server = createServerFn();\n await server.connect(transport);\n } else {\n res.status(400).json({\n jsonrpc: '2.0',\n error: { code: -32000, message: 'Bad Request: No valid session ID provided' },\n id: null,\n });\n return;\n }\n\n await transport.handleRequest(req, res, req.body);\n } catch (error) {\n ctx.logger.error('Error handling MCP request', {\n error: error instanceof Error ? error.message : String(error),\n });\n if (!res.headersSent) {\n res.status(500).json({\n jsonrpc: '2.0',\n error: { code: -32603, message: 'Internal server error' },\n id: null,\n });\n }\n }\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const handleSessionRequest = async (req: any, res: any): Promise<void> => {\n if (!requireAuthorizedRequest(req, res, apiKey)) return;\n const sessionId = req.headers['mcp-session-id'] as string | undefined;\n if (!sessionId || !isValidSessionId(sessionId) || !transports[sessionId]) {\n res.status(400).send('Invalid or missing session ID');\n return;\n }\n await transports[sessionId].handleRequest(req, res);\n };\n\n app.get('/mcp', handleSessionRequest);\n app.delete('/mcp', handleSessionRequest);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n app.get('/health', (_req: any, res: any) => {\n res.json({\n status: 'healthy',\n server: ctx.serverName,\n version: ctx.serverVersion,\n timestamp: new Date().toISOString(),\n uptime: process.uptime(),\n activeSessions: Object.keys(transports).length,\n });\n });\n\n return app;\n}\n\n/**\n * Start the HTTP transport. The shell passes a factory because each new MCP\n * session needs a fresh server instance with its own per-session state.\n */\nexport async function startHttpServer(\n ctx: McpContext,\n createServerFn: CreateServerFn,\n options: HttpServerOptions = {},\n): Promise<void> {\n const cfg = ctx.config.read();\n const port = options.port ?? cfg.httpPort;\n const host = options.host ?? cfg.host;\n\n ctx.logger.info('Starting MCP server with HTTP transport', {\n port,\n host,\n name: ctx.serverName,\n version: ctx.serverVersion,\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const app = (await createHttpApp(ctx, createServerFn, options)) as any;\n\n await new Promise<void>((resolve, reject) => {\n const server = app.listen(port, host, (err?: Error) => {\n if (err) reject(err);\n else {\n ctx.logger.info('MCP HTTP server started', { port, host });\n resolve();\n }\n });\n server.on('error', reject);\n });\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { C as CreateServerFn, H as HttpServerOptions, S as StdioOptions, c as createHttpApp, s as startHttpServer, a as startStdioServer } from '../http-BP4c721D.cjs';
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
import '../context-1jV4NsLv.cjs';
|
|
5
|
+
import 'graphql-request';
|
|
6
|
+
|
|
7
|
+
declare function parseCorsOrigins(origins: string | string[] | undefined): string[];
|
|
8
|
+
declare function isAuthorizedRequest(req: Request, apiKey: string): boolean;
|
|
9
|
+
declare function requireAuthorizedRequest(req: Request, res: Response, apiKey: string | undefined): boolean;
|
|
10
|
+
declare function assertTransportAuthConfigured(transport: 'stdio' | 'sse' | 'http', apiKey: string | undefined): void;
|
|
11
|
+
declare function isValidSessionId(sessionId: string): boolean;
|
|
12
|
+
|
|
13
|
+
export { assertTransportAuthConfigured, isAuthorizedRequest, isValidSessionId, parseCorsOrigins, requireAuthorizedRequest };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { C as CreateServerFn, H as HttpServerOptions, S as StdioOptions, c as createHttpApp, s as startHttpServer, a as startStdioServer } from '../http-DXTeCD5r.js';
|
|
2
|
+
import { Request, Response } from 'express';
|
|
3
|
+
import '@modelcontextprotocol/sdk/server/mcp.js';
|
|
4
|
+
import '../context-1jV4NsLv.js';
|
|
5
|
+
import 'graphql-request';
|
|
6
|
+
|
|
7
|
+
declare function parseCorsOrigins(origins: string | string[] | undefined): string[];
|
|
8
|
+
declare function isAuthorizedRequest(req: Request, apiKey: string): boolean;
|
|
9
|
+
declare function requireAuthorizedRequest(req: Request, res: Response, apiKey: string | undefined): boolean;
|
|
10
|
+
declare function assertTransportAuthConfigured(transport: 'stdio' | 'sse' | 'http', apiKey: string | undefined): void;
|
|
11
|
+
declare function isValidSessionId(sessionId: string): boolean;
|
|
12
|
+
|
|
13
|
+
export { assertTransportAuthConfigured, isAuthorizedRequest, isValidSessionId, parseCorsOrigins, requireAuthorizedRequest };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
|
package/package.json
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@burdenoff/mcp-libs",
|
|
3
|
+
"version": "2026.511.1",
|
|
4
|
+
"description": "Modular MCP SDK shared across all Burdenoff product MCPs (vibecontrols, botlit, fluidgrids, bigconsole, healthybowl, workspaces). Each module exports an McpModule contract; product MCPs become thin shells that pick which modules to mount.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"README.md",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./dist/index.d.ts",
|
|
17
|
+
"import": "./dist/index.js",
|
|
18
|
+
"require": "./dist/index.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./core": {
|
|
21
|
+
"types": "./dist/core/index.d.ts",
|
|
22
|
+
"import": "./dist/core/index.js",
|
|
23
|
+
"require": "./dist/core/index.cjs"
|
|
24
|
+
},
|
|
25
|
+
"./transports": {
|
|
26
|
+
"types": "./dist/transports/index.d.ts",
|
|
27
|
+
"import": "./dist/transports/index.js",
|
|
28
|
+
"require": "./dist/transports/index.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./modules/*": {
|
|
31
|
+
"types": "./dist/modules/*/index.d.ts",
|
|
32
|
+
"import": "./dist/modules/*/index.js",
|
|
33
|
+
"require": "./dist/modules/*/index.cjs"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"dev": "tsup --watch",
|
|
38
|
+
"build": "tsup",
|
|
39
|
+
"type-check": "tsc --noEmit",
|
|
40
|
+
"lint": "eslint src --fix",
|
|
41
|
+
"lint:check": "eslint src",
|
|
42
|
+
"lint:sanity": "if [ \"${CI:-}\" = \"true\" ]; then bun run lint:check; else bun run lint:check -- --cache --cache-location .eslintcache; fi",
|
|
43
|
+
"format": "prettier --write \"src/**/*.{ts,js,json,md}\" \"tests/**/*.{ts,js}\"",
|
|
44
|
+
"format:check": "prettier --check \"src/**/*.{ts,js,json,md}\" \"tests/**/*.{ts,js}\"",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"test:watch": "vitest",
|
|
47
|
+
"test:coverage": "vitest run --coverage",
|
|
48
|
+
"clean": "rimraf dist .eslintcache",
|
|
49
|
+
"sanity": "bun run format:check && bun run lint:sanity && bun run type-check && bun run build && bun run test",
|
|
50
|
+
"prepublishOnly": "bun run clean && bun run build",
|
|
51
|
+
"publish:verdaccio": "bun run build && bunx npm@latest publish --tag alpha --access restricted",
|
|
52
|
+
"publish:verdaccio:latest": "bun run build && bunx npm@latest publish --tag latest --access restricted"
|
|
53
|
+
},
|
|
54
|
+
"keywords": [
|
|
55
|
+
"burdenoff",
|
|
56
|
+
"mcp",
|
|
57
|
+
"model-context-protocol",
|
|
58
|
+
"mcp-sdk",
|
|
59
|
+
"modular",
|
|
60
|
+
"graphql"
|
|
61
|
+
],
|
|
62
|
+
"author": {
|
|
63
|
+
"name": "Vignesh T.V",
|
|
64
|
+
"email": "vignesh@burdenoff.com",
|
|
65
|
+
"url": "https://github.com/tvvignesh"
|
|
66
|
+
},
|
|
67
|
+
"license": "UNLICENSED",
|
|
68
|
+
"repository": {
|
|
69
|
+
"type": "git",
|
|
70
|
+
"url": "git+https://github.com/algoshred/mcp-libs.git"
|
|
71
|
+
},
|
|
72
|
+
"bugs": {
|
|
73
|
+
"url": "https://github.com/algoshred/mcp-libs/issues"
|
|
74
|
+
},
|
|
75
|
+
"homepage": "https://github.com/algoshred/mcp-libs#readme",
|
|
76
|
+
"publishConfig": {
|
|
77
|
+
"access": "restricted",
|
|
78
|
+
"registry": "https://verdaccio.tooling.internal.burdenoff.com/"
|
|
79
|
+
},
|
|
80
|
+
"dependencies": {
|
|
81
|
+
"cross-fetch": "^4.1.0"
|
|
82
|
+
},
|
|
83
|
+
"peerDependencies": {
|
|
84
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
85
|
+
"graphql": "^16.0.0",
|
|
86
|
+
"graphql-request": "^7.0.0",
|
|
87
|
+
"zod": "^3.25.0"
|
|
88
|
+
},
|
|
89
|
+
"peerDependenciesMeta": {
|
|
90
|
+
"express": {
|
|
91
|
+
"optional": true
|
|
92
|
+
},
|
|
93
|
+
"cors": {
|
|
94
|
+
"optional": true
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"devDependencies": {
|
|
98
|
+
"@modelcontextprotocol/sdk": "1.29.0",
|
|
99
|
+
"@types/cors": "^2.8.17",
|
|
100
|
+
"@types/express": "^5.0.0",
|
|
101
|
+
"@types/node": "^24.12.2",
|
|
102
|
+
"@typescript-eslint/eslint-plugin": "^8.58.0",
|
|
103
|
+
"@typescript-eslint/parser": "^8.58.0",
|
|
104
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
105
|
+
"cors": "^2.8.6",
|
|
106
|
+
"eslint": "^9.39.4",
|
|
107
|
+
"eslint-config-prettier": "^10.1.8",
|
|
108
|
+
"eslint-plugin-prettier": "^5.5.5",
|
|
109
|
+
"express": "^5.2.1",
|
|
110
|
+
"globals": "^16.5.0",
|
|
111
|
+
"graphql": "^16.13.2",
|
|
112
|
+
"graphql-request": "^7.4.0",
|
|
113
|
+
"prettier": "^3.8.1",
|
|
114
|
+
"rimraf": "^6.1.3",
|
|
115
|
+
"tsup": "^8.5.1",
|
|
116
|
+
"tsx": "^4.21.0",
|
|
117
|
+
"typescript": "^5.9.3",
|
|
118
|
+
"vitest": "^3.2.4",
|
|
119
|
+
"zod": "^3.25.76"
|
|
120
|
+
},
|
|
121
|
+
"engines": {
|
|
122
|
+
"node": ">=24.11.0",
|
|
123
|
+
"bun": ">=1.3.10"
|
|
124
|
+
}
|
|
125
|
+
}
|