@mcpc-tech/cli 0.1.1-beta.1 → 0.1.1-beta.5

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 (3) hide show
  1. package/README.md +33 -1
  2. package/package.json +1 -1
  3. package/src/bin.mjs +126 -52
package/README.md CHANGED
@@ -2,17 +2,37 @@
2
2
 
3
3
  CLI server for MCPC with configuration support.
4
4
 
5
+ ## Quick Start
6
+
7
+ ```bash
8
+ # Show help
9
+ npx -y deno run -A jsr:@mcpc/cli/bin --help
10
+
11
+ # Load configuration from URL
12
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-url \
13
+ "https://raw.githubusercontent.com/mcpc-tech/mcpc/main/packages/cli/examples/configs/codex-fork.json"
14
+ ```
15
+
5
16
  ## Configuration
6
17
 
7
18
  Load configuration using command-line arguments:
8
19
 
20
+ - `--help`, `-h` - Show help message
9
21
  - `--config <json>` - Inline JSON configuration string
10
22
  - `--config-url <url>` - Fetch from URL (e.g., GitHub raw)
11
23
  - `--config-file <path>` - Path to configuration file
24
+ - `--request-headers <header>`, `-H <header>` - Add custom HTTP header for URL
25
+ fetching (can be used multiple times)
12
26
  - No arguments - Uses `./mcpc.config.json` if available
13
27
 
14
28
  ## Usage
15
29
 
30
+ **Show help:**
31
+
32
+ ```bash
33
+ npx -y deno run -A jsr:@mcpc/cli/bin --help
34
+ ```
35
+
16
36
  **Inline JSON config:**
17
37
 
18
38
  ```bash
@@ -25,6 +45,15 @@ deno run --allow-all src/bin.ts --config '[{"name":"my-agent","description":"...
25
45
  deno run --allow-all src/bin.ts --config-url https://example.com/config.json
26
46
  ```
27
47
 
48
+ **From URL with custom headers:**
49
+
50
+ ```bash
51
+ deno run --allow-all src/bin.ts \
52
+ --config-url https://api.example.com/config.json \
53
+ -H "Authorization: Bearer token123" \
54
+ -H "X-Custom-Header: value"
55
+ ```
56
+
28
57
  **From file:**
29
58
 
30
59
  ```bash
@@ -75,7 +104,7 @@ When using the Codex Fork configuration:
75
104
  Run the example scripts to see different usage patterns:
76
105
 
77
106
  ```bash
78
- # P
107
+ # First, set required environment variables
79
108
  export GITHUB_PERSONAL_ACCESS_TOKEN="github_pat_your_token"
80
109
 
81
110
  # Example 1: Inline configuration
@@ -92,6 +121,9 @@ export GITHUB_PERSONAL_ACCESS_TOKEN="github_pat_your_token"
92
121
 
93
122
  # Example 5: Remote URL config
94
123
  ./examples/05-url-config.sh
