@mcp-html-bridge/claude-skill 0.4.0 → 0.5.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.
@@ -2,7 +2,10 @@ You are the rendering decision-maker for MCP tool results. You analyze data and
2
2
 
3
3
  ## Your Role
4
4
 
5
- MCP-HTML-Bridge is a **generic MCP GUI wrapper**. It renders any JSON data as clean, structural HTML — tables for arrays of objects, key-value pairs for flat objects, collapsible sections for nested structures. No business logic, no hardcoded formatting. Pure structural rendering.
5
+ MCP-HTML-Bridge is a **generic MCP GUI wrapper**. It supports two rendering modes:
6
+
7
+ 1. **LLM-powered semantic rendering** — An LLM analyzes the JSON, understands what the data *means* (SVG, markdown, images, charts, code, etc.), and produces the best HTML visualization.
8
+ 2. **Structural fallback** — When no LLM is configured, renders JSON mechanically (tables for arrays of objects, key-value pairs for flat objects, etc.)
6
9
 
7
10
  ## Decision Framework
8
11
 
@@ -15,17 +18,16 @@ MCP-HTML-Bridge is a **generic MCP GUI wrapper**. It renders any JSON data as cl
15
18
  - The data is an error response — just explain the error
16
19
 
17
20
  **Use GUI rendering when:**
18
- - Data has tabular structure that benefits from sorting/scanning
21
+ - Data has tabular structure, nested objects, or complex content
19
22
  - There are many items to compare or browse
20
- - The structure is complex/nested enough that a visual layout aids navigation
23
+ - The data contains rich content (SVG, markdown, HTML, images, code)
21
24
  - The user explicitly asks for a visual/HTML rendering
22
25
 
23
- If you decide to skip GUI, just present the data as formatted text in your response.
24
-
25
26
  ### Step 2: Render
26
27
 
27
- Write the JSON data to a temp file, then call the renderer:
28
+ Write the JSON data to a temp file, then call the renderer.
28
29
 
30
+ **With LLM semantic rendering (recommended for rich data):**
29
31
  ```bash
30
32
  cat <<'MCPJSON' > /tmp/mcp-render-input.json
31
33
  <THE_JSON_DATA>
@@ -34,16 +36,25 @@ MCPJSON
34
36
  mcp-html-skill render \
35
37
  --data /tmp/mcp-render-input.json \
36
38
  --title "<descriptive title>" \
37
- --tool-name "<mcp_tool_name>" \
39
+ --api-url "https://api.openai.com/v1" \
40
+ --api-key "$OPENAI_API_KEY" \
41
+ --model "gpt-4o-mini" \
42
+ --open
43
+ ```
44
+
45
+ **Without LLM (structural fallback):**
46
+ ```bash
47
+ mcp-html-skill render \
48
+ --data /tmp/mcp-render-input.json \
49
+ --title "<descriptive title>" \
38
50
  --open
39
51
  ```
40
52
 
41
- For schema/form rendering:
53
+ **For schema/form rendering:**
42
54
  ```bash
43
55
  mcp-html-skill render \
44
56
  --schema /tmp/mcp-schema.json \
45
57
  --title "<title>" \
46
- --tool-name "<tool_name>" \
47
58
  --open
48
59
  ```
49
60
 
@@ -58,20 +69,17 @@ After rendering, briefly tell the user:
58
69
  - The file path (from command output)
59
70
  - What they'll see when they open it
60
71
 
61
- ## What the renderer does
72
+ ## LLM Providers
62
73
 
63
- The renderer applies **pure structural rendering** based on JSON data shape:
74
+ The `--api-url` flag accepts any OpenAI-compatible endpoint:
64
75
 
65
- | Data Shape | Rendering |
76
+ | Provider | API URL |
66
77
  |---|---|
