@nekzus/mcp-server 0.0.0-development → 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/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +28 -28
- package/dist/tools/index.js.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/utils/cards.d.ts +1 -1
- package/dist/utils/cards.d.ts.map +1 -1
- package/dist/utils/cards.js +1 -1
- package/dist/utils/cards.js.map +1 -1
- package/dist/utils/datetime.d.ts.map +1 -1
- package/dist/utils/datetime.js +3 -3
- package/dist/utils/datetime.js.map +1 -1
- package/dist/utils/schema.d.ts +3 -4
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +18 -18
- package/dist/utils/schema.js.map +1 -1
- package/package.json +15 -15
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,OAAO,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAKA,OAAO,eAAe,CAAC;AASvB,qBAAa,gBAAgB;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAY;IACnC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAuB;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAkB;;IAsBxC,OAAO,CAAC,YAAY;IAuBpB,OAAO,CAAC,eAAe;IAQV,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAsBrB,OAAO;CAUrB"}
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import 'dotenv/config';
|
|
5
5
|
import availableTools from './tools/index.js';
|
|
6
|
-
import {
|
|
6
|
+
import { schemaConverter } from './utils/schema.js';
|
|
7
7
|
export class McpUtilityServer {
|
|
8
8
|
server;
|
|
9
9
|
transport;
|
|
@@ -12,12 +12,12 @@ export class McpUtilityServer {
|
|
|
12
12
|
this.server = new McpServer({
|
|
13
13
|
name: '@nekzus/mcp-server',
|
|
14
14
|
version: '1.0.0',
|
|
15
|
-
description: 'MCP Server implementation providing utility functions and tools for development and testing'
|
|
15
|
+
description: 'MCP Server implementation providing utility functions and tools for development and testing',
|
|
16
16
|
}, {
|
|
17
17
|
capabilities: {
|
|
18
18
|
resources: {},
|
|
19
|
-
tools: {}
|
|
20
|
-
}
|
|
19
|
+
tools: {},
|
|
20
|
+
},
|
|
21
21
|
});
|
|
22
22
|
this.transport = new StdioServerTransport();
|
|
23
23
|
this.tools = availableTools;
|
|
@@ -25,15 +25,17 @@ export class McpUtilityServer {
|
|
|
25
25
|
registerTool(tool) {
|
|
26
26
|
try {
|
|
27
27
|
console.log(`[Tool Registration] Registering tool: ${tool.name}`);
|
|
28
|
-
const zodSchema =
|
|
28
|
+
const zodSchema = schemaConverter.toZod(tool.inputSchema);
|
|
29
29
|
const handler = tool.handler;
|
|
30
30
|
this.server.tool(tool.name, tool.description || '', zodSchema.shape, async (args, extra) => {
|
|
31
31
|
const result = await handler(args, extra);
|
|
32
32
|
return {
|
|
33
|
-
content: [
|
|
33
|
+
content: [
|
|
34
|
+
{
|
|
34
35
|
type: 'text',
|
|
35
|
-
text: JSON.stringify(result)
|
|
36
|
-
}
|
|
36
|
+
text: JSON.stringify(result),
|
|
37
|
+
},
|
|
38
|
+
],
|
|
37
39
|
};
|
|
38
40
|
});
|
|
39
41
|
console.log(`[Tool Registration] Successfully registered: ${tool.name}`);
|
|
@@ -55,7 +57,7 @@ export class McpUtilityServer {
|
|
|
55
57
|
this.initializeTools();
|
|
56
58
|
await this.server.connect(this.transport);
|
|
57
59
|
console.log('[Server] MCP Utility Server is running');
|
|
58
|
-
console.log('[Server] Available tools:', this.tools.map(t => t.name).join(', '));
|
|
60
|
+
console.log('[Server] Available tools:', this.tools.map((t) => t.name).join(', '));
|
|
59
61
|
// Handle termination signals
|
|
60
62
|
process.on('SIGTERM', () => this.cleanup());
|
|
61
63
|
process.on('SIGINT', () => this.cleanup());
|
package/dist/index.js.map
CHANGED
|
@@ -1 +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;AAEjF,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,
|
|
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;AAEjF,OAAO,eAAe,CAAC;AACvB,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAmB,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAOrE,MAAM,OAAO,gBAAgB;IACX,MAAM,CAAY;IAClB,SAAS,CAAuB;IAChC,KAAK,CAAkB;IAExC;QACC,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAC1B;YACC,IAAI,EAAE,oBAAoB;YAC1B,OAAO,EAAE,OAAO;YAChB,WAAW,EACV,6FAA6F;SAC9F,EACD;YACC,YAAY,EAAE;gBACb,SAAS,EAAE,EAAE;gBACb,KAAK,EAAE,EAAE;aACT;SACD,CACD,CAAC;QAEF,IAAI,CAAC,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;QAC5C,IAAI,CAAC,KAAK,GAAG,cAAc,CAAC;IA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IAAI,CAAC,CAAC,CAAC,CAAC;QACjB,CAAC;IACF,CAAC;CACD;AAED,+CAA+C;AAC/C,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC;IACvD,MAAM,MAAM,GAAG,IAAI,gBAAgB,EAAE,CAAC;IACtC,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;QAC9B,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC,CAAC;QAC9C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACjB,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,IAAI,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAe,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAQ5E,eAAO,MAAM,YAAY,EAAE,IAmC1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,IAkCtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,IA0C1B,CAAC;AAGF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAkD,CAAC;AACvE,eAAe,cAAc,CAAC"}
|
package/dist/tools/index.js
CHANGED
|
@@ -6,9 +6,9 @@ export const greetingTool = {
|
|
|
6
6
|
inputSchema: {
|
|
7
7
|
type: 'object',
|
|
8
8
|
properties: {
|
|
9
|
-
name: { type: 'string', description: 'Name of the recipient for the greeting' }
|
|
9
|
+
name: { type: 'string', description: 'Name of the recipient for the greeting' },
|
|
10
10
|
},
|
|
11
|
-
required: ['name']
|
|
11
|
+
required: ['name'],
|
|
12
12
|
},
|
|
13
13
|
handler: async (args, _extra) => {
|
|
14
14
|
try {
|
|
@@ -16,9 +16,9 @@ export const greetingTool = {
|
|
|
16
16
|
content: [
|
|
17
17
|
{
|
|
18
18
|
type: 'text',
|
|
19
|
-
text: `👋 Hello ${args.name}! Welcome to the MCP server
|
|
20
|
-
}
|
|
21
|
-
]
|
|
19
|
+
text: `👋 Hello ${args.name}! Welcome to the MCP server!`,
|
|
20
|
+
},
|
|
21
|
+
],
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
catch (err) {
|
|
@@ -26,13 +26,13 @@ export const greetingTool = {
|
|
|
26
26
|
content: [
|
|
27
27
|
{
|
|
28
28
|
type: 'text',
|
|
29
|
-
text: `Error generating greeting for ${args.name}
|
|
30
|
-
}
|
|
29
|
+
text: `Error generating greeting for ${args.name}`,
|
|
30
|
+
},
|
|
31
31
|
],
|
|
32
|
-
isError: true
|
|
32
|
+
isError: true,
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
}
|
|
35
|
+
},
|
|
36
36
|
};
|
|
37
37
|
export const cardTool = {
|
|
38
38
|
name: 'card',
|
|
@@ -40,7 +40,7 @@ export const cardTool = {
|
|
|
40
40
|
inputSchema: {
|
|
41
41
|
type: 'object',
|
|
42
42
|
properties: {},
|
|
43
|
-
required: []
|
|
43
|
+
required: [],
|
|
44
44
|
},
|
|
45
45
|
handler: async (_args, _extra) => {
|
|
46
46
|
try {
|
|
@@ -49,9 +49,9 @@ export const cardTool = {
|
|
|
49
49
|
content: [
|
|
50
50
|
{
|
|
51
51
|
type: 'text',
|
|
52
|
-
text: `🎴 You drew: ${card.value} of ${card.suit}
|
|
53
|
-
}
|
|
54
|
-
]
|
|
52
|
+
text: `🎴 You drew: ${card.value} of ${card.suit}`,
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
catch (err) {
|
|
@@ -59,13 +59,13 @@ export const cardTool = {
|
|
|
59
59
|
content: [
|
|
60
60
|
{
|
|
61
61
|
type: 'text',
|
|
62
|
-
text: 'Error drawing card from deck'
|
|
63
|
-
}
|
|
62
|
+
text: 'Error drawing card from deck',
|
|
63
|
+
},
|
|
64
64
|
],
|
|
65
|
-
isError: true
|
|
65
|
+
isError: true,
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
},
|
|
69
69
|
};
|
|
70
70
|
export const dateTimeTool = {
|
|
71
71
|
name: 'datetime',
|
|
@@ -75,13 +75,13 @@ export const dateTimeTool = {
|
|
|
75
75
|
properties: {
|
|
76
76
|
timeZone: {
|
|
77
77
|
type: 'string',
|
|
78
|
-
description: 'Timezone identifier (e.g., America/New_York, Europe/London, Asia/Tokyo)'
|
|
78
|
+
description: 'Timezone identifier (e.g., America/New_York, Europe/London, Asia/Tokyo)',
|
|
79
79
|
},
|
|
80
80
|
locale: {
|
|
81
81
|
type: 'string',
|
|
82
|
-
description: 'Locale identifier (e.g., en-US, es-ES, fr-FR)'
|
|
83
|
-
}
|
|
84
|
-
}
|
|
82
|
+
description: 'Locale identifier (e.g., en-US, es-ES, fr-FR)',
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
85
|
},
|
|
86
86
|
handler: async (args, _extra) => {
|
|
87
87
|
try {
|
|
@@ -90,9 +90,9 @@ export const dateTimeTool = {
|
|
|
90
90
|
content: [
|
|
91
91
|
{
|
|
92
92
|
type: 'text',
|
|
93
|
-
text: `🗓️ Date: ${date}\n⏰ Time: ${time}\n🌍 Timezone: ${timeZone}
|
|
94
|
-
}
|
|
95
|
-
]
|
|
93
|
+
text: `🗓️ Date: ${date}\n⏰ Time: ${time}\n🌍 Timezone: ${timeZone}`,
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
|
@@ -100,13 +100,13 @@ export const dateTimeTool = {
|
|
|
100
100
|
content: [
|
|
101
101
|
{
|
|
102
102
|
type: 'text',
|
|
103
|
-
text: 'Error retrieving date and time information'
|
|
104
|
-
}
|
|
103
|
+
text: 'Error retrieving date and time information',
|
|
104
|
+
},
|
|
105
105
|
],
|
|
106
|
-
isError: true
|
|
106
|
+
isError: true,
|
|
107
107
|
};
|
|
108
108
|
}
|
|
109
|
-
}
|
|
109
|
+
},
|
|
110
110
|
};
|
|
111
111
|
// Export all available tools
|
|
112
112
|
const availableTools = [greetingTool, cardTool, dateTimeTool];
|
package/dist/tools/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAS;IACjC,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,mEAAmE;IAChF,WAAW,EAAE;QACZ,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACX,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,wCAAwC,EAAE;SAC/E;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACJ;IACf,OAAO,EAAE,KAAK,EACb,IAAsB,EACtB,MAA2B,EACA,EAAE;QAC7B,IAAI,CAAC;YACJ,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,YAAY,IAAI,CAAC,IAAI,8BAA8B;qBACzD;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE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EACA,EAAE;QAC7B,IAAI,CAAC;YACJ,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC1D,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,aAAa,IAAI,aAAa,IAAI,kBAAkB,QAAQ,EAAE;qBACpE;iBACD;aACD,CAAC;QACH,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACd,OAAO;gBACN,OAAO,EAAE;oBACR;wBACC,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,4CAA4C;qBAClD;iBACD;gBACD,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;IACF,CAAC;CACD,CAAC;AAEF,6BAA6B;AAC7B,MAAM,cAAc,GAAG,CAAC,YAAY,EAAE,QAAQ,EAAE,YAAY,CAAU,CAAC;AACvE,eAAe,cAAc,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,IAAI;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,cAAc,CAAC,CAAC;IAChC,OAAO,EAAE,KAAK,CAAC;QACd,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,CAAC,CAAC;KACT,CAAC,CAAC;CACH;AAED,MAAM,MAAM,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,GAAG,UAAU,CAAC;AAC1E,MAAM,MAAM,KAAK,GAAG,KAAK,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC"}
|
package/dist/utils/cards.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/utils/cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../../src/utils/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3D,eAAO,MAAM,KAAK,EAAE,IAAI,EAA0D,CAAC;AACnF,eAAO,MAAM,MAAM,EAAE,KAAK,EAAyE,CAAC;AAEpG,wBAAgB,aAAa,IAAI,IAAI,CAQpC"}
|
package/dist/utils/cards.js
CHANGED
package/dist/utils/cards.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/utils/cards.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAW,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,MAAM,GAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEpG,MAAM,UAAU,aAAa;
|
|
1
|
+
{"version":3,"file":"cards.js","sourceRoot":"","sources":["../../src/utils/cards.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAW,CAAC,WAAW,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;AACnF,MAAM,CAAC,MAAM,MAAM,GAAY,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAEpG,MAAM,UAAU,aAAa;IAC5B,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACnE,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;IAEtE,OAAO;QACN,IAAI,EAAE,UAAU;QAChB,KAAK,EAAE,WAAW;KAClB,CAAC;AACH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/utils/datetime.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;
|
|
1
|
+
{"version":3,"file":"datetime.d.ts","sourceRoot":"","sources":["../../src/utils/datetime.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,cAAc;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,wBAAgB,kBAAkB,CAAC,OAAO,GAAE,eAAoB,GAAG,cAAc,CAyBhF"}
|
package/dist/utils/datetime.js
CHANGED
|
@@ -5,19 +5,19 @@ export function getCurrentDateTime(options = {}) {
|
|
|
5
5
|
timeZone,
|
|
6
6
|
year: 'numeric',
|
|
7
7
|
month: 'long',
|
|
8
|
-
day: 'numeric'
|
|
8
|
+
day: 'numeric',
|
|
9
9
|
});
|
|
10
10
|
const timeFormatter = new Intl.DateTimeFormat(locale, {
|
|
11
11
|
timeZone,
|
|
12
12
|
hour: '2-digit',
|
|
13
13
|
minute: '2-digit',
|
|
14
14
|
second: '2-digit',
|
|
15
|
-
hour12: true
|
|
15
|
+
hour12: true,
|
|
16
16
|
});
|
|
17
17
|
return {
|
|
18
18
|
date: dateFormatter.format(now),
|
|
19
19
|
time: timeFormatter.format(now),
|
|
20
|
-
timeZone
|
|
20
|
+
timeZone,
|
|
21
21
|
};
|
|
22
22
|
}
|
|
23
23
|
//# sourceMappingURL=datetime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../src/utils/datetime.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,kBAAkB,CAAC,UAA2B,EAAE;
|
|
1
|
+
{"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../src/utils/datetime.ts"],"names":[],"mappings":"AAWA,MAAM,UAAU,kBAAkB,CAAC,UAA2B,EAAE;IAC/D,MAAM,EAAE,QAAQ,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC,eAAe,EAAE,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,OAAO,CAAC;IAElG,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;IAEvB,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;QACrD,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,MAAM;QACb,GAAG,EAAE,SAAS;KACd,CAAC,CAAC;IAEH,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE;QACrD,QAAQ;QACR,IAAI,EAAE,SAAS;QACf,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,IAAI;KACZ,CAAC,CAAC;IAEH,OAAO;QACN,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC;QAC/B,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,CAAC;QAC/B,QAAQ;KACR,CAAC;AACH,CAAC"}
|
package/dist/utils/schema.d.ts
CHANGED
|
@@ -10,8 +10,7 @@ export interface JsonSchema {
|
|
|
10
10
|
required?: string[];
|
|
11
11
|
[key: string]: unknown;
|
|
12
12
|
}
|
|
13
|
-
export declare
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
13
|
+
export declare const schemaConverter: {
|
|
14
|
+
toZod: (schema: JsonSchema) => z.ZodObject<Record<string, z.ZodType>>;
|
|
15
|
+
};
|
|
17
16
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,kBAAkB;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,kBAAkB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACvB;AAeD,eAAO,MAAM,eAAe;oBACX,UAAU,KAAG,CAAC,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC;CAgBnE,CAAC"}
|
package/dist/utils/schema.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
return z.any();
|
|
13
|
-
}
|
|
2
|
+
const convertProperty = (prop) => {
|
|
3
|
+
switch (prop.type) {
|
|
4
|
+
case 'string':
|
|
5
|
+
return prop.description ? z.string().describe(prop.description) : z.string();
|
|
6
|
+
case 'number':
|
|
7
|
+
return z.number();
|
|
8
|
+
case 'boolean':
|
|
9
|
+
return z.boolean();
|
|
10
|
+
default:
|
|
11
|
+
return z.unknown();
|
|
14
12
|
}
|
|
15
|
-
|
|
13
|
+
};
|
|
14
|
+
export const schemaConverter = {
|
|
15
|
+
toZod: (schema) => {
|
|
16
16
|
if (schema.type !== 'object') {
|
|
17
17
|
throw new Error('Only object schemas are supported');
|
|
18
18
|
}
|
|
19
19
|
const shape = {};
|
|
20
20
|
if (schema.properties) {
|
|
21
|
-
Object.entries(schema.properties)
|
|
22
|
-
shape[key] =
|
|
23
|
-
}
|
|
21
|
+
for (const [key, prop] of Object.entries(schema.properties)) {
|
|
22
|
+
shape[key] = convertProperty(prop);
|
|
23
|
+
}
|
|
24
24
|
}
|
|
25
25
|
const zodSchema = z.object(shape);
|
|
26
26
|
return schema.required?.length ? zodSchema.required() : zodSchema;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
29
|
//# sourceMappingURL=schema.js.map
|
package/dist/utils/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/utils/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAexB,MAAM,
|
|
1
|
+
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AC,CAAC,SAAS,CAAC;IACnE,CAAC;CACD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nekzus/mcp-server",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "Personal MCP Server implementation providing extensible utility functions and tools for development and testing purposes",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
8
8
|
"bin": {
|
|
9
|
-
"mcp-server": "dist/index.js"
|
|
9
|
+
"@nekzus/mcp-server": "./dist/index.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"dist",
|
|
@@ -18,15 +18,13 @@
|
|
|
18
18
|
"dev": "tsx src/index.ts",
|
|
19
19
|
"start": "node dist/index.js",
|
|
20
20
|
"test": "jest --passWithNoTests",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
21
|
+
"format": "biome format --write ./src",
|
|
22
|
+
"lint": "biome lint --write ./src",
|
|
23
|
+
"check": "biome check --apply ./src",
|
|
23
24
|
"commit": "git-cz",
|
|
24
25
|
"semantic-release": "semantic-release --branches main",
|
|
25
26
|
"prepare": "npm run build",
|
|
26
|
-
"
|
|
27
|
-
"preversion": "npm run lint",
|
|
28
|
-
"version": "npm run format && git add -A src",
|
|
29
|
-
"postversion": "git push && git push --tags"
|
|
27
|
+
"ci": "npm run check && npm run build && npm test"
|
|
30
28
|
},
|
|
31
29
|
"keywords": [
|
|
32
30
|
"mcp",
|
|
@@ -62,15 +60,17 @@
|
|
|
62
60
|
"zod": "3.24.2"
|
|
63
61
|
},
|
|
64
62
|
"devDependencies": {
|
|
65
|
-
"
|
|
66
|
-
"
|
|
63
|
+
"@biomejs/biome": "1.9.4",
|
|
64
|
+
"@semantic-release/changelog": "6.0.3",
|
|
65
|
+
"@semantic-release/git": "10.0.1",
|
|
66
|
+
"@semantic-release/github": "11.0.1",
|
|
67
|
+
"@semantic-release/npm": "12.0.1",
|
|
68
|
+
"@semantic-release/release-notes-generator": "14.0.3",
|
|
67
69
|
"@types/jest": "29.5.14",
|
|
68
70
|
"@types/node": "22.13.10",
|
|
69
|
-
"
|
|
70
|
-
"@typescript-eslint/parser": "8.27.0",
|
|
71
|
-
"eslint": "9.22.0",
|
|
71
|
+
"cz-conventional-changelog": "3.3.0",
|
|
72
72
|
"jest": "^29.7.0",
|
|
73
|
-
"
|
|
73
|
+
"semantic-release": "24.2.3",
|
|
74
74
|
"ts-jest": "29.2.6",
|
|
75
75
|
"tsx": "4.19.3",
|
|
76
76
|
"typescript": "5.8.2"
|
|
@@ -86,4 +86,4 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
}
|
|
89
|
-
}
|
|
89
|
+
}
|