124
+
125
+ # Example 6: URL config with custom headers
126
+ ./examples/06-url-with-headers.sh
95
127
  ```
96
128
 
97
129
  All examples use the same [codex-fork.json](examples/configs/codex-fork.json)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcpc-tech/cli",
3
- "version": "0.1.1-beta.1",
3
+ "version": "0.1.1-beta.5",
4
4
  "homepage": "https://jsr.io/@mcpc/cli",
5
5
  "type": "module",
6
6
  "exports": {
package/src/bin.mjs CHANGED
@@ -9,10 +9,10 @@ var __export = (target, all) => {
9
9
  __defProp(target, name, { get: all[name], enumerable: true });
10
10
  };
11
11
 
12
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/config-plugin.js
12
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/config-plugin.js
13
13
  var createConfigPlugin, config_plugin_default;
14
14
  var init_config_plugin = __esm({
15
- "../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/config-plugin.js"() {
15
+ "../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/config-plugin.js"() {
16
16
  createConfigPlugin = () => ({
17
17
  name: "built-in-config",
18
18
  enforce: "pre",
@@ -29,10 +29,10 @@ var init_config_plugin = __esm({
29
29
  }
30
30
  });
31
31
 
32
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/tool-name-mapping-plugin.js
32
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/tool-name-mapping-plugin.js
33
33
  var createToolNameMappingPlugin, tool_name_mapping_plugin_default;
34
34
  var init_tool_name_mapping_plugin = __esm({
35
- "../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/tool-name-mapping-plugin.js"() {
35
+ "../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/tool-name-mapping-plugin.js"() {
36
36
  createToolNameMappingPlugin = () => ({
37
37
  name: "built-in-tool-name-mapping",
38
38
  enforce: "pre",
@@ -56,10 +56,10 @@ var init_tool_name_mapping_plugin = __esm({
56
56
  }
57
57
  });
58
58
 
59
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/logging-plugin.js
59
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/logging-plugin.js
60
60
  var createLoggingPlugin, logging_plugin_default;
61
61
  var init_logging_plugin = __esm({
62
- "../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/logging-plugin.js"() {
62
+ "../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/logging-plugin.js"() {
63
63
  createLoggingPlugin = (options = {}) => {
64
64
  const { enabled = true, verbose = false, compact: compact2 = true } = options;
65
65
  return {
@@ -119,7 +119,7 @@ var init_logging_plugin = __esm({
119
119
  }
120
120
  });
121
121
 
122
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/index.js
122
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/index.js
123
123
  var built_in_exports = {};
124
124
  __export(built_in_exports, {
125
125
  createConfigPlugin: () => createConfigPlugin,
@@ -135,7 +135,7 @@ function getBuiltInPlugins() {
135
135
  ];
136
136
  }
137
137
  var init_built_in = __esm({
138
- "../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/index.js"() {
138
+ "../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugins/built-in/index.js"() {
139
139
  init_config_plugin();
140
140
  init_tool_name_mapping_plugin();
141
141
  init_logging_plugin();
@@ -145,20 +145,20 @@ var init_built_in = __esm({
145
145
  }
146
146
  });
147
147
 
148
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/bin.ts
148
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/bin.ts
149
149
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
150
150
 
151
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/app.js
151
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/app.js
152
152
  import { OpenAPIHono } from "@hono/zod-openapi";
153
153
 
154
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/controllers/messages.controller.js
154
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/controllers/messages.controller.js
155
155
  import { createRoute } from "@hono/zod-openapi";
156
156
  import { z } from "zod";
157
157
 
158
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__utils/src/transport/sse.js
158
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__utils/src/transport/sse.js
159
159
  import { JSONRPCMessageSchema } from "@modelcontextprotocol/sdk/types.js";
160
160
 
161
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/std__http/server_sent_event_stream.js
161
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/std__http/server_sent_event_stream.js
162
162
  var NEWLINE_REGEXP = /\r\n|\r|\n/;
163
163
  var encoder = new TextEncoder();
164
164
  function assertHasNoNewline(value, varName, errPrefix) {
@@ -196,15 +196,15 @@ var ServerSentEventStream = class extends TransformStream {
196
196
  }
197
197
  };
198
198
 
199
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/controllers/sse.controller.js
199
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/controllers/sse.controller.js
200
200
  import { createRoute as createRoute2, z as z2 } from "@hono/zod-openapi";
201
201
 
202
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/compose.js
202
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/compose.js
203
203
  import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprotocol/sdk/types.js";
204
204
  import { jsonSchema as jsonSchema3 } from "ai";
205
205
  import { Server } from "@modelcontextprotocol/sdk/server/index.js";
206
206
 
207
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__utils/src/json.js
207
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__utils/src/json.js
208
208
  import { jsonrepair } from "jsonrepair";
209
209
  function parseJSON(text, throwError) {
210
210
  try {
@@ -226,7 +226,7 @@ function parseJSON(text, throwError) {
226
226
  }
227
227
  }
228
228
 
229
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__utils/src/ai.js
229
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__utils/src/ai.js
230
230
  var p = (template, options = {}) => {
231
231
  const { missingVariableHandling = "warn" } = options;
232
232
  const names = /* @__PURE__ */ new Set();
@@ -262,7 +262,7 @@ var p = (template, options = {}) => {
262
262
  };
263
263
  };
264
264
 
265
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__utils/src/tool-tags.js
265
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__utils/src/tool-tags.js
266
266
  import { load } from "cheerio";
267
267
  function parseTags(htmlString, tags) {
268
268
  const $ = load(htmlString, {
@@ -281,13 +281,13 @@ function parseTags(htmlString, tags) {
281
281
  };
282
282
  }
283
283
 
284
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/mcp.js
284
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/mcp.js
285
285
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
286
286
  import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
287
287
  import { SSEClientTransport } from "@modelcontextprotocol/sdk/client/sse.js";
288
288
  import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
289
289
 
290
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/registory.js
290
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/registory.js
291
291
  function connectToSmitheryServer(smitheryConfig) {
292
292
  const serverUrl = new URL(smitheryConfig.deploymentUrl);
293
293
  serverUrl.searchParams.set("config", btoa(JSON.stringify(smitheryConfig.config)));
@@ -312,7 +312,7 @@ function smitheryToolNameCompatibale(name, scope) {
312
312
  };
313
313
  }
314
314
 
315
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/mcp.js
315
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/mcp.js
316
316
  import { cwd } from "node:process";
317
317
  import process2 from "node:process";
318
318
  import { createHash } from "node:crypto";
@@ -475,7 +475,7 @@ async function composeMcpDepTools(mcpConfig, filterIn) {
475
475
  };
476
476
  }
477
477
 
478
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/schema.js
478
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/schema.js
479
479
  import traverse from "json-schema-traverse";
480
480
  function updateRefPaths(schema, wrapperPath) {
481
481
  if (!schema || typeof schema !== "object") {
@@ -507,18 +507,18 @@ function updateRefPaths(schema, wrapperPath) {
507
507
  return clonedSchema;
508
508
  }
509
509
 
510
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-tool-registrar.js
510
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-tool-registrar.js
511
511
  import { jsonSchema } from "ai";
512
512
 
513
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/config.js
513
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/config.js
514
514
  import process3 from "node:process";
515
515
  var GEMINI_PREFERRED_FORMAT = process3.env.GEMINI_PREFERRED_FORMAT === "0" ? false : true;
516
516
 
517
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/json.js
517
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/json.js
518
518
  import { jsonrepair as jsonrepair2 } from "jsonrepair";
519
519
  import { inspect } from "node:util";
520
520
 
521
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/provider.js
521
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/provider.js
522
522
  var createGoogleCompatibleJSONSchema = (schema) => {
523
523
  if (!GEMINI_PREFERRED_FORMAT) {
524
524
  return schema;
@@ -542,7 +542,7 @@ var createGoogleCompatibleJSONSchema = (schema) => {
542
542
  return removeAdditionalProperties(cleanSchema);
543
543
  };
544
544
 
545
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/prompts/index.js
545
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/prompts/index.js
546
546
  var SystemPrompts = {
547
547
  /**
548
548
  * Base system prompt for autonomous MCP execution
@@ -884,7 +884,7 @@ ${JSON.stringify(steps, null, 2)}`;
884
884
  }