67
- | Array of objects | Sortable `<table>` with auto-detected columns |
68
- | Flat object | Key-value pairs (`<dl>`) |
69
- | Nested object | Collapsible `<details>` sections |
70
- | Array of scalars | Bulleted `<ul>` list |
71
- | String / number / boolean | Typed inline display |
72
- | JSON Schema | Interactive form with smart widgets |
73
-
74
- **No business logic is applied.** No status badges, no price formatting, no regex-based field guessing. All data is rendered structurally. Formatting decisions are the caller's responsibility.
78
+ | OpenAI | `https://api.openai.com/v1` |
79
+ | Baidu ERNIE | `https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop` |
80
+ | Anthropic (via proxy) | `https://api.anthropic.com/v1` |
81
+ | Ollama (local) | `http://localhost:11434/v1` |
82
+ | vLLM (local) | `http://localhost:8000/v1` |
75
83
 
76
84
  ## Options
77
85
 
@@ -85,5 +93,8 @@ The renderer applies **pure structural rendering** based on JSON data shape:
85
93
  | `--debug` | Add debug playground panel |
86
94
  | `--open` | Auto-open in browser |
87
95
  | `--stdout` | Print raw HTML to stdout |
96
+ | `--api-url <url>` | LLM API base URL |
97
+ | `--api-key <key>` | LLM API key |
98
+ | `--model <model>` | LLM model name |
88
99
 
89
100
  $ARGUMENTS
