@modeltoolsprotocol/mtpcli 1.3.0 → 1.3.1

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 +8 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -8843,7 +8843,7 @@ var init_mcp = __esm(() => {
8843
8843
  });
8844
8844
 
8845
8845
  // src/version.ts
8846
- var VERSION2 = "1.3.0";
8846
+ var VERSION2 = "1.3.1";
8847
8847
 
8848
8848
  // src/serve.ts
8849
8849
  var exports_serve = {};
@@ -9940,7 +9940,7 @@ function parseHeaders(raw) {
9940
9940
  }
9941
9941
  return headers;
9942
9942
  }
9943
- async function run2(serverCmd, serverUrl, describeMode, toolName, toolArgs = [], rawHeaders = [], clientId) {
9943
+ async function run2(serverCmd, serverUrl, toolName, toolArgs = [], rawHeaders = [], clientId) {
9944
9944
  let client;
9945
9945
  let serverName;
9946
9946
  if (serverUrl) {
@@ -9965,7 +9965,7 @@ async function run2(serverCmd, serverUrl, describeMode, toolName, toolArgs = [],
9965
9965
  description: `CLI wrapper for MCP server: ${serverName}`,
9966
9966
  commands
9967
9967
  };
9968
- if (describeMode || !toolName) {
9968
+ if (!toolName) {
9969
9969
  console.log(JSON.stringify(schema, null, 2));
9970
9970
  return;
9971
9971
  }
@@ -10651,7 +10651,7 @@ function withDescribe(program2, options) {
10651
10651
  }
10652
10652
 
10653
10653
  // src/version.ts
10654
- var VERSION = "1.3.0";
10654
+ var VERSION = "1.3.1";
10655
10655
 
10656
10656
  // src/index.ts
10657
10657
  var program2 = new Command().name("mtpcli").version(VERSION).description("Unified CLI for discovering, authenticating, and bridging --mtp-describe-compatible tools");
@@ -10802,7 +10802,7 @@ Multiple tools can be combined into a single MCP server:
10802
10802
  const { run: run5 } = await Promise.resolve().then(() => (init_serve(), exports_serve));
10803
10803
  await run5(opts.tool);
10804
10804
  });
10805
- program2.command("wrap").description("Wrap an MCP server as a CLI tool (mcp2cli bridge)").option("--server <cmd>", "MCP server command to run (stdio transport)").option("--url <url>", "MCP server URL (Streamable HTTP / SSE transport)").option("-H, --header <header...>", "HTTP header(s) for --url (e.g. 'Authorization: Bearer tok')").option("--client-id <id>", "Pre-registered OAuth client ID (for --url)").option("--mtp-describe", "Output --mtp-describe JSON instead of invoking", false).argument("[tool_name]", "Tool name to invoke").argument("[args...]", "Arguments for the tool (after --)").action(async (toolName, args, opts) => {
10805
+ program2.command("wrap").description("Wrap an MCP server as a CLI tool (mcp2cli bridge)").option("--server <cmd>", "MCP server command to run (stdio transport)").option("--url <url>", "MCP server URL (Streamable HTTP / SSE transport)").option("-H, --header <header...>", "HTTP header(s) for --url (e.g. 'Authorization: Bearer tok')").option("--client-id <id>", "Pre-registered OAuth client ID (for --url)").argument("[tool_name]", "Tool name to invoke").argument("[args...]", "Arguments for the tool (after --)").action(async (toolName, args, opts) => {
10806
10806
  if (opts.server && opts.url) {
10807
10807
  process.stderr.write(`error: --server and --url are mutually exclusive
10808
10808
  `);
@@ -10824,7 +10824,7 @@ program2.command("wrap").description("Wrap an MCP server as a CLI tool (mcp2cli
10824
10824
  process.exit(1);
10825
10825
  }
10826
10826
  const { run: run5 } = await Promise.resolve().then(() => (init_wrap(), exports_wrap));
10827
- await run5(opts.server, opts.url, opts.mtpDescribe, toolName, args, opts.header ?? [], opts.clientId);
10827
+ await run5(opts.server, opts.url, toolName, args, opts.header ?? [], opts.clientId);
10828
10828
  });
10829
10829
  program2.command("validate").description("Validate a tool's --mtp-describe output against the MTP spec").argument("[tool]", "Tool name to validate").option("--json", "Output as JSON", false).option("--stdin", "Read JSON from stdin", false).option("--skip-help", "Skip --help cross-reference", false).action(async (tool, opts) => {
10830
10830
  const { run: run5 } = await Promise.resolve().then(() => (init_validate(), exports_validate));
@@ -10892,9 +10892,9 @@ var describeOptions = {
10892
10892
  },
10893
10893
  wrap: {
10894
10894
  examples: [
10895
- { description: "Describe a stdio MCP server", command: 'mtpcli wrap --server "npx @mcp/server-github" --mtp-describe' },
10895
+ { description: "Describe a stdio MCP server", command: 'mtpcli wrap --server "npx @mcp/server-github"' },
10896
10896
  { description: "Call a tool on a stdio server", command: 'mtpcli wrap --server "npx @mcp/server-github" search_repos -- --query mtpcli' },
10897
- { description: "Describe an HTTP MCP server", command: "mtpcli wrap --url http://localhost:3000/mcp --mtp-describe" },
10897
+ { description: "Describe an HTTP MCP server", command: "mtpcli wrap --url http://localhost:3000/mcp" },
10898
10898
  { description: "Call a tool on an HTTP server", command: "mtpcli wrap --url http://localhost:3000/mcp search_repos -- --query mtpcli" }
10899
10899
  ]
10900
10900
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@modeltoolsprotocol/mtpcli",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "bin": {