885
885
  };
886
886
 
887
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-executor.js
887
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-executor.js
888
888
  import { Ajv } from "ajv";
889
889
  import { AggregateAjvError } from "@segment/ajv-human-errors";
890
890
  import addFormats from "ajv-formats";
@@ -1016,7 +1016,7 @@ var AgenticExecutor = class {
1016
1016
  }
1017
1017
  };
1018
1018
 
1019
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/partial.js
1019
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/partial.js
1020
1020
  function partial(func, ...partialArgs) {
1021
1021
  return partialImpl(func, placeholderSymbol, ...partialArgs);
1022
1022
  }
@@ -1035,7 +1035,7 @@ function partialImpl(func, placeholder, ...partialArgs) {
1035
1035
  var placeholderSymbol = Symbol("partial.placeholder");
1036
1036
  partial.placeholder = placeholderSymbol;
1037
1037
 
1038
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/partialRight.js
1038
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/partialRight.js
1039
1039
  function partialRight(func, ...partialArgs) {
1040
1040
  return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
1041
1041
  }
@@ -1056,10 +1056,10 @@ function partialRightImpl(func, placeholder, ...partialArgs) {
1056
1056
  var placeholderSymbol2 = Symbol("partialRight.placeholder");
1057
1057
  partialRight.placeholder = placeholderSymbol2;
1058
1058
 
1059
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/retry.js
1059
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/es-toolkit__es-toolkit/src/function/retry.js
1060
1060
  var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
1061
1061
 
1062
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/es-toolkit__es-toolkit/src/object/pick.js
1062
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/es-toolkit__es-toolkit/src/object/pick.js
1063
1063
  function pick(obj, keys) {
1064
1064
  const result = {};
1065
1065
  for (let i = 0; i < keys.length; i++) {
@@ -1071,7 +1071,7 @@ function pick(obj, keys) {
1071
1071
  return result;
1072
1072
  }
1073
1073
 
1074
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/es-toolkit__es-toolkit/src/string/deburr.js
1074
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/es-toolkit__es-toolkit/src/string/deburr.js
1075
1075
  var deburrMap = new Map(
1076
1076
  // eslint-disable-next-line no-restricted-syntax
1077
1077
  Object.entries({
@@ -1107,7 +1107,7 @@ var deburrMap = new Map(
1107
1107
  })
1108
1108
  );
1109
1109
 
1110
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/factories/args-def-factory.js
1110
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/factories/args-def-factory.js
1111
1111
  var DECISION_OPTIONS = {
1112
1112
  RETRY: "retry",
1113
1113
  PROCEED: "proceed",
@@ -1332,7 +1332,7 @@ NOTE: The \`steps\` has been predefined` : `**You MUST execute this tool with fo
1332
1332
  };
1333
1333
  }
1334
1334
 
1335
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/sampling/base-sampling-executor.js
1335
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/sampling/base-sampling-executor.js
1336
1336
  import { Ajv as Ajv2 } from "ajv";
1337
1337
  import { AggregateAjvError as AggregateAjvError2 } from "@segment/ajv-human-errors";
1338
1338
  import addFormats2 from "ajv-formats";
@@ -1529,7 +1529,7 @@ VALID: {"key":"value"}` }) {
1529
1529
  }
1530
1530
  };
1531
1531
 
1532
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/sampling/agentic-sampling-executor.js
1532
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/sampling/agentic-sampling-executor.js
1533
1533
  var SamplingExecutor = class extends BaseSamplingExecutor {
1534
1534
  agenticExecutor;
1535
1535
  constructor(name, description, allToolNames, toolNameToDetailList, server2, config2) {
@@ -1628,7 +1628,7 @@ When the task is complete, I should use "action": "complete".`;
1628
1628
  }
1629
1629
  };
1630
1630
 
1631
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-tool-registrar.js
1631
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/agentic/agentic-tool-registrar.js
1632
1632
  function registerAgenticTool(server2, { description, name, allToolNames, depGroups, toolNameToDetailList, sampling = false }) {
1633
1633
  const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, void 0, void 0);
1634
1634
  const isSamplingMode = sampling === true || typeof sampling === "object";
@@ -1658,10 +1658,10 @@ function registerAgenticTool(server2, { description, name, allToolNames, depGrou
1658
1658
  });
1659
1659
  }
1660
1660
 
1661
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-tool-registrar.js
1661
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-tool-registrar.js
1662
1662
  import { jsonSchema as jsonSchema2 } from "ai";
1663
1663
 
1664
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/state.js
1664
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/state.js
1665
1665
  var WorkflowState = class {
1666
1666
  currentStepIndex = -1;
1667
1667
  steps = [];
@@ -1830,7 +1830,7 @@ var WorkflowState = class {
1830
1830
  }
1831
1831
  };
1832
1832
 
1833
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-executor.js
1833
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-executor.js
1834
1834
  import { Ajv as Ajv3 } from "ajv";
1835
1835
  import { AggregateAjvError as AggregateAjvError3 } from "@segment/ajv-human-errors";
1836
1836
  import addFormats3 from "ajv-formats";
@@ -2157,7 +2157,7 @@ ${this.formatProgress(state)}`
2157
2157
  }
2158
2158
  };
2159
2159
 
2160
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/sampling/workflow-sampling-executor.js
2160
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/sampling/workflow-sampling-executor.js
2161
2161
  var WorkflowSamplingExecutor = class extends BaseSamplingExecutor {
2162
2162
  createArgsDef;
2163
2163
  predefinedSteps;
@@ -2224,7 +2224,7 @@ Current Task: <user_request>${args.userRequest}</user_request>`;
2224
2224
  }
2225
2225
  };
2226
2226
 
2227
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-tool-registrar.js
2227
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/executors/workflow/workflow-tool-registrar.js
2228
2228
  function registerAgenticWorkflowTool(server2, { description, name, allToolNames, depGroups, toolNameToDetailList, predefinedSteps, sampling = false, ensureStepActions, toolNameToIdMapping }) {
2229
2229
  const createArgsDef = createArgsDefFactory(name, allToolNames, depGroups, predefinedSteps, ensureStepActions);
2230
2230
  const isSamplingMode = sampling === true || typeof sampling === "object";
@@ -2266,7 +2266,7 @@ function registerAgenticWorkflowTool(server2, { description, name, allToolNames,
2266
2266
  });
2267
2267
  }
2268
2268
 
2269
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/tool-tag-processor.js
2269
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/tool-tag-processor.js
2270
2270
  var ALL_TOOLS_PLACEHOLDER = "__ALL__";
2271
2271
  function findToolId(toolName, tools, toolNameMapping) {
2272
2272
  const mappedId = toolNameMapping?.get(toolName);
@@ -2300,10 +2300,10 @@ function processToolTags({ description, tagToResults, $, tools, toolOverrides, t
2300
2300
  return $.root().html() ?? description;
2301
2301
  }
2302
2302
 
2303
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/compose.js
2303
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/compose.js
2304
2304
  init_built_in();
2305
2305
 
2306
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/plugin-utils.js
2306
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/plugin-utils.js
2307
2307
  function shouldApplyPlugin(plugin, mode) {
2308
2308
  if (!plugin.apply) return true;
2309
2309
  if (typeof plugin.apply === "string") {
@@ -2358,7 +2358,7 @@ async function loadPlugin(pluginPath) {
2358
2358
  }
2359
2359
  }
2360
2360
 
2361
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/compose.js
2361
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/compose.js
2362
2362
  var ALL_TOOLS_PLACEHOLDER2 = "__ALL__";
2363
2363
  var ComposableMCPServer = class extends Server {
2364
2364
  tools = [];
@@ -2881,7 +2881,7 @@ var ComposableMCPServer = class extends Server {
2881
2881
  }
2882
2882
  };
2883
2883
 
2884
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/utils/common/env.js
2884
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/utils/common/env.js
2885
2885
  import process4 from "node:process";
2886
2886
  var isSCF = () => Boolean(process4.env.SCF_RUNTIME || process4.env.PROD_SCF);
2887
2887
  if (isSCF()) {
@@ -2891,7 +2891,7 @@ if (isSCF()) {
2891
2891
  });
2892
2892
  }
2893
2893
 
2894
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@jsr/mcpc__core/src/set-up-mcp-compose.js
2894
+ // ../__mcpc__cli_0.1.1/node_modules/@jsr/mcpc__core/src/set-up-mcp-compose.js
2895
2895
  function parseMcpcConfigs(conf) {
2896
2896
  const mcpcConfigs = conf ?? [];
2897
2897
  const newMcpcConfigs = [];
@@ -2932,7 +2932,7 @@ async function mcpc(serverConf, composeConf, setupCallback) {
2932
2932
  return server2;
2933
2933
  }
2934
2934
 
2935
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/app.js
2935
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/app.js
2936
2936
  var createServer = async (config2) => {
2937
2937
  const serverConfig = config2 || {
2938
2938
  name: "large-result-plugin-example",
@@ -2961,10 +2961,59 @@ var createServer = async (config2) => {
2961
2961
  ], serverConfig.agents);
2962
2962
  };
2963
2963
 
2964
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/config/loader.js
2964
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/config/loader.js
2965
2965
  import { readFile } from "node:fs/promises";
2966
2966
  import { resolve } from "node:path";
2967
2967
  import process5 from "node:process";
2968
+ function printHelp() {
2969
+ console.log(`
2970
+ MCPC CLI - Model Context Protocol Composer
2971
+
2972
+ USAGE:
2973
+ npx -y deno run -A jsr:@mcpc/cli/bin [OPTIONS]
2974
+
2975
+ OPTIONS:
2976
+ --help, -h Show this help message
2977
+ --config <json> Inline JSON configuration string
2978
+ --config-url <url> Fetch configuration from URL
2979
+ --config-file <path> Load configuration from file path
2980
+ --request-headers <header>, -H <header>
2981
+ Add custom HTTP header for URL fetching
2982
+ Format: "Key: Value" or "Key=Value"
2983
+ Can be used multiple times
2984
+
2985
+ EXAMPLES:
2986
+ # Show help
2987
+ npx -y deno run -A jsr:@mcpc/cli/bin --help
2988
+
2989
+ # Load from URL
2990
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-url \\
2991
+ "https://raw.githubusercontent.com/mcpc-tech/mcpc/main/packages/cli/examples/configs/codex-fork.json"
2992
+
2993
+ # Load from URL with custom headers
2994
+ npx -y deno run -A jsr:@mcpc/cli/bin \\
2995
+ --config-url "https://api.example.com/config.json" \\
2996
+ -H "Authorization: Bearer token123" \\
2997
+ -H "X-Custom-Header: value"
2998
+
2999
+ # Load from file
3000
+ npx -y deno run -A jsr:@mcpc/cli/bin --config-file ./my-config.json
3001
+
3002
+ # Use default configuration (./mcpc.config.json)
3003
+ npx -y deno run -A jsr:@mcpc/cli/bin
3004
+
3005
+ CONFIGURATION:
3006
+ Configuration files support environment variable substitution using $VAR_NAME syntax.
3007
+
3008
+ Priority order:
3009
+ 1. --config (inline JSON)
3010
+ 2. --config-url (fetch from URL)
3011
+ 3. --config-file (file path)
3012
+ 4. ./mcpc.config.json (default)
3013
+
3014
+ For more information, visit: https://github.com/mcpc-tech/mcpc
3015
+ `);
3016
+ }
2968
3017
  function parseArgs() {
2969
3018
  const args = process5.argv.slice(2);
2970
3019
  const result = {};
@@ -2976,12 +3025,31 @@ function parseArgs() {
2976
3025
  result.configUrl = args[++i];
2977
3026
  } else if (arg === "--config-file" && i + 1 < args.length) {
2978
3027
  result.configFile = args[++i];
3028
+ } else if ((arg === "--request-headers" || arg === "-H") && i + 1 < args.length) {
3029
+ const headerStr = args[++i];
3030
+ const colonIdx = headerStr.indexOf(":");
3031
+ const equalIdx = headerStr.indexOf("=");
3032
+ const separatorIdx = colonIdx !== -1 ? equalIdx !== -1 ? Math.min(colonIdx, equalIdx) : colonIdx : equalIdx;
3033
+ if (separatorIdx !== -1) {
3034
+ const key = headerStr.substring(0, separatorIdx).trim();
3035
+ const value = headerStr.substring(separatorIdx + 1).trim();
3036
+ if (!result.requestHeaders) {
3037
+ result.requestHeaders = {};
3038
+ }
3039
+ result.requestHeaders[key] = value;
3040
+ }
3041
+ } else if (arg === "--help" || arg === "-h") {
3042
+ result.help = true;
2979
3043
  }
2980
3044
  }
2981
3045
  return result;
2982
3046
  }
2983
3047
  async function loadConfig() {
2984
3048
  const args = parseArgs();
3049
+ if (args.help) {
3050
+ printHelp();
3051
+ process5.exit(0);
3052
+ }
2985
3053
  if (args.config) {
2986
3054
  try {
2987
3055
  const parsed = JSON.parse(args.config);
@@ -2993,7 +3061,13 @@ async function loadConfig() {
2993
3061
  }
2994
3062
  if (args.configUrl) {
2995
3063
  try {
2996
- const response = await fetch(args.configUrl);
3064
+ const headers = {
3065
+ "User-Agent": "MCPC-CLI/0.1.0",
3066
+ ...args.requestHeaders
3067
+ };
3068
+ const response = await fetch(args.configUrl, {
3069
+ headers
3070
+ });
2997
3071
  if (!response.ok) {
2998
3072
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
2999
3073
  }
@@ -3084,7 +3158,7 @@ function normalizeAgents(agents) {
3084
3158
  });
3085
3159
  }
3086
3160
 
3087
- // ../__mcpc__cli_0.1.1-beta.1/node_modules/@mcpc/cli/src/bin.ts
3161
+ // ../__mcpc__cli_0.1.1/node_modules/@mcpc/cli/src/bin.ts
3088
3162
  var config = await loadConfig();
3089
3163
  if (config) {
3090
3164
  console.error(`Loaded configuration with ${config.agents.length} agent(s)`);