@aashari/boilerplate-mcp-server 1.11.1 → 1.11.3
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 +15 -0
- package/dist/index.js +4 -4
- package/dist/services/vendor.ip-api.com.service.js +1 -1
- package/dist/services/vendor.ip-api.com.types.d.ts +1 -43
- package/dist/tools/ipaddress.tool.js +5 -2
- package/dist/tools/ipaddress.types.d.ts +1 -7
- package/dist/utils/constants.util.d.ts +1 -1
- package/dist/utils/constants.util.js +1 -1
- package/package.json +21 -21
- package/package.json.bak +21 -21
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.11.3](https://github.com/aashari/boilerplate-mcp-server/compare/v1.11.2...v1.11.3) (2025-08-02)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* resolve TypeScript compilation errors and improve compatibility ([873c3f6](https://github.com/aashari/boilerplate-mcp-server/commit/873c3f63c4ec384ffa13adf94b54f6b6bb4fdbdc))
|
|
7
|
+
* resolve TypeScript/ESLint version conflict and linting issues ([fa0486a](https://github.com/aashari/boilerplate-mcp-server/commit/fa0486adb67fa449fa038937fb56521f877d4ad4))
|
|
8
|
+
|
|
9
|
+
## [1.11.2](https://github.com/aashari/boilerplate-mcp-server/compare/v1.11.1...v1.11.2) (2025-06-22)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* change default transport from HTTP to STDIO for proper MCP client integration ([05027b8](https://github.com/aashari/boilerplate-mcp-server/commit/05027b8320ea52926527b030a085fc2f754149eb))
|
|
15
|
+
|
|
1
16
|
## [1.11.1](https://github.com/aashari/boilerplate-mcp-server/compare/v1.11.0...v1.11.1) (2025-06-22)
|
|
2
17
|
|
|
3
18
|
|
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ let transportInstance = null;
|
|
|
23
23
|
/**
|
|
24
24
|
* Start the MCP server with the specified transport mode
|
|
25
25
|
*/
|
|
26
|
-
async function startServer(mode = '
|
|
26
|
+
async function startServer(mode = 'stdio') {
|
|
27
27
|
const serverLogger = logger_util_js_1.Logger.forContext('index.ts', 'startServer');
|
|
28
28
|
// Load configuration
|
|
29
29
|
serverLogger.info('Starting MCP server initialization...');
|
|
@@ -114,7 +114,7 @@ async function main() {
|
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
116
|
// Server mode - determine transport
|
|
117
|
-
const transportMode = (process.env.TRANSPORT_MODE || '
|
|
117
|
+
const transportMode = (process.env.TRANSPORT_MODE || 'stdio').toLowerCase();
|
|
118
118
|
let mode;
|
|
119
119
|
if (transportMode === 'stdio') {
|
|
120
120
|
mode = 'stdio';
|
|
@@ -123,8 +123,8 @@ async function main() {
|
|
|
123
123
|
mode = 'http';
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
mainLogger.warn(`Unknown TRANSPORT_MODE "${transportMode}", defaulting to
|
|
127
|
-
mode = '
|
|
126
|
+
mainLogger.warn(`Unknown TRANSPORT_MODE "${transportMode}", defaulting to stdio`);
|
|
127
|
+
mode = 'stdio';
|
|
128
128
|
}
|
|
129
129
|
mainLogger.info(`Starting server with ${mode.toUpperCase()} transport`);
|
|
130
130
|
await startServer(mode);
|
|
@@ -69,7 +69,7 @@ async function get(ipAddress, options = {}) {
|
|
|
69
69
|
methodLogger.error(`Service error fetching IP data`, error);
|
|
70
70
|
// Handle Zod validation errors
|
|
71
71
|
if (error instanceof zod_1.z.ZodError) {
|
|
72
|
-
throw (0, error_util_js_1.createApiError)(`API response validation failed: ${error.
|
|
72
|
+
throw (0, error_util_js_1.createApiError)(`API response validation failed: ${error.issues
|
|
73
73
|
.map((e) => `${e.path.join('.')}: ${e.message}`)
|
|
74
74
|
.join(', ')}`, 500, // Use 500 for validation errors as it's a server-side issue
|
|
75
75
|
error);
|
|
@@ -24,49 +24,7 @@ export declare const IPDetailSchema: z.ZodObject<{
|
|
|
24
24
|
mobile: z.ZodOptional<z.ZodBoolean>;
|
|
25
25
|
proxy: z.ZodOptional<z.ZodBoolean>;
|
|
26
26
|
hosting: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
-
},
|
|
28
|
-
status: string;
|
|
29
|
-
message?: string | undefined;
|
|
30
|
-
query?: string | undefined;
|
|
31
|
-
country?: string | undefined;
|
|
32
|
-
countryCode?: string | undefined;
|
|
33
|
-
region?: string | undefined;
|
|
34
|
-
regionName?: string | undefined;
|
|
35
|
-
city?: string | undefined;
|
|
36
|
-
zip?: string | undefined;
|
|
37
|
-
lat?: number | undefined;
|
|
38
|
-
lon?: number | undefined;
|
|
39
|
-
timezone?: string | undefined;
|
|
40
|
-
isp?: string | undefined;
|
|
41
|
-
org?: string | undefined;
|
|
42
|
-
as?: string | undefined;
|
|
43
|
-
asname?: string | undefined;
|
|
44
|
-
reverse?: string | undefined;
|
|
45
|
-
mobile?: boolean | undefined;
|
|
46
|
-
proxy?: boolean | undefined;
|
|
47
|
-
hosting?: boolean | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
status: string;
|
|
50
|
-
message?: string | undefined;
|
|
51
|
-
query?: string | undefined;
|
|
52
|
-
country?: string | undefined;
|
|
53
|
-
countryCode?: string | undefined;
|
|
54
|
-
region?: string | undefined;
|
|
55
|
-
regionName?: string | undefined;
|
|
56
|
-
city?: string | undefined;
|
|
57
|
-
zip?: string | undefined;
|
|
58
|
-
lat?: number | undefined;
|
|
59
|
-
lon?: number | undefined;
|
|
60
|
-
timezone?: string | undefined;
|
|
61
|
-
isp?: string | undefined;
|
|
62
|
-
org?: string | undefined;
|
|
63
|
-
as?: string | undefined;
|
|
64
|
-
asname?: string | undefined;
|
|
65
|
-
reverse?: string | undefined;
|
|
66
|
-
mobile?: boolean | undefined;
|
|
67
|
-
proxy?: boolean | undefined;
|
|
68
|
-
hosting?: boolean | undefined;
|
|
69
|
-
}>;
|
|
27
|
+
}, z.core.$strip>;
|
|
70
28
|
/**
|
|
71
29
|
* TypeScript type inferred from the IPDetailSchema.
|
|
72
30
|
* Represents the expected structure of a successful ip-api.com response.
|
|
@@ -19,6 +19,10 @@ const GetIpDetailsToolSchema = zod_1.z.object({
|
|
|
19
19
|
.describe('IP address to lookup (omit for current IP)'),
|
|
20
20
|
...ipaddress_types_js_1.IpAddressToolArgs.shape, // Merge options schema
|
|
21
21
|
});
|
|
22
|
+
/**
|
|
23
|
+
* TypeScript type inferred from the combined tool arguments schema.
|
|
24
|
+
*/
|
|
25
|
+
// type GetIpDetailsToolArgsType = z.infer<typeof GetIpDetailsToolSchema>;
|
|
22
26
|
/**
|
|
23
27
|
* @function handleGetIpDetails
|
|
24
28
|
* @description MCP Tool handler to retrieve details for a given IP address (or the current IP).
|
|
@@ -59,8 +63,7 @@ async function handleGetIpDetails(args) {
|
|
|
59
63
|
function registerTools(server) {
|
|
60
64
|
const methodLogger = logger_util_js_1.Logger.forContext('tools/ipaddress.tool.ts', 'registerTools');
|
|
61
65
|
methodLogger.debug(`Registering IP address tools...`);
|
|
62
|
-
server.tool('ip_get_details', `Retrieves detailed geolocation and network information for a public IP address (\`ipAddress\`). If no IP is provided, automatically uses the server's current public IP. Returns comprehensive location data including country, region, city, coordinates, timezone, and network details like ISP and organization. Use \`includeExtendedData\` to get additional information such as ASN, mobile/proxy detection (requires API token). **Note:** Cannot lookup private IPs (e.g., 192.168.x.x, 10.x.x.x). Powered by ip-api.com. Enable \`useHttps\` for secure connections (required for paid tier).`, GetIpDetailsToolSchema.shape,
|
|
63
|
-
handleGetIpDetails);
|
|
66
|
+
server.tool('ip_get_details', `Retrieves detailed geolocation and network information for a public IP address (\`ipAddress\`). If no IP is provided, automatically uses the server's current public IP. Returns comprehensive location data including country, region, city, coordinates, timezone, and network details like ISP and organization. Use \`includeExtendedData\` to get additional information such as ASN, mobile/proxy detection (requires API token). **Note:** Cannot lookup private IPs (e.g., 192.168.x.x, 10.x.x.x). Powered by ip-api.com. Enable \`useHttps\` for secure connections (required for paid tier).`, GetIpDetailsToolSchema.shape, handleGetIpDetails);
|
|
64
67
|
methodLogger.debug('Successfully registered ip_get_details tool.');
|
|
65
68
|
}
|
|
66
69
|
exports.default = { registerTools };
|
|
@@ -5,13 +5,7 @@ import { z } from 'zod';
|
|
|
5
5
|
export declare const IpAddressToolArgs: z.ZodObject<{
|
|
6
6
|
includeExtendedData: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
7
7
|
useHttps: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
8
|
-
},
|
|
9
|
-
useHttps: boolean;
|
|
10
|
-
includeExtendedData: boolean;
|
|
11
|
-
}, {
|
|
12
|
-
useHttps?: boolean | undefined;
|
|
13
|
-
includeExtendedData?: boolean | undefined;
|
|
14
|
-
}>;
|
|
8
|
+
}, z.core.$strict>;
|
|
15
9
|
/**
|
|
16
10
|
* TypeScript type inferred from the IpAddressToolArgs Zod schema.
|
|
17
11
|
* This represents the optional arguments passed to the tool handler and controller.
|
|
@@ -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.11.
|
|
14
|
+
exports.VERSION = '1.11.3';
|
|
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.11.
|
|
3
|
+
"version": "1.11.3",
|
|
4
4
|
"description": "TypeScript MCP server boilerplate with STDIO and HTTP transport support, CLI tools, and extensible architecture",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"update:deps": "npx npm-check-updates -u && npm install --legacy-peer-deps",
|
|
24
24
|
"format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
|
|
25
25
|
"cli": "npm run build && node dist/index.js",
|
|
26
|
-
"mcp:stdio": "
|
|
27
|
-
"mcp:http": "
|
|
28
|
-
"mcp:inspect": "
|
|
26
|
+
"mcp:stdio": "npm run build && TRANSPORT_MODE=stdio node dist/index.js",
|
|
27
|
+
"mcp:http": "npm run build && TRANSPORT_MODE=http node dist/index.js",
|
|
28
|
+
"mcp:inspect": "npm run build && (TRANSPORT_MODE=http node dist/index.js &) && sleep 2 && npx @modelcontextprotocol/inspector http://localhost:3000/mcp",
|
|
29
29
|
"dev:stdio": "npm run build && npx @modelcontextprotocol/inspector -e TRANSPORT_MODE=stdio -e DEBUG=true node dist/index.js",
|
|
30
|
-
"dev:http": "DEBUG=true TRANSPORT_MODE=http
|
|
30
|
+
"dev:http": "npm run build && DEBUG=true TRANSPORT_MODE=http node dist/index.js"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"mcp",
|
|
@@ -51,35 +51,35 @@
|
|
|
51
51
|
"node": ">=18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^9.
|
|
54
|
+
"@eslint/js": "^9.32.0",
|
|
55
55
|
"@semantic-release/changelog": "^6.0.3",
|
|
56
56
|
"@semantic-release/exec": "^7.1.0",
|
|
57
57
|
"@semantic-release/git": "^10.0.1",
|
|
58
58
|
"@semantic-release/github": "^11.0.3",
|
|
59
|
-
"@semantic-release/npm": "^12.0.
|
|
59
|
+
"@semantic-release/npm": "^12.0.2",
|
|
60
60
|
"@types/cors": "^2.8.19",
|
|
61
61
|
"@types/express": "^5.0.3",
|
|
62
62
|
"@types/jest": "^30.0.0",
|
|
63
|
-
"@types/node": "^24.0
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
65
|
-
"@typescript-eslint/parser": "^8.
|
|
66
|
-
"eslint": "^9.
|
|
67
|
-
"eslint-config-prettier": "^10.1.
|
|
68
|
-
"eslint-plugin-prettier": "^5.5.
|
|
69
|
-
"jest": "^30.0.
|
|
70
|
-
"prettier": "^3.
|
|
71
|
-
"semantic-release": "^24.2.
|
|
63
|
+
"@types/node": "^24.1.0",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
66
|
+
"eslint": "^9.32.0",
|
|
67
|
+
"eslint-config-prettier": "^10.1.8",
|
|
68
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
69
|
+
"jest": "^30.0.5",
|
|
70
|
+
"prettier": "^3.6.2",
|
|
71
|
+
"semantic-release": "^24.2.7",
|
|
72
72
|
"ts-jest": "^29.4.0",
|
|
73
|
-
"typescript": "
|
|
74
|
-
"typescript-eslint": "^8.
|
|
73
|
+
"typescript": "5.8.3",
|
|
74
|
+
"typescript-eslint": "^8.38.0"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
77
|
+
"@modelcontextprotocol/sdk": "^1.17.1",
|
|
78
78
|
"commander": "^14.0.0",
|
|
79
79
|
"cors": "^2.8.5",
|
|
80
|
-
"dotenv": "^
|
|
80
|
+
"dotenv": "^17.2.1",
|
|
81
81
|
"express": "^5.1.0",
|
|
82
|
-
"zod": "^
|
|
82
|
+
"zod": "^4.0.14"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"registry": "https://registry.npmjs.org/",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aashari/boilerplate-mcp-server",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "TypeScript MCP server boilerplate with STDIO and HTTP transport support, CLI tools, and extensible architecture",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,11 +23,11 @@
|
|
|
23
23
|
"update:deps": "npx npm-check-updates -u && npm install --legacy-peer-deps",
|
|
24
24
|
"format": "prettier --write 'src/**/*.ts' 'scripts/**/*.js'",
|
|
25
25
|
"cli": "npm run build && node dist/index.js",
|
|
26
|
-
"mcp:stdio": "
|
|
27
|
-
"mcp:http": "
|
|
28
|
-
"mcp:inspect": "
|
|
26
|
+
"mcp:stdio": "npm run build && TRANSPORT_MODE=stdio node dist/index.js",
|
|
27
|
+
"mcp:http": "npm run build && TRANSPORT_MODE=http node dist/index.js",
|
|
28
|
+
"mcp:inspect": "npm run build && (TRANSPORT_MODE=http node dist/index.js &) && sleep 2 && npx @modelcontextprotocol/inspector http://localhost:3000/mcp",
|
|
29
29
|
"dev:stdio": "npm run build && npx @modelcontextprotocol/inspector -e TRANSPORT_MODE=stdio -e DEBUG=true node dist/index.js",
|
|
30
|
-
"dev:http": "DEBUG=true TRANSPORT_MODE=http
|
|
30
|
+
"dev:http": "npm run build && DEBUG=true TRANSPORT_MODE=http node dist/index.js"
|
|
31
31
|
},
|
|
32
32
|
"keywords": [
|
|
33
33
|
"mcp",
|
|
@@ -51,35 +51,35 @@
|
|
|
51
51
|
"node": ">=18.0.0"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^9.
|
|
54
|
+
"@eslint/js": "^9.32.0",
|
|
55
55
|
"@semantic-release/changelog": "^6.0.3",
|
|
56
56
|
"@semantic-release/exec": "^7.1.0",
|
|
57
57
|
"@semantic-release/git": "^10.0.1",
|
|
58
58
|
"@semantic-release/github": "^11.0.3",
|
|
59
|
-
"@semantic-release/npm": "^12.0.
|
|
59
|
+
"@semantic-release/npm": "^12.0.2",
|
|
60
60
|
"@types/cors": "^2.8.19",
|
|
61
61
|
"@types/express": "^5.0.3",
|
|
62
62
|
"@types/jest": "^30.0.0",
|
|
63
|
-
"@types/node": "^24.0
|
|
64
|
-
"@typescript-eslint/eslint-plugin": "^8.
|
|
65
|
-
"@typescript-eslint/parser": "^8.
|
|
66
|
-
"eslint": "^9.
|
|
67
|
-
"eslint-config-prettier": "^10.1.
|
|
68
|
-
"eslint-plugin-prettier": "^5.5.
|
|
69
|
-
"jest": "^30.0.
|
|
70
|
-
"prettier": "^3.
|
|
71
|
-
"semantic-release": "^24.2.
|
|
63
|
+
"@types/node": "^24.1.0",
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.38.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.38.0",
|
|
66
|
+
"eslint": "^9.32.0",
|
|
67
|
+
"eslint-config-prettier": "^10.1.8",
|
|
68
|
+
"eslint-plugin-prettier": "^5.5.3",
|
|
69
|
+
"jest": "^30.0.5",
|
|
70
|
+
"prettier": "^3.6.2",
|
|
71
|
+
"semantic-release": "^24.2.7",
|
|
72
72
|
"ts-jest": "^29.4.0",
|
|
73
|
-
"typescript": "
|
|
74
|
-
"typescript-eslint": "^8.
|
|
73
|
+
"typescript": "5.8.3",
|
|
74
|
+
"typescript-eslint": "^8.38.0"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
77
|
+
"@modelcontextprotocol/sdk": "^1.17.1",
|
|
78
78
|
"commander": "^14.0.0",
|
|
79
79
|
"cors": "^2.8.5",
|
|
80
|
-
"dotenv": "^
|
|
80
|
+
"dotenv": "^17.2.1",
|
|
81
81
|
"express": "^5.1.0",
|
|
82
|
-
"zod": "^
|
|
82
|
+
"zod": "^4.0.14"
|
|
83
83
|
},
|
|
84
84
|
"publishConfig": {
|
|
85
85
|
"registry": "https://registry.npmjs.org/",
|