@mulep/mcp-server 0.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.
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/dist/index.js ADDED
@@ -0,0 +1,334 @@
1
+ #!/usr/bin/env node
2
+
3
+ // src/server.ts
4
+ import { join } from "path";
5
+ import {
6
+ CancellationToken,
7
+ CostStore,
8
+ MemoryStore,
9
+ ModelRegistry,
10
+ Orchestrator,
11
+ MCP_CONTENT_MAX_LENGTH,
12
+ MCP_TASK_MAX_LENGTH,
13
+ loadConfig,
14
+ openDatabase
15
+ } from "@mulep/core";
16
+ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
17
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
18
+ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
19
+
20
+ // src/tools/review.ts
21
+ import { reviewInputSchema } from "@mulep/core";
22
+ async function handleReview(orchestrator, args, cancellationToken) {
23
+ const input = reviewInputSchema.parse(args);
24
+ const result = await orchestrator.review(
25
+ input.content,
26
+ {
27
+ criteria: input.criteria,
28
+ strict: input.strict,
29
+ timeout: input.timeout
30
+ },
31
+ cancellationToken
32
+ );
33
+ return {
34
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
35
+ };
36
+ }
37
+
38
+ // src/tools/plan.ts
39
+ import { planInputSchema } from "@mulep/core";
40
+ async function handlePlan(orchestrator, args) {
41
+ const input = planInputSchema.parse(args);
42
+ const result = await orchestrator.plan(input.task, {
43
+ maxRounds: input.maxRounds,
44
+ stream: input.stream
45
+ });
46
+ return {
47
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
48
+ };
49
+ }
50
+
51
+ // src/tools/debate.ts
52
+ import { debateInputSchema } from "@mulep/core";
53
+ async function handleDebate(orchestrator, args) {
54
+ const input = debateInputSchema.parse(args);
55
+ const result = await orchestrator.debateMultiRound(input.question, {
56
+ modelAliases: input.models,
57
+ maxRounds: input.maxRounds,
58
+ timeout: input.timeout
59
+ });
60
+ return {
61
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
62
+ };
63
+ }
64
+
65
+ // src/tools/memory.ts
66
+ import { memoryInputSchema } from "@mulep/core";
67
+ async function handleMemory(memoryStore, projectId, args) {
68
+ const input = memoryInputSchema.parse(args);
69
+ let result;
70
+ switch (input.action) {
71
+ case "save": {
72
+ if (!input.content) {
73
+ throw new Error("content is required for save action");
74
+ }
75
+ const id = memoryStore.save({
76
+ projectId,
77
+ category: input.category ?? "convention",
78
+ content: input.content,
79
+ sourceSessionId: null,
80
+ importance: input.importance
81
+ });
82
+ result = { id, saved: true };
83
+ break;
84
+ }
85
+ case "search": {
86
+ if (!input.query) {
87
+ throw new Error("query is required for search action");
88
+ }
89
+ const records = memoryStore.search(input.query, projectId);
90
+ result = { records, count: records.length };
91
+ break;
92
+ }
93
+ case "get": {
94
+ if (input.memoryId === void 0) {
95
+ throw new Error("memoryId is required for get action");
96
+ }
97
+ const record = memoryStore.getById(input.memoryId);
98
+ if (record) {
99
+ memoryStore.recordAccess(input.memoryId);
100
+ }
101
+ result = record ?? { error: "Not found" };
102
+ break;
103
+ }
104
+ case "delete": {
105
+ if (input.memoryId === void 0) {
106
+ throw new Error("memoryId is required for delete action");
107
+ }
108
+ memoryStore.delete(input.memoryId);
109
+ result = { deleted: true, memoryId: input.memoryId };
110
+ break;
111
+ }
112
+ default: {
113
+ throw new Error(`Unknown memory action: ${String(input.action)}`);
114
+ }
115
+ }
116
+ return {
117
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
118
+ };
119
+ }
120
+
121
+ // src/tools/cost.ts
122
+ import { DAYS_PER_YEAR, costInputSchema } from "@mulep/core";
123
+ async function handleCost(costStore, args) {
124
+ const input = costInputSchema.parse(args);
125
+ let result;
126
+ switch (input.scope) {
127
+ case "session": {
128
+ const sessionId = input.sessionId ?? "";
129
+ result = costStore.getSessionSummary(sessionId);
130
+ break;
131
+ }
132
+ case "daily": {
133
+ result = costStore.getDailySummary(input.days);
134
+ break;
135
+ }
136
+ case "all": {
137
+ result = costStore.getDailySummary(DAYS_PER_YEAR);
138
+ break;
139
+ }
140
+ default: {
141
+ throw new Error(`Unknown cost scope: ${String(input.scope)}`);
142
+ }
143
+ }
144
+ return {
145
+ content: [{ type: "text", text: JSON.stringify(result, null, 2) }]
146
+ };
147
+ }
148
+
149
+ // src/server.ts
150
+ var TOOL_DEFINITIONS = [
151
+ {
152
+ name: "mulep_review",
153
+ description: "Review code or content with a configured AI model. Returns score, verdict, and feedback.",
154
+ inputSchema: {
155
+ type: "object",
156
+ properties: {
157
+ content: {
158
+ type: "string",
159
+ description: "Content to review",
160
+ minLength: 1,
161
+ maxLength: MCP_CONTENT_MAX_LENGTH
162
+ },
163
+ criteria: { type: "array", items: { type: "string" }, description: "Review criteria" },
164
+ model: { type: "string", description: "Model alias override" },
165
+ strict: { type: "boolean", description: "Enable strict DLP mode", default: true },
166
+ timeout: { type: "number", description: "Timeout in seconds", default: 600 }
167
+ },
168
+ required: ["content"]
169
+ }
170
+ },
171
+ {
172
+ name: "mulep_plan",
173
+ description: "Generate and iterate on a plan using multi-model review loops. Returns the refined plan.",
174
+ inputSchema: {
175
+ type: "object",
176
+ properties: {
177
+ task: { type: "string", description: "Task to plan", minLength: 1, maxLength: MCP_TASK_MAX_LENGTH },
178
+ maxRounds: { type: "integer", description: "Max review rounds", default: 3 },
179
+ stream: { type: "boolean", description: "Enable streaming", default: false },
180
+ timeout: { type: "number", description: "Timeout in seconds", default: 600 }
181
+ },
182
+ required: ["task"]
183
+ }
184
+ },
185
+ {
186
+ name: "mulep_debate",
187
+ description: "Debate a question across multiple AI models concurrently. Returns per-model responses and optional synthesis.",
188
+ inputSchema: {
189
+ type: "object",
190
+ properties: {
191
+ question: {
192
+ type: "string",
193
+ description: "Question to debate",
194
+ minLength: 1,
195
+ maxLength: MCP_TASK_MAX_LENGTH
196
+ },
197
+ models: {
198
+ type: "array",
199
+ items: { type: "string" },
200
+ minItems: 1,
201
+ maxItems: 5,
202
+ description: "Model aliases"
203
+ },
204
+ synthesize: { type: "boolean", description: "Synthesize responses", default: false },
205
+ maxRounds: {
206
+ type: "integer",
207
+ description: "Max review rounds",
208
+ default: 3,
209
+ minimum: 1,
210
+ maximum: 10
211
+ },
212
+ timeout: { type: "number", description: "Timeout in seconds", default: 600 }
213
+ },
214
+ required: ["question"]
215
+ }
216
+ },
217
+ {
218
+ name: "mulep_memory",
219
+ description: "Save, search, retrieve, or delete project memories (decisions, conventions, patterns).",
220
+ inputSchema: {
221
+ type: "object",
222
+ properties: {
223
+ action: {
224
+ type: "string",
225
+ enum: ["save", "search", "get", "delete"],
226
+ description: "Memory operation"
227
+ },
228
+ content: { type: "string", description: "Content to save" },
229
+ query: { type: "string", description: "Search query" },
230
+ memoryId: { type: "integer", description: "Memory record ID" },
231
+ category: {
232
+ type: "string",
233
+ enum: ["decision", "convention", "pattern", "issue", "preference"],
234
+ description: "Memory category"
235
+ },
236
+ importance: { type: "number", description: "Importance 0-1", default: 0.5 },
237
+ timeout: { type: "number", description: "Timeout in seconds", default: 5 }
238
+ },
239
+ required: ["action"]
240
+ }
241
+ },
242
+ {
243
+ name: "mulep_cost",
244
+ description: "Query cost and token usage data. Supports session, daily, and all-time scopes.",
245
+ inputSchema: {
246
+ type: "object",
247
+ properties: {
248
+ scope: {
249
+ type: "string",
250
+ enum: ["session", "daily", "all"],
251
+ description: "Cost scope",
252
+ default: "session"
253
+ },
254
+ sessionId: { type: "string", description: "Session ID for session scope" },
255
+ days: { type: "integer", description: "Number of days for daily scope", default: 30 },
256
+ timeout: { type: "number", description: "Timeout in seconds", default: 5 }
257
+ }
258
+ }
259
+ }
260
+ ];
261
+ async function startServer() {
262
+ const projectDir = process.env.MULEP_PROJECT_DIR ?? process.cwd();
263
+ const config = loadConfig({ projectDir });
264
+ const dbPath = process.env.MULEP_DB_PATH ?? join(projectDir, ".mulep", "db", "mulep.db");
265
+ const db = openDatabase(dbPath);
266
+ const registry = ModelRegistry.fromConfig(config, projectDir);
267
+ await registry.resolveAutoMode();
268
+ const orchestrator = new Orchestrator({ registry, db, config, projectDir });
269
+ const memoryStore = new MemoryStore(db);
270
+ const costStore = new CostStore(db);
271
+ const projectId = config.project.name || "default";
272
+ const server = new Server(
273
+ { name: "mulep", version: "0.2.0" },
274
+ { capabilities: { tools: {} } }
275
+ );
276
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
277
+ return { tools: TOOL_DEFINITIONS };
278
+ });
279
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
280
+ const toolName = request.params.name;
281
+ const args = request.params.arguments ?? {};
282
+ try {
283
+ switch (toolName) {
284
+ case "mulep_review": {
285
+ const token = new CancellationToken();
286
+ return await handleReview(orchestrator, args, token);
287
+ }
288
+ case "mulep_plan": {
289
+ return await handlePlan(orchestrator, args);
290
+ }
291
+ case "mulep_debate": {
292
+ return await handleDebate(orchestrator, args);
293
+ }
294
+ case "mulep_memory": {
295
+ return await handleMemory(memoryStore, projectId, args);
296
+ }
297
+ case "mulep_cost": {
298
+ return await handleCost(costStore, args);
299
+ }
300
+ default: {
301
+ return {
302
+ content: [{ type: "text", text: `Unknown tool: ${toolName}` }],
303
+ isError: true
304
+ };
305
+ }
306
+ }
307
+ } catch (err) {
308
+ const message = err instanceof Error ? err.message : String(err);
309
+ return {
310
+ content: [{ type: "text", text: `Error: ${message}` }],
311
+ isError: true
312
+ };
313
+ }
314
+ });
315
+ const transport = new StdioServerTransport();
316
+ await server.connect(transport);
317
+ const shutdown = () => {
318
+ try {
319
+ db.close();
320
+ } catch {
321
+ }
322
+ process.exit(0);
323
+ };
324
+ process.on("SIGTERM", shutdown);
325
+ process.on("SIGINT", shutdown);
326
+ console.error("MuleP MCP server started");
327
+ }
328
+
329
+ // src/index.ts
330
+ startServer().catch((err) => {
331
+ console.error("Failed to start MuleP MCP server:", err);
332
+ process.exit(1);
333
+ });
334
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/server.ts","../src/tools/review.ts","../src/tools/plan.ts","../src/tools/debate.ts","../src/tools/memory.ts","../src/tools/cost.ts","../src/index.ts"],"sourcesContent":["// packages/mcp-server/src/server.ts — MCP server setup with 5 tool handlers\n\nimport { join } from 'node:path';\nimport {\n CancellationToken,\n CostStore,\n MemoryStore,\n ModelRegistry,\n Orchestrator,\n MCP_CONTENT_MAX_LENGTH,\n MCP_TASK_MAX_LENGTH,\n loadConfig,\n openDatabase,\n} from '@mulep/core';\nimport type { ProjectConfig } from '@mulep/core';\nimport { Server } from '@modelcontextprotocol/sdk/server/index.js';\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';\nimport { handleCost, handleDebate, handleMemory, handlePlan, handleReview } from './tools/index.js';\n\nconst TOOL_DEFINITIONS = [\n {\n name: 'mulep_review',\n description:\n 'Review code or content with a configured AI model. Returns score, verdict, and feedback.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n content: {\n type: 'string',\n description: 'Content to review',\n minLength: 1,\n maxLength: MCP_CONTENT_MAX_LENGTH,\n },\n criteria: { type: 'array', items: { type: 'string' }, description: 'Review criteria' },\n model: { type: 'string', description: 'Model alias override' },\n strict: { type: 'boolean', description: 'Enable strict DLP mode', default: true },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 600 },\n },\n required: ['content'],\n },\n },\n {\n name: 'mulep_plan',\n description:\n 'Generate and iterate on a plan using multi-model review loops. Returns the refined plan.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n task: { type: 'string', description: 'Task to plan', minLength: 1, maxLength: MCP_TASK_MAX_LENGTH },\n maxRounds: { type: 'integer', description: 'Max review rounds', default: 3 },\n stream: { type: 'boolean', description: 'Enable streaming', default: false },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 600 },\n },\n required: ['task'],\n },\n },\n {\n name: 'mulep_debate',\n description:\n 'Debate a question across multiple AI models concurrently. Returns per-model responses and optional synthesis.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n question: {\n type: 'string',\n description: 'Question to debate',\n minLength: 1,\n maxLength: MCP_TASK_MAX_LENGTH,\n },\n models: {\n type: 'array',\n items: { type: 'string' },\n minItems: 1,\n maxItems: 5,\n description: 'Model aliases',\n },\n synthesize: { type: 'boolean', description: 'Synthesize responses', default: false },\n maxRounds: {\n type: 'integer',\n description: 'Max review rounds',\n default: 3,\n minimum: 1,\n maximum: 10,\n },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 600 },\n },\n required: ['question'],\n },\n },\n {\n name: 'mulep_memory',\n description:\n 'Save, search, retrieve, or delete project memories (decisions, conventions, patterns).',\n inputSchema: {\n type: 'object' as const,\n properties: {\n action: {\n type: 'string',\n enum: ['save', 'search', 'get', 'delete'],\n description: 'Memory operation',\n },\n content: { type: 'string', description: 'Content to save' },\n query: { type: 'string', description: 'Search query' },\n memoryId: { type: 'integer', description: 'Memory record ID' },\n category: {\n type: 'string',\n enum: ['decision', 'convention', 'pattern', 'issue', 'preference'],\n description: 'Memory category',\n },\n importance: { type: 'number', description: 'Importance 0-1', default: 0.5 },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 5 },\n },\n required: ['action'],\n },\n },\n {\n name: 'mulep_cost',\n description: 'Query cost and token usage data. Supports session, daily, and all-time scopes.',\n inputSchema: {\n type: 'object' as const,\n properties: {\n scope: {\n type: 'string',\n enum: ['session', 'daily', 'all'],\n description: 'Cost scope',\n default: 'session',\n },\n sessionId: { type: 'string', description: 'Session ID for session scope' },\n days: { type: 'integer', description: 'Number of days for daily scope', default: 30 },\n timeout: { type: 'number', description: 'Timeout in seconds', default: 5 },\n },\n },\n },\n];\n\nexport async function startServer(): Promise<void> {\n // Load config\n const projectDir = process.env.MULEP_PROJECT_DIR ?? process.cwd();\n const config: ProjectConfig = loadConfig({ projectDir });\n\n // Open SQLite (WAL mode + busy_timeout set by openDatabase)\n const dbPath = process.env.MULEP_DB_PATH ?? join(projectDir, '.mulep', 'db', 'mulep.db');\n const db = openDatabase(dbPath);\n\n // Create model registry and resolve auto mode (pass projectDir for CLI repo awareness)\n const registry = ModelRegistry.fromConfig(config, projectDir);\n await registry.resolveAutoMode();\n\n // Create orchestrator and stores (pass projectDir for context building)\n const orchestrator = new Orchestrator({ registry, db, config, projectDir });\n const memoryStore = new MemoryStore(db);\n const costStore = new CostStore(db);\n const projectId = config.project.name || 'default';\n\n // Create MCP server\n const server = new Server(\n { name: 'mulep', version: '0.2.0' },\n { capabilities: { tools: {} } },\n );\n\n // Register tool listing handler\n server.setRequestHandler(ListToolsRequestSchema, async () => {\n return { tools: TOOL_DEFINITIONS };\n });\n\n // Register tool call handler\n server.setRequestHandler(CallToolRequestSchema, async (request) => {\n const toolName = request.params.name;\n const args = request.params.arguments ?? {};\n\n try {\n switch (toolName) {\n case 'mulep_review': {\n const token = new CancellationToken();\n return await handleReview(orchestrator, args, token);\n }\n case 'mulep_plan': {\n return await handlePlan(orchestrator, args);\n }\n case 'mulep_debate': {\n return await handleDebate(orchestrator, args);\n }\n case 'mulep_memory': {\n return await handleMemory(memoryStore, projectId, args);\n }\n case 'mulep_cost': {\n return await handleCost(costStore, args);\n }\n default: {\n return {\n content: [{ type: 'text', text: `Unknown tool: ${toolName}` }],\n isError: true,\n };\n }\n }\n } catch (err) {\n const message = err instanceof Error ? err.message : String(err);\n return {\n content: [{ type: 'text', text: `Error: ${message}` }],\n isError: true,\n };\n }\n });\n\n // Connect via stdio transport\n const transport = new StdioServerTransport();\n await server.connect(transport);\n\n // Graceful shutdown: close db and server on termination signals\n const shutdown = () => {\n try {\n db.close();\n } catch {\n // db may already be closed\n }\n process.exit(0);\n };\n process.on('SIGTERM', shutdown);\n process.on('SIGINT', shutdown);\n\n // Log to stderr so it does not interfere with stdio MCP transport\n console.error('MuleP MCP server started');\n}\n","// packages/mcp-server/src/tools/review.ts — mulep_review tool handler\n\nimport { reviewInputSchema } from '@mulep/core';\nimport type { CancellationToken, Orchestrator } from '@mulep/core';\n\nexport async function handleReview(\n orchestrator: Orchestrator,\n args: unknown,\n cancellationToken?: CancellationToken,\n) {\n const input = reviewInputSchema.parse(args);\n const result = await orchestrator.review(\n input.content,\n {\n criteria: input.criteria,\n strict: input.strict,\n timeout: input.timeout,\n },\n cancellationToken,\n );\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n };\n}\n","// packages/mcp-server/src/tools/plan.ts — mulep_plan tool handler\n\nimport { planInputSchema } from '@mulep/core';\nimport type { Orchestrator } from '@mulep/core';\n\nexport async function handlePlan(orchestrator: Orchestrator, args: unknown) {\n const input = planInputSchema.parse(args);\n const result = await orchestrator.plan(input.task, {\n maxRounds: input.maxRounds,\n stream: input.stream,\n });\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n };\n}\n","// packages/mcp-server/src/tools/debate.ts — mulep_debate tool handler\n\nimport { debateInputSchema } from '@mulep/core';\nimport type { Orchestrator } from '@mulep/core';\n\nexport async function handleDebate(orchestrator: Orchestrator, args: unknown) {\n const input = debateInputSchema.parse(args);\n const result = await orchestrator.debateMultiRound(input.question, {\n modelAliases: input.models,\n maxRounds: input.maxRounds,\n timeout: input.timeout,\n });\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n };\n}\n","// packages/mcp-server/src/tools/memory.ts — mulep_memory tool handler\n\nimport { memoryInputSchema } from '@mulep/core';\nimport type { MemoryStore } from '@mulep/core';\n\nexport async function handleMemory(memoryStore: MemoryStore, projectId: string, args: unknown) {\n const input = memoryInputSchema.parse(args);\n let result: unknown;\n\n switch (input.action) {\n case 'save': {\n if (!input.content) {\n throw new Error('content is required for save action');\n }\n const id = memoryStore.save({\n projectId,\n category: input.category ?? 'convention',\n content: input.content,\n sourceSessionId: null,\n importance: input.importance,\n });\n result = { id, saved: true };\n break;\n }\n case 'search': {\n if (!input.query) {\n throw new Error('query is required for search action');\n }\n const records = memoryStore.search(input.query, projectId);\n result = { records, count: records.length };\n break;\n }\n case 'get': {\n if (input.memoryId === undefined) {\n throw new Error('memoryId is required for get action');\n }\n const record = memoryStore.getById(input.memoryId);\n if (record) {\n memoryStore.recordAccess(input.memoryId);\n }\n result = record ?? { error: 'Not found' };\n break;\n }\n case 'delete': {\n if (input.memoryId === undefined) {\n throw new Error('memoryId is required for delete action');\n }\n memoryStore.delete(input.memoryId);\n result = { deleted: true, memoryId: input.memoryId };\n break;\n }\n default: {\n throw new Error(`Unknown memory action: ${String(input.action)}`);\n }\n }\n\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n };\n}\n","// packages/mcp-server/src/tools/cost.ts — mulep_cost tool handler\n\nimport { DAYS_PER_YEAR, costInputSchema } from '@mulep/core';\nimport type { CostStore } from '@mulep/core';\n\nexport async function handleCost(costStore: CostStore, args: unknown) {\n const input = costInputSchema.parse(args);\n let result: unknown;\n\n switch (input.scope) {\n case 'session': {\n const sessionId = input.sessionId ?? '';\n result = costStore.getSessionSummary(sessionId);\n break;\n }\n case 'daily': {\n result = costStore.getDailySummary(input.days);\n break;\n }\n case 'all': {\n result = costStore.getDailySummary(DAYS_PER_YEAR);\n break;\n }\n default: {\n throw new Error(`Unknown cost scope: ${String(input.scope)}`);\n }\n }\n\n return {\n content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],\n };\n}\n","import { startServer } from './server.js';\n\nstartServer().catch((err) => {\n console.error('Failed to start MuleP MCP server:', err);\n process.exit(1);\n});\n"],"mappings":";;;AAEA,SAAS,YAAY;AACrB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,cAAc;AACvB,SAAS,4BAA4B;AACrC,SAAS,uBAAuB,8BAA8B;;;ACf9D,SAAS,yBAAyB;AAGlC,eAAsB,aACpB,cACA,MACA,mBACA;AAC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AAM;AAAA,IACX,QAAQ;AAAA,IAER;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB;AACA,UAAQ,GAAG,WAAW,QAAQ;AAC9B,UAAQ,GAAG,UAAU,QAAQ;AAG7B,UAAQ,MAAM,0BAA0B;AAC1C;;;AM7NA,YAAY,EAAE,MAAM,CAAC,QAAQ;AAC3B,UAAQ,MAAM,qCAAqC,GAAG;AACtD,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@mulep/mcp-server",
3
+ "version": "0.2.14",
4
+ "description": "MCP server for Mule ESB AI development — multi-project workspace, DataWeave analysis, and multi-model collaboration",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/speedboostco/mulep.git",
10
+ "directory": "packages/mcp-server"
11
+ },
12
+ "homepage": "https://github.com/speedboostco/mulep#readme",
13
+ "bugs": "https://github.com/speedboostco/mulep/issues",
14
+ "keywords": ["mcp", "ai", "code-review", "multi-model", "model-context-protocol"],
15
+ "engines": { "node": ">=20.0.0" },
16
+ "files": ["dist"],
17
+ "main": "./dist/index.js",
18
+ "types": "./dist/index.d.ts",
19
+ "exports": {
20
+ ".": {
21
+ "types": "./dist/index.d.ts",
22
+ "import": "./dist/index.js"
23
+ }
24
+ },
25
+ "bin": {
26
+ "mulep-mcp": "./dist/index.js"
27
+ },
28
+ "publishConfig": { "access": "public" },
29
+ "scripts": {
30
+ "build": "tsup",
31
+ "dev": "tsup --watch",
32
+ "typecheck": "tsc --noEmit",
33
+ "test": "vitest run",
34
+ "test:e2e": "tsx tests/e2e-harness.ts",
35
+ "test:e2e:quick": "tsx tests/e2e-harness.ts --quick",
36
+ "clean": "rm -rf dist"
37
+ },
38
+ "dependencies": {
39
+ "@mulep/core": "^0.2.9",
40
+ "@modelcontextprotocol/sdk": "^1.26.0",
41
+ "zod": "^3.24.0"
42
+ },
43
+ "devDependencies": {
44
+ "@types/node": "^22.0.0",
45
+ "tsup": "^8.3.0",
46
+ "tsx": "^4.21.0",
47
+ "typescript": "^5.7.0",
48
+ "vitest": "^3.0.0"
49
+ }
50
+ }