@aashari/boilerplate-mcp-server 1.5.2 → 1.5.4
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/CHANGELOG.md +19 -0
- package/dist/index.js +29 -11
- package/dist/utils/constants.util.d.ts +1 -1
- package/dist/utils/constants.util.js +1 -1
- package/package.json +2 -2
- package/package.json.bak +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
## [1.5.4](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.3...v1.5.4) (2025-05-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* improve signal handling for npx support ([72634a8](https://github.com/aashari/boilerplate-mcp-server/commit/72634a85fea332e4551dd273d29df8217f24309d))
|
|
7
|
+
|
|
8
|
+
## [1.5.3](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.2...v1.5.3) (2025-05-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* standardize index.ts entrypoint logic and package bin ([7f9aaf0](https://github.com/aashari/boilerplate-mcp-server/commit/7f9aaf051cf3d4d92971892e21e32e23820be90b))
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Reverts
|
|
17
|
+
|
|
18
|
+
* Revert "fix(test): Skip invalid IP test assertion on CI due to rate limits" ([be8c766](https://github.com/aashari/boilerplate-mcp-server/commit/be8c766d738c82d8e228b14da70f2ae844ad49e6))
|
|
19
|
+
|
|
1
20
|
## [1.5.2](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.1...v1.5.2) (2025-05-05)
|
|
2
21
|
|
|
3
22
|
|
package/dist/index.js
CHANGED
|
@@ -93,6 +93,34 @@ async function main() {
|
|
|
93
93
|
mainLogger.debug(`DEBUG environment variable: ${process.env.DEBUG}`);
|
|
94
94
|
mainLogger.debug(`IPAPI_API_TOKEN value exists: ${Boolean(process.env.IPAPI_API_TOKEN)}`);
|
|
95
95
|
mainLogger.debug(`Config DEBUG value: ${config_util_js_1.config.get('DEBUG')}`);
|
|
96
|
+
// Track whether we're in server mode
|
|
97
|
+
let isServerMode = false;
|
|
98
|
+
// --- Start: Add Graceful Shutdown ---
|
|
99
|
+
const shutdown = async (signal) => {
|
|
100
|
+
mainLogger.info(`Received ${signal}. Shutting down gracefully...`);
|
|
101
|
+
// If we're in server mode and we have an active server instance,
|
|
102
|
+
// attempt to disconnect properly
|
|
103
|
+
if (isServerMode && serverInstance) {
|
|
104
|
+
try {
|
|
105
|
+
mainLogger.info('Disconnecting server instance...');
|
|
106
|
+
// Allow time for ongoing operations to complete
|
|
107
|
+
setTimeout(() => {
|
|
108
|
+
process.exit(0);
|
|
109
|
+
}, 500);
|
|
110
|
+
}
|
|
111
|
+
catch (err) {
|
|
112
|
+
mainLogger.error('Error during graceful shutdown', err);
|
|
113
|
+
process.exit(1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
else {
|
|
117
|
+
// Not in server mode, so safe to exit immediately
|
|
118
|
+
process.exit(0);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
process.on('SIGINT', () => shutdown('SIGINT')); // Ctrl+C
|
|
122
|
+
process.on('SIGTERM', () => shutdown('SIGTERM')); // kill command
|
|
123
|
+
// --- End: Add Graceful Shutdown ---
|
|
96
124
|
// Check if arguments are provided (CLI mode)
|
|
97
125
|
if (process.argv.length > 2) {
|
|
98
126
|
// CLI mode: Pass arguments to CLI runner
|
|
@@ -103,20 +131,10 @@ async function main() {
|
|
|
103
131
|
else {
|
|
104
132
|
// MCP Server mode: Start server with default STDIO
|
|
105
133
|
mainLogger.info('Starting in server mode');
|
|
134
|
+
isServerMode = true;
|
|
106
135
|
await startServer();
|
|
107
136
|
mainLogger.info('Server is now running');
|
|
108
137
|
}
|
|
109
|
-
// --- Start: Add Graceful Shutdown ---
|
|
110
|
-
const shutdown = async (signal) => {
|
|
111
|
-
mainLogger.info(`Received ${signal}. Shutting down gracefully...`);
|
|
112
|
-
// Add any specific cleanup logic here if needed in the future
|
|
113
|
-
// For now, just exiting cleanly is the main goal
|
|
114
|
-
// No need to explicitly call server disconnect if process exits
|
|
115
|
-
process.exit(0);
|
|
116
|
-
};
|
|
117
|
-
process.on('SIGINT', () => shutdown('SIGINT')); // Ctrl+C
|
|
118
|
-
process.on('SIGTERM', () => shutdown('SIGTERM')); // kill command
|
|
119
|
-
// --- End: Add Graceful Shutdown ---
|
|
120
138
|
}
|
|
121
139
|
// If this file is being executed directly (not imported), run the main function
|
|
122
140
|
// Use a check suitable for both CommonJS and ESM contexts
|
|
@@ -11,7 +11,7 @@ exports.CLI_NAME = exports.PACKAGE_NAME = exports.VERSION = void 0;
|
|
|
11
11
|
* Current application version
|
|
12
12
|
* This should match the version in package.json
|
|
13
13
|
*/
|
|
14
|
-
exports.VERSION = '1.5.
|
|
14
|
+
exports.VERSION = '1.5.4';
|
|
15
15
|
/**
|
|
16
16
|
* Package name with scope
|
|
17
17
|
* Used for initialization and identification
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aashari/boilerplate-mcp-server",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.4",
|
|
4
4
|
"description": "TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/aashari/boilerplate-mcp-server.git"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"mcp-
|
|
14
|
+
"mcp-boilerplate": "./dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rimraf dist && tsc",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aashari/boilerplate-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.3",
|
|
4
4
|
"description": "TypeScript Model Context Protocol (MCP) server boilerplate providing IP lookup tools/resources. Includes CLI support and extensible structure for connecting AI systems (LLMs) to external data sources like ip-api.com. Ideal template for creating new MCP integrations via Node.js.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"url": "https://github.com/aashari/boilerplate-mcp-server.git"
|
|
12
12
|
},
|
|
13
13
|
"bin": {
|
|
14
|
-
"mcp-
|
|
14
|
+
"mcp-boilerplate": "./dist/index.js"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "rimraf dist && tsc",
|