@@ -0,0 +1,10 @@
1
+ interface ConfigOptions {
2
+ apiUrl?: string;
3
+ apiKey?: string;
4
+ model?: string;
5
+ show?: boolean;
6
+ clear?: boolean;
7
+ }
8
+ export declare function config(options: ConfigOptions): void;
9
+ export {};
10
+ //# sourceMappingURL=config-cmd.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-cmd.d.ts","sourceRoot":"","sources":["../src/config-cmd.ts"],"names":[],"mappings":"AAMA,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAmDnD"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * `mcp-html-skill config` subcommand.
3
+ */
4
+ import { loadConfig, saveConfig, getConfigPath } from './config.js';
5
+ export function config(options) {
6
+ if (options.show) {
7
+ const cfg = loadConfig();
8
+ const path = getConfigPath();
9
+ if (cfg.llm) {
10
+ console.log(`Config: ${path}`);
11
+ console.log(` API URL: ${cfg.llm.apiUrl}`);
12
+ console.log(` API Key: ${cfg.llm.apiKey ? cfg.llm.apiKey.slice(0, 8) + '...' : '(not set)'}`);
13
+ console.log(` Model: ${cfg.llm.model}`);
14
+ }
15
+ else {
16
+ console.log(`No LLM configured. Config path: ${path}`);
17
+ console.log('Run: mcp-html-skill config --api-url <url> --model <model>');
18
+ }
19
+ return;
20
+ }
21
+ if (options.clear) {
22
+ saveConfig({});
23
+ console.log('Config cleared.');
24
+ return;
25
+ }
26
+ if (!options.apiUrl && !options.model && !options.apiKey) {
27
+ console.error('Usage:');
28
+ console.error(' mcp-html-skill config --api-url <url> --model <model> [--api-key <key>]');
29
+ console.error(' mcp-html-skill config --show');
30
+ console.error(' mcp-html-skill config --clear');
31
+ console.error('');
32
+ console.error('Examples:');
33
+ console.error(' mcp-html-skill config --api-url http://localhost:11434/v1 --model qwen2');
34
+ console.error(' mcp-html-skill config --api-url https://api.deepseek.com/v1 --api-key sk-xxx --model deepseek-chat');
35
+ process.exit(1);
36
+ }
37
+ const existing = loadConfig();
38
+ const llm = existing.llm ?? { apiUrl: '', model: '' };
39
+ if (options.apiUrl)
40
+ llm.apiUrl = options.apiUrl;
41
+ if (options.apiKey)
42
+ llm.apiKey = options.apiKey;
43
+ if (options.model)
44
+ llm.model = options.model;
45
+ if (!llm.apiUrl || !llm.model) {
46
+ console.error('Both --api-url and --model are required.');
47
+ process.exit(1);
48
+ }
49
+ saveConfig({ ...existing, llm });
50
+ console.log(`Saved to ${getConfigPath()}`);
51
+ console.log(` API URL: ${llm.apiUrl}`);
52
+ console.log(` Model: ${llm.model}`);
53
+ console.log(` API Key: ${llm.apiKey ? llm.apiKey.slice(0, 8) + '...' : '(not set)'}`);
54
+ }
55
+ //# sourceMappingURL=config-cmd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-cmd.js","sourceRoot":"","sources":["../src/config-cmd.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAWpE,MAAM,UAAU,MAAM,CAAC,OAAsB;IAC3C,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;QACjB,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;QACzB,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC;QAC7B,IAAI,GAAG,CAAC,GAAG,EAAE,CAAC;YACZ,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC,CAAC;YAC/B,O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~/.mcp-html-bridge/config.json */
9
+ export declare function loadConfig(): BridgeConfig;
10
+ /** Write config to ~/.mcp-html-bridge/config.json */
11
+ export declare function saveConfig(config: BridgeConfig): void;
12
+ /** Get config file path */
13
+ export declare function getConfigPath(): string;
14
+ /**
15
+ * Resolve LLM config from all sources.
16
+ * Priority: CLI flags > env vars > config file
17
+ */
18
+ export declare function resolveLLMConfig(cliFlags: {
19
+ apiUrl?: string;
20
+ apiKey?: string;
21
+ model?: string;
22
+ }): {
23
+ apiUrl: string;
24
+ apiKey?: string;
25
+ model: string;
26
+ } | undefined;
27
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,YAAY;IAC3B,GAAG,CAAC,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,sDAAsD;AACtD,wBAAgB,UAAU,IAAI,YAAY,CAUzC;AAED,qDAAqD;AACrD,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI,CAGrD;AAED,2BAA2B;AAC3B,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAkBjE"}
package/dist/config.js ADDED
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Configuration management for MCP-HTML-Bridge.
3
+ *
4
+ * Config file: ~/.mcp-html-bridge/config.json
5
+ * Env vars: MCP_HTML_LLM_API_URL, MCP_HTML_LLM_API_KEY, MCP_HTML_LLM_MODEL
6
+ * CLI flags: --api-url, --api-key, --model (highest priority)
7
+ */
8
+ import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs';
9
+ import { join } from 'node:path';
10
+ import { homedir } from 'node:os';
11
+ const CONFIG_DIR = join(homedir(), '.mcp-html-bridge');
12
+ const CONFIG_FILE = join(CONFIG_DIR, 'config.json');
13
+ /** Read config from ~/.mcp-html-bridge/config.json */
14
+ export function loadConfig() {
15
+ try {
16
+ if (existsSync(CONFIG_FILE)) {
17
+ const raw = readFileSync(CONFIG_FILE, 'utf-8');
18
+ return JSON.parse(raw);
19
+ }
20
+ }
21
+ catch {
22
+ // Corrupt config, ignore
23
+ }
24
+ return {};
25
+ }
26
+ /** Write config to ~/.mcp-html-bridge/config.json */
27
+ export function saveConfig(config) {
28
+ mkdirSync(CONFIG_DIR, { recursive: true });
29
+ writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2) + '\n', 'utf-8');
30
+ }
31
+ /** Get config file path */
32
+ export function getConfigPath() {
33
+ return CONFIG_FILE;
34
+ }
35
+ /**
36
+ * Resolve LLM config from all sources.
37
+ * Priority: CLI flags > env vars > config file
38
+ */
39
+ export function resolveLLMConfig(cliFlags) {
40
+ const file = loadConfig();
41
+ const apiUrl = cliFlags.apiUrl
42
+ ?? process.env['MCP_HTML_LLM_API_URL']
43
+ ?? file.llm?.apiUrl;
44
+ const model = cliFlags.model
45
+ ?? process.env['MCP_HTML_LLM_MODEL']
46
+ ?? file.llm?.model;
47
+ if (!apiUrl || !model)
48
+ return undefined;
49
+ const apiKey = cliFlags.apiKey
50
+ ?? process.env['MCP_HTML_LLM_API_KEY']
51
+ ?? file.llm?.apiKey;
52
+ return { apiUrl, apiKey, model };
53
+ }
54
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"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M,CAAC;IAEtB,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK;WACvB,OAAO,CAAC,GAAG,CAAC,oBAAoB,CAAC;WACjC,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC;IAErB,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK;QAAE,OAAO,SAAS,CAAC;IAExC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM;WACzB,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC;WACnC,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC;IAEtB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;AACnC,CAAC"}
package/dist/index.js CHANGED
@@ -2,38 +2,53 @@
2
2
  /**
3
3
  * @mcp-html-bridge/claude-skill
4
4
  *
5
- * CLI tool for Claude Code integration:
6
- * mcp-html-skill install install /mcp-render command into Claude Code
7
- * mcp-html-skill render — render JSON schema/data to HTML file
5
+ * CLI for MCP-HTML-Bridge:
6
+ * mcp-html-skill config configure LLM provider
7
+ * mcp-html-skill render — render JSON to HTML
8
+ * mcp-html-skill install — install /mcp-render into Claude Code
8
9
  */
