@nekzus/mcp-server 1.0.31 → 1.0.33

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -15
  2. package/package.json +6 -10
package/dist/index.js CHANGED
@@ -2,7 +2,6 @@
2
2
  import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
3
  import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
4
  import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
5
- import 'dotenv/config';
6
5
  const TOOLS = [
7
6
  {
8
7
  name: 'greeting',
@@ -121,7 +120,7 @@ async function handleToolCall(name, args) {
121
120
  content: [
122
121
  {
123
122
  type: 'text',
124
- text: `Error: Unknown tool '${name}'`,
123
+ text: `Unknown tool: ${name}`,
125
124
  },
126
125
  ],
127
126
  isError: true,
@@ -129,7 +128,7 @@ async function handleToolCall(name, args) {
129
128
  }
130
129
  }
131
130
  const server = new Server({
132
- name: '@nekzus/mcp-server',
131
+ name: '@nekzus/server-nekzus',
133
132
  version: '0.1.0',
134
133
  description: 'MCP Server implementation for development',
135
134
  }, {
@@ -137,23 +136,16 @@ const server = new Server({
137
136
  tools: {},
138
137
  },
139
138
  });
140
- server.setRequestHandler(ListToolsRequestSchema, async () => {
141
- return {
142
- tools: TOOLS,
143
- };
144
- });
145
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
146
- const { name, arguments: args } = request.params;
147
- return handleToolCall(name, args ?? {});
148
- });
139
+ server.setRequestHandler(ListToolsRequestSchema, async () => ({
140
+ tools: TOOLS,
141
+ }));
142
+ server.setRequestHandler(CallToolRequestSchema, async (request) => handleToolCall(request.params.name, request.params.arguments ?? {}));
149
143
  async function runServer() {
150
144
  try {
151
145
  const transport = new StdioServerTransport();
152
146
  await server.connect(transport);
153
147
  console.log('[Server] MCP Server is running');
154
148
  console.log('[Server] Available tools:', TOOLS.map((t) => t.name).join(', '));
155
- process.on('SIGTERM', () => cleanup());
156
- process.on('SIGINT', () => cleanup());
157
149
  process.stdin.on('close', () => {
158
150
  console.log('[Server] Input stream closed');
159
151
  cleanup();
@@ -175,4 +167,4 @@ async function cleanup() {
175
167
  process.exit(1);
176
168
  }
177
169
  }
178
- runServer();
170
+ runServer().catch(console.error);
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@nekzus/mcp-server",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
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
- "types": "./dist/index.d.ts",
8
- "bin": "./dist/index.js",
7
+ "bin": {
8
+ "mcp-server": "./dist/index.js"
9
+ },
9
10
  "files": [
10
11
  "dist",
11
12
  "README.md",
@@ -22,8 +23,7 @@
22
23
  "commit": "git-cz",
23
24
  "semantic-release": "semantic-release --branches main",
24
25
  "prepare": "npm run build",
25
- "watch": "tsc --watch",
26
- "ci": "npm run check && npm run build && npm test"
26
+ "watch": "tsc --watch"
27
27
  },
28
28
  "keywords": [
29
29
  "mcp",
@@ -45,8 +45,7 @@
45
45
  "homepage": "https://github.com/Nekzus/mcp-server#readme",
46
46
  "dependencies": {
47
47
  "@modelcontextprotocol/sdk": "1.7.0",
48
- "dotenv": "16.4.7",
49
- "zod": "3.24.2"
48
+ "dotenv": "16.4.7"
50
49
  },
51
50
  "devDependencies": {
52
51
  "@biomejs/biome": "1.9.4",
@@ -65,9 +64,6 @@
65
64
  "tsx": "4.19.3",
66
65
  "typescript": "5.8.2"
67
66
  },
68
- "engines": {
69
- "node": "^18.18.0 || ^20.9.0 || >=21.1.0"
70
- },
71
67
  "config": {
72
68
  "commitizen": {
73
69
  "path": "./node_modules/cz-conventional-changelog"