@jtsang/nettune-mcp 0.1.2 → 0.1.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/dist/index.js +2 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2130,7 +2130,7 @@ var {
|
|
|
2130
2130
|
// package.json
|
|
2131
2131
|
var package_default = {
|
|
2132
2132
|
name: "@jtsang/nettune-mcp",
|
|
2133
|
-
version: "0.1.
|
|
2133
|
+
version: "0.1.3",
|
|
2134
2134
|
private: false,
|
|
2135
2135
|
description: "MCP stdio wrapper for nettune - TCP network optimization tool",
|
|
2136
2136
|
type: "module",
|
|
@@ -2183,12 +2183,11 @@ var package_default = {
|
|
|
2183
2183
|
var VERSION = package_default.version;
|
|
2184
2184
|
function parseArgs() {
|
|
2185
2185
|
const program2 = new Command;
|
|
2186
|
-
program2.name("nettune-mcp").description("MCP stdio wrapper for nettune TCP network optimization tool").version(VERSION).requiredOption("-k, --api-key <key>", "API key for server authentication (required)").option("-s, --server <url>", "Server URL", "http://127.0.0.1:9876").option("--
|
|
2186
|
+
program2.name("nettune-mcp").description("MCP stdio wrapper for nettune TCP network optimization tool").version(VERSION).requiredOption("-k, --api-key <key>", "API key for server authentication (required)").option("-s, --server <url>", "Server URL", "http://127.0.0.1:9876").option("--version-tag <version>", "Specific nettune version to use", "latest").option("-v, --verbose", "Enable verbose logging", false).parse(process.argv);
|
|
2187
2187
|
const opts = program2.opts();
|
|
2188
2188
|
return {
|
|
2189
2189
|
apiKey: opts.apiKey,
|
|
2190
2190
|
server: opts.server,
|
|
2191
|
-
mcpName: opts.mcpName,
|
|
2192
2191
|
version: opts.versionTag,
|
|
2193
2192
|
verbose: opts.verbose
|
|
2194
2193
|
};
|
|
@@ -2197,7 +2196,6 @@ function buildClientArgs(options) {
|
|
|
2197
2196
|
const args = [];
|
|
2198
2197
|
args.push("--api-key", options.apiKey);
|
|
2199
2198
|
args.push("--server", options.server);
|
|
2200
|
-
args.push("--mcp-name", options.mcpName);
|
|
2201
2199
|
return args;
|
|
2202
2200
|
}
|
|
2203
2201
|
function validateOptions(options) {
|
|
@@ -2209,9 +2207,6 @@ function validateOptions(options) {
|
|
|
2209
2207
|
} catch {
|
|
2210
2208
|
throw new Error(`Invalid server URL: ${options.server}`);
|
|
2211
2209
|
}
|
|
2212
|
-
if (!options.mcpName || options.mcpName.trim() === "") {
|
|
2213
|
-
throw new Error("MCP name cannot be empty");
|
|
2214
|
-
}
|
|
2215
2210
|
}
|
|
2216
2211
|
|
|
2217
2212
|
// src/platform.ts
|