9
10
  import { Command } from 'commander';
10
11
  import { install } from './install.js';
11
12
  import { render } from './render.js';
13
+ import { config } from './config-cmd.js';
12
14
  const program = new Command();
13
15
  program
14
16
  .name('mcp-html-skill')
15
- .description('Claude Code skill for MCP-HTML-Bridge')
16
- .version('0.4.0');
17
+ .description('MCP-HTML-Bridge render any JSON as self-contained HTML')
18
+ .version('0.5.0');
17
19
  program
18
- .command('install')
19
- .description('Install /mcp-render command into Claude Code (~/.claude/commands/)')
20
- .option('--global', 'Install to global ~/.claude/commands/ (default)', true)
21
- .option('--project', 'Install to current project .claude/commands/')
22
- .action(install);
20
+ .command('config')
21
+ .description('Configure LLM provider (saved to ~/.mcp-html-bridge/config.json)')
22
+ .option('--api-url <url>', 'LLM API base URL')
23
+ .option('--api-key <key>', 'LLM API key')
24
+ .option('--model <model>', 'LLM model name')
25
+ .option('--show', 'Show current config')
26
+ .option('--clear', 'Clear saved config')
27
+ .action(config);
23
28
  program
24
29
  .command('render')
25
30
  .description('Render MCP tool schema or result data as HTML')
26
31
  .option('--schema <file>', 'JSON Schema file (renders input form)')
27
32
  .option('--data <file>', 'JSON data file (renders result view)')
28
33
  .option('--json <string>', 'Inline JSON string')
29
- .option('--mode <mode>', 'Force render mode: schema | data (auto-detected if omitted)')
34
+ .option('--mode <mode>', 'Force render mode: schema | data')
30
35
  .option('--title <title>', 'Page title')
31
- .option('--tool-name <name>', 'Tool name for bridge protocol')
36
+ .option('--tool-name <name>', 'Tool name')
32
37
  .option('--tool-desc <desc>', 'Tool description')
33
38
  .option('--debug', 'Enable debug playground panel')
34
39
  .option('--output <dir>', 'Output directory', '/tmp/mcp-html-bridge')
35
40
  .option('--open', 'Open in browser after rendering')
36
- .option('--stdout', 'Print raw HTML to stdout instead of writing to file')
41
+ .option('--stdout', 'Print raw HTML to stdout')
42
+ .option('--api-url <url>', 'LLM API URL (overrides config)')
43
+ .option('--api-key <key>', 'LLM API key (overrides config)')
44
+ .option('--model <model>', 'LLM model (overrides config)')
45
+ .option('--no-llm', 'Force structural rendering, skip LLM')
37
46
  .action(render);
