@aashari/boilerplate-mcp-server 1.6.0 → 1.8.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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [1.8.0](https://github.com/aashari/boilerplate-mcp-server/compare/v1.7.0...v1.8.0) (2025-05-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* refactor ControllerResponse to only include content field ([68118c7](https://github.com/aashari/boilerplate-mcp-server/commit/68118c75e4fcbe759140807a8d65e583e85b9535))
|
|
7
|
+
|
|
8
|
+
# [1.7.0](https://github.com/aashari/boilerplate-mcp-server/compare/v1.6.0...v1.7.0) (2025-05-17)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* improve ip_get_details tool description and CLI usability with short options ([895feeb](https://github.com/aashari/boilerplate-mcp-server/commit/895feeb7ef23252ba32023cde658feaa9fd382d8))
|
|
14
|
+
|
|
1
15
|
# [1.6.0](https://github.com/aashari/boilerplate-mcp-server/compare/v1.5.10...v1.6.0) (2025-05-15)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -18,7 +18,7 @@ function register(program) {
|
|
|
18
18
|
.command('get-ip-details')
|
|
19
19
|
.description('Gets geolocation and network details about an IP address or the current device.')
|
|
20
20
|
.argument('[ipAddress]', 'IP address to lookup (omit for current IP)')
|
|
21
|
-
.option('--include-extended-data', 'Include extended data (ASN, host, org). Requires API token.')
|
|
21
|
+
.option('-e, --include-extended-data', 'Include extended data (ASN, host, org). Requires API token.')
|
|
22
22
|
.option('--no-use-https', // commander creates a 'useHttps' boolean, defaulting to true
|
|
23
23
|
'Use HTTP instead of HTTPS for the API call.')
|
|
24
24
|
.action(async (ipAddress, options) => {
|
|
@@ -35,14 +35,14 @@ async function handleGetIpDetails(args) {
|
|
|
35
35
|
// Destructure options from the combined args
|
|
36
36
|
const { ipAddress, ...controllerOptions } = args;
|
|
37
37
|
// Call the controller with the ipAddress and the options object
|
|
38
|
-
const
|
|
39
|
-
methodLogger.debug(`Got the response from the controller`,
|
|
38
|
+
const result = await ipaddress_controller_js_1.default.get(ipAddress, controllerOptions);
|
|
39
|
+
methodLogger.debug(`Got the response from the controller`, result);
|
|
40
40
|
// Format the response for the MCP tool
|
|
41
41
|
return {
|
|
42
42
|
content: [
|
|
43
43
|
{
|
|
44
44
|
type: 'text',
|
|
45
|
-
text:
|
|
45
|
+
text: result.content,
|
|
46
46
|
},
|
|
47
47
|
],
|
|
48
48
|
};
|
|
@@ -61,7 +61,7 @@ async function handleGetIpDetails(args) {
|
|
|
61
61
|
function registerTools(server) {
|
|
62
62
|
const methodLogger = logger_util_js_1.Logger.forContext('tools/ipaddress.tool.ts', 'registerTools');
|
|
63
63
|
methodLogger.debug(`Registering IP address tools...`);
|
|
64
|
-
server.tool('ip_get_details', `Retrieves geolocation and network
|
|
64
|
+
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, // Use the combined schema for validation
|
|
65
65
|
handleGetIpDetails);
|
|
66
66
|
methodLogger.debug('Successfully registered ip_get_details tool.');
|
|
67
67
|
}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
/**
|
|
7
7
|
* Common response structure for controller operations.
|
|
8
8
|
* All controller methods should return this structure.
|
|
9
|
+
*
|
|
10
|
+
* All output, including pagination information and any additional metadata,
|
|
11
|
+
* is now consolidated into the content field as a single Markdown-formatted string.
|
|
9
12
|
*/
|
|
10
13
|
export interface ControllerResponse {
|
|
11
14
|
/**
|
|
12
15
|
* Formatted content to be displayed to the user.
|
|
13
|
-
*
|
|
16
|
+
* A comprehensive Markdown-formatted string that includes all necessary information,
|
|
17
|
+
* including pagination details and any additional metadata.
|
|
14
18
|
*/
|
|
15
19
|
content: string;
|
|
16
|
-
/**
|
|
17
|
-
* Optional metadata for any extra information associated with the response.
|
|
18
|
-
*/
|
|
19
|
-
metadata?: Record<string, unknown>;
|
|
20
20
|
}
|
|
@@ -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.
|
|
14
|
+
exports.VERSION = '1.8.0';
|
|
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.
|
|
3
|
+
"version": "1.8.0",
|
|
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",
|
package/package.json.bak
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aashari/boilerplate-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
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",
|