@klurien_nova/mcp-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/server.js ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ import "../dist/index.js";
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { BizHubAgent } from "@bizhub/agent-kit";
5
+ import { getConfig } from "@bizhub/agent-kit";
6
+ const cfg = getConfig();
7
+ const agent = new BizHubAgent({ name: "bizhub-mcp", version: "1.0.0" });
8
+ agent.loadDefaultTools();
9
+ const server = new McpServer({
10
+ name: "BizHub Marketplace",
11
+ version: "1.0.0",
12
+ }, {
13
+ capabilities: { tools: {} },
14
+ });
15
+ const tools = agent.getToolDefinitions();
16
+ for (const tool of tools) {
17
+ const schema = tool.schema;
18
+ // Convert Zod schema to the shape MCP expects
19
+ const shape = {};
20
+ if (schema._def?.shape) {
21
+ const s = schema._def.shape();
22
+ for (const [key, value] of Object.entries(s)) {
23
+ shape[key] = value;
24
+ }
25
+ }
26
+ server.tool(tool.name, tool.description, shape, async (args) => {
27
+ const result = await agent.execute(tool.name, args);
28
+ return {
29
+ content: [
30
+ {
31
+ type: "text",
32
+ text: JSON.stringify(result.data || { error: result.error }, null, 2),
33
+ },
34
+ ],
35
+ };
36
+ });
37
+ }
38
+ console.error(`[bizhub-mcp] Server initialized`);
39
+ console.error(`[bizhub-mcp] API: ${cfg.apiUrl}`);
40
+ console.error(`[bizhub-mcp] Auth: ${cfg.authCookie || cfg.apiKey ? "configured" : "NOT configured"}`);
41
+ console.error(`[bizhub-mcp] Tools: ${tools.length} registered`);
42
+ const transport = new StdioServerTransport();
43
+ await server.connect(transport);
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,MAAM,GAAG,GAAG,SAAS,EAAE,CAAC;AACxB,MAAM,KAAK,GAAG,IAAI,WAAW,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;AACxE,KAAK,CAAC,gBAAgB,EAAE,CAAC;AAEzB,MAAM,MAAM,GAAG,IAAI,SAAS,CAC1B;IACE,IAAI,EAAE,oBAAoB;IAC1B,OAAO,EAAE,OAAO;CACjB,EACD;IACE,YAAY,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;CAC5B,CACF,CAAC;AAEF,MAAM,KAAK,GAAG,KAAK,CAAC,kBAAkB,EAAE,CAAC;AAEzC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;IACzB,MAAM,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;IAE3B,8CAA8C;IAC9C,MAAM,KAAK,GAAiC,EAAE,CAAC;IAC/C,IAAI,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC;QACvB,MAAM,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;QAC9B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7C,KAAK,CAAC,GAAG,CAAC,GAAG,KAAqB,CAAC;QACrC,CAAC;IACH,CAAC;IAED,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;QAC7D,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,IAA+B,CAAC,CAAC;QAC/E,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC;iBACtE;aACF;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC;AAED,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC,CAAC;AACjD,OAAO,CAAC,KAAK,CAAC,qBAAqB,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;AACjD,OAAO,CAAC,KAAK,CAAC,sBAAsB,GAAG,CAAC,UAAU,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,EAAE,CAAC,CAAC;AACtG,OAAO,CAAC,KAAK,CAAC,uBAAuB,KAAK,CAAC,MAAM,aAAa,CAAC,CAAC;AAEhE,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;AAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,28 @@
1
+ {
2
+ "name": "@klurien_nova/mcp-server",
3
+ "version": "1.0.0",
4
+ "description": "Enterprise MCP server for BizHub marketplace — connect AI agents (Claude, Cursor, Copilot) to manage products, orders, inventory, and more",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "bizhub-mcp": "./bin/server.js"
10
+ },
11
+ "files": ["dist/", "bin/"],
12
+ "scripts": {
13
+ "build": "tsc",
14
+ "start": "node bin/server.js",
15
+ "clean": "rm -rf dist"
16
+ },
17
+ "dependencies": {
18
+ "@klurien_nova/agent-kit": "1.0.0",
19
+ "@modelcontextprotocol/sdk": "^1.9.0",
20
+ "zod": "^3.24.0"
21
+ },
22
+ "publishConfig": {
23
+ "access": "public"
24
+ },
25
+ "engines": {
26
+ "node": ">=18"
27
+ }
28
+ }