47
+ program
48
+ .command('install')
49
+ .description('Install /mcp-render command into Claude Code')
50
+ .option('--global', 'Install to global ~/.claude/commands/ (default)', true)
51
+ .option('--project', 'Install to current project .claude/commands/')
52
+ .action(install);
38
53
  program.parse();
39
54
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B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CAAC;KAC3D,MAAM,CAAC,iBAAiB,EAAE,8BAA8B,CAAC;KACzD,MAAM,CAAC,UAAU,EAAE,sCAAsC,CAAC;KAC1D,MAAM,CAAC,MAAM,CAAC,CAAC;AAElB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,8CAA8C,CAAC;KAC3D,MAAM,CAAC,UAAU,EAAE,iDAAiD,EAAE,IAAI,CAAC;KAC3E,MAAM,CAAC,WAAW,EAAE,8CAA8C,CAAC;KACnE,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnB,OAAO,CAAC,KAAK,EAAE,CAAC"}
package/dist/render.d.ts CHANGED
@@ -10,7 +10,11 @@ interface RenderOptions {
10
10
  output?: string;
11
11
  open?: boolean;
12
12
  stdout?: boolean;
13
+ apiUrl?: string;
14
+ apiKey?: string;
15
+ model?: string;
16
+ llm?: boolean;
13
17
  }
14
- export declare function render(options: RenderOptions): void;
18
+ export declare function render(options: RenderOptions): Promise<void>;
15
19
  export {};
16
20
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAQA,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA0DD,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CA8BnD"}
1
+ {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAYA,UAAU,aAAa;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAiED,wBAAsB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CA4ClE"}
package/dist/render.js CHANGED
@@ -1,10 +1,14 @@
1
1
  /**
2
2
  * Render MCP tool schema or data as a self-contained HTML page.
3
+ *
4
+ * LLM config resolution order:
5
+ * CLI flags > env vars > ~/.mcp-html-bridge/config.json > no LLM (structural)
3
6
  */
4
7
  import { readFileSync, writeFileSync, mkdirSync } from 'node:fs';
5
8
  import { join } from 'node:path';
6
9
  import { execSync } from 'node:child_process';
7
- import { renderFromSchema, renderFromData } from '@mcp-html-bridge/ui-engine';
10
+ import { renderFromSchema, renderFromData, renderFromDataSync } from '@mcp-html-bridge/ui-engine';
11
+ import { resolveLLMConfig } from './config.js';
8
12
  function loadJSON(options) {
9
13
  let raw;
10
14
  if (options.schema) {
@@ -21,7 +25,6 @@ function loadJSON(options) {
21
25
  parsed.type === 'object' && parsed.properties;
22
26
  return { json: parsed, detectedMode: isSchema ? 'schema' : 'data' };
23
27
  }
24
- // Try reading from stdin if piped
25
28
  try {
26
29
  raw = readFileSync('/dev/stdin', 'utf-8');
27
30
  if (raw.trim()) {
@@ -32,33 +35,12 @@ function loadJSON(options) {
32
35
  }
33
36
  }
34
37
  catch {
35
- // Not piped, ignore
38
+ // Not piped
36
39
  }
37
- console.error(' Error: No input provided.');
38
- console.error(' Use --schema <file>, --data <file>, --json <string>, or pipe via stdin.');
40
+ console.error('Error: No input. Use --schema, --data, --json, or pipe via stdin.');
39
41
  process.exit(1);
40
42
  }
41
- function buildHTML(json, mode, options) {
42
- if (mode === 'schema') {
43
- return renderFromSchema(json, {
44
- title: options.title ?? options.toolName ?? 'MCP Tool Input',
45
- toolName: options.toolName,
46
- toolDescription: options.toolDesc,
47
- debug: options.debug ?? true,
48
- });
49
- }
50
- return renderFromData(json, {
51
- title: options.title ?? options.toolName ?? 'MCP Tool Result',
52
- toolName: options.toolName,
53
- toolDescription: options.toolDesc,
54
- debug: options.debug,
55
- });
56
- }
57
- export function render(options) {
58
- const { json, detectedMode } = loadJSON(options);
59
- const mode = options.mode ?? detectedMode;
60
- const html = buildHTML(json, mode, options);
61
- // --stdout: print raw HTML to stdout (for embedding in response streams)
43
+ function writeAndOpen(html, options) {
62
44
  if (options.stdout) {
63
45
  process.stdout.write(html);
64
46
  return;
@@ -77,8 +59,51 @@ export function render(options) {
77
59
  execSync(`${cmd} "${outPath}"`, { stdio: 'ignore' });
78
60
  }
79
61
  catch {
80
- // Silently fail if can't open browser
62
+ // Can't open browser
81
63
  }
82
64
  }
83
65
  }
66
+ export async function render(options) {
67
+ const { json, detectedMode } = loadJSON(options);
68
+ const mode = options.mode ?? detectedMode;
69
+ if (mode === 'schema') {
70
+ const html = renderFromSchema(json, {
71
+ title: options.title ?? options.toolName ?? 'MCP Tool Input',
72
+ toolName: options.toolName,
73
+ toolDescription: options.toolDesc,
74
+ debug: options.debug ?? true,
75
+ });
76
+ writeAndOpen(html, options);
77
+ return;
78
+ }
79
+ // Resolve LLM config (CLI flags > env vars > config file)
80
+ // --no-llm forces structural rendering
81
+ const llm = options.llm === false
82
+ ? undefined
83
+ : resolveLLMConfig({
84
+ apiUrl: options.apiUrl,
85
+ apiKey: options.apiKey,
86
+ model: options.model,
87
+ });
88
+ if (llm) {
89
+ console.error(` LLM: ${llm.model} @ ${llm.apiUrl}`);
90
+ const html = await renderFromData(json, {
91
+ title: options.title ?? options.toolName ?? 'MCP Tool Result',
92
+ toolName: options.toolName,
93
+ toolDescription: options.toolDesc,
94
+ debug: options.debug,
95
+ llm,
96
+ });
97
+ writeAndOpen(html, options);
98
+ }
99
+ else {
100
+ const html = renderFromDataSync(json, {
101
+ title: options.title ?? options.toolName ?? 'MCP Tool Result',
102
+ toolName: options.toolName,
103
+ toolDescription: options.toolDesc,
104
+ debug: options.debug,
105
+ });
106
+ writeAndOpen(html, options);
107
+ }
108
+ }
84
109
  //# sourceMappingURL=render.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.js","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAgB9E,SAAS,QAAQ,CAAC,OAAsB;IACtC,IAAI,GAAW,CAAC;IAEhB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;QACnB,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAC5C,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC;IAC3D,CAAC;IAED,IAAI,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AO,CAAC,KAAK,CAAC,UAAU,GAAG,CAAC,KAAK,MAAM,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;QACrD,MAAM,IAAI,GAAG,MAAM,cAAc,CAAC,IAAI,EAAE;YACtC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,IAAI,iBAAiB;YAC7D,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,eAAe,EAAE,OAAO,CAAC,QAAQ;YACjC,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,GAAG;SACJ,CAAC,CAAC;QACH,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,GAAG,kBAAkB,CAAC,IAAI,EAAE;YACpC,KAAK,EAAE,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,QAAQ,IAAI,iBAAiB;YAC7D,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,eAAe,EAAE,OAAO,CAAC,QAAQ;YACjC,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;QACH,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC9B,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-html-bridge/claude-skill",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "description": "Claude Code skill for MCP-HTML-Bridge — render MCP tool data as interactive HTML pages",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",