@mcp-html-bridge/claude-skill 0.3.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.
@@ -1,55 +1,33 @@
1
- You are the rendering decision-maker for MCP tool results. You analyze data semantically and choose the best visualization — or decide that no GUI rendering is needed.
1
+ You are the rendering decision-maker for MCP tool results. You analyze data and decide whether a GUI rendering would benefit the user — or if plain text is sufficient.
2
2
 
3
3
  ## Your Role
4
4
 
5
- You are NOT a pattern matcher. You understand what the data means, who needs to see it, and how it should be presented. The rendering engine (`mcp-html-skill`) is just your toolbox you decide what tool to pick.
5
+ MCP-HTML-Bridge is a **generic MCP GUI wrapper**. It supports two rendering modes:
6
6
 
7
- ## Decision Framework
8
-
9
- When the user asks to render MCP tool output (or you see tool results that would benefit from visualization), follow this process:
10
-
11
- ### Step 1: Understand the Data
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.)
12
9
 
13
- Read the JSON. Ask yourself:
14
- - What does this data represent? (products, metrics, config, logs, comparison, narrative, error...)
15
- - Who is the audience? (developer debugging, end user browsing, analyst reviewing)
16
- - What's the user trying to do with this data? (compare, explore, overview, drill down)
10
+ ## Decision Framework
17
11
 
18
- ### Step 2: Decide — GUI or Not?
12
+ ### Step 1: Decide — GUI or Not?
19
13
 
20
14
  **Skip GUI rendering when:**
21
15
  - Data is a simple success/failure status or short message
22
16
  - Data is a single scalar value or very small object (< 5 fields)
23
17
  - The user is debugging and just wants to see raw JSON
24
18
  - The data is an error response — just explain the error
25
- - A text summary would be more helpful than a visual
26
19
 
27
20
  **Use GUI rendering when:**
28
- - Data has tabular structure that benefits from sorting/scanning
21
+ - Data has tabular structure, nested objects, or complex content
29
22
  - There are many items to compare or browse
30
- - Numbers benefit from visual formatting (prices, percentages, KPIs)
31
- - The structure is complex enough that a tree view aids navigation
32
- - A form would help the user construct input for a tool
33
-
34
- If you decide to skip GUI, just present the data as formatted text/table in your response. Say why you skipped visual rendering.
35
-
36
- ### Step 3: Choose a Renderer
23
+ - The data contains rich content (SVG, markdown, HTML, images, code)
24
+ - The user explicitly asks for a visual/HTML rendering
37
25
 
38
- | Renderer | Use When | Examples |
39
- |---|---|---|
40
- | `data-grid` | Tabular data where columns matter. Comparison tables, search results, inventory lists, leaderboards. | Product comparison, user list, log entries |
41
- | `metrics-card` | Dashboard-style overview with key numbers. Small set of important KPIs. | Platform stats, account summary, daily metrics |
42
- | `json-tree` | Developer-facing deep/heterogeneous structures. Config dumps, API responses, debug output. | Nested config, raw API response, schema inspection |
43
- | `reading-block` | Narrative text, analysis, recommendations. Long-form content that needs formatting. | AI analysis, recommendation text, documentation |
44
- | `composite` | Mixed data: some numbers + some tables + some text. The data has distinct semantic sections. | Tool result with summary + details + recommendations |
45
- | `form` | User needs to provide input for an MCP tool. Use with `--schema`. | Tool input forms |
26
+ ### Step 2: Render
46
27
 
47
- **Your choice should be based on semantics, not shape.** An array of objects could be a `data-grid` (product list) or `composite` (if each object is a rich recommendation with pros/cons). A flat object could be `metrics-card` (KPIs) or `json-tree` (config dump). You decide based on meaning.
48
-
49
- ### Step 4: Render
50
-
51
- Write the JSON data to a temp file, then call the renderer with your explicit choice:
28
+ Write the JSON data to a temp file, then call the renderer.
52
29
 
30
+ **With LLM semantic rendering (recommended for rich data):**
53
31
  ```bash
54
32
  cat <<'MCPJSON' > /tmp/mcp-render-input.json
55
33
  <THE_JSON_DATA>
@@ -57,74 +35,66 @@ MCPJSON
57
35
 
58
36
  mcp-html-skill render \
59
37
  --data /tmp/mcp-render-input.json \
60
- --renderer <your-choice> \
61
38
  --title "<descriptive title>" \
62
- --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>" \
63
50
  --open
64
51
  ```
65
52
 
66
- For schema/form rendering:
53
+ **For schema/form rendering:**
67
54
  ```bash
68
55
  mcp-html-skill render \
69
56
  --schema /tmp/mcp-schema.json \
70
57
  --title "<title>" \
71
- --tool-name "<tool_name>" \
72
58
  --open
73
59
  ```
74
60
 
75
61
  If `mcp-html-skill` is not in PATH:
76
62
  ```bash
77
- npx @mcp-html-bridge/claude-skill render --data /tmp/mcp-render-input.json --renderer <choice> --open
63
+ npx @mcp-html-bridge/claude-skill render --data /tmp/mcp-render-input.json --open
78
64
  ```
79
65
 
80
- ### Step 5: Explain
66
+ ### Step 3: Explain
81
67
 
82
68
  After rendering, briefly tell the user:
83
- - What renderer you chose and why
84
69
  - The file path (from command output)
85
70
  - What they'll see when they open it
86
71
 
87
- ## Renderer Reference
72
+ ## LLM Providers
88
73
 
89
- | Flag value | Full document | Sortable | Dark mode |
90
- |---|---|---|---|
91
- | `data-grid` | Yes | Yes (click headers) | Yes |
92
- | `metrics-card` | Yes | No | Yes |
93
- | `json-tree` | Yes | No (collapsible) | Yes |
94
- | `reading-block` | Yes | No | Yes |
95
- | `composite` | Yes | Mixed | Yes |
96
- | `auto` | Yes | Depends | Yes |
74
+ The `--api-url` flag accepts any OpenAI-compatible endpoint:
97
75
 
98
- Use `auto` only as a last resort when you genuinely can't decide. It falls back to heuristic pattern matching — which is what we're trying to avoid.
76
+ | Provider | API URL |
77
+ |---|---|
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` |
99
83
 
100
84
  ## Options
101
85
 
102
86
  | Flag | Description |
103
87
  |---|---|
104
- | `--renderer <type>` | **Your choice.** data-grid, metrics-card, json-tree, reading-block, composite, auto |
105
88
  | `--data <file>` | Input JSON data file |
106
89
  | `--schema <file>` | Input JSON Schema (renders as form) |
90
+ | `--json <string>` | Inline JSON string |
107
91
  | `--title <title>` | Page title |
108
92
  | `--tool-name <name>` | MCP tool name |
109
- | `--debug` | Add LLM playground panel |
93
+ | `--debug` | Add debug playground panel |
110
94
  | `--open` | Auto-open in browser |
111
95
  | `--stdout` | Print raw HTML to stdout |
112
-
113
- ## Examples of Good Decisions
114
-
115
- **Product comparison table** → `data-grid`
116
- "This is a comparison across multiple products with consistent dimensions. A sortable table lets the user scan and compare at a glance."
117
-
118
- **Platform dashboard stats** → `metrics-card`
119
- "These are high-level KPIs (total products, active merchants, avg commission). Large formatted numbers with labels communicate this best."
120
-
121
- **AI recommendation with analysis** → `composite`
122
- "This has a text analysis section, a ranked list of recommendations each with pros/cons, and a budget summary. Multiple renderers composed together."
123
-
124
- **Deeply nested API config** → `json-tree`
125
- "This is a raw configuration object. A developer needs to drill into specific paths. Collapsible tree with search is ideal."
126
-
127
- **Simple 'ok' status** → Skip GUI
128
- "This is just `{ status: 'success', message: 'Created' }`. No need to generate a whole HTML page — I'll just tell the user it succeeded."
96
+ | `--api-url <url>` | LLM API base URL |
97
+ | `--api-key <key>` | LLM API key |
98
+ | `--model <model>` | LLM model name |
129
99
 
130
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,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;YAC/F,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,GAAG,CAAC,mCAAmC,IAAI,EAAE,CAAC,CAAC;YACvD,OA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C,MAAM,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC;QAC9B,OAAO,CAAC,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC1D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,UAAU,CAAC,EAAE,GAAG,QAAQ,EAAE,GAAG,EAAE,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,YAAY,aAAa,EAAE,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC;IACvC,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC;AACzF,CAAC"}
@@ -0,0 +1,27 @@
1
+ export interface BridgeConfig {
2
+ llm?: {
3
+ apiUrl: string;
4
+ apiKey?: string;
5
+ model: string;
6
+ };
7
+ }
8
+ /** Read config from ~/.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":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,kBAAkB,CAAC,CAAC;AACvD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;AAUpD,sDAAsD;AACtD,MAAM,UAAU,UAAU;IACxB,IAAI,CAAC;QACH,IAAI,UAAU,CAAC,WAAW,CAAC,EAAE,CAAC;YAC5B,MAAM,GAAG,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-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.1.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)')
30
- .option('--renderer <type>', 'Explicit renderer: data-grid | metrics-card | json-tree | reading-block | composite | auto')
34
+ .option('--mode <mode>', 'Force render mode: schema | data')
31
35
  .option('--title <title>', 'Page title')
32
- .option('--tool-name <name>', 'Tool name for bridge protocol')
36
+ .option('--tool-name <name>', 'Tool name')
33
37
  .option('--tool-desc <desc>', 'Tool description')
34
38
  .option('--debug', 'Enable debug playground panel')
35
39
  .option('--output <dir>', 'Output directory', '/tmp/mcp-html-bridge')
36
40
  .option('--open', 'Open in browser after rendering')
37
- .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')
38
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);
39
53
  program.parse();
40
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,OAAO;KACJ,IAAI,CAAC,gBAAgB,CAAC;KACtB,WAAW,CAAC,uCAAuC,CAAC;KACpD,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,OAAO;KACJ,OAAO,CAAC,SAAS,CAAC;KAClB,WAAW,CAAC,oEAAoE,CAAC;KACjF,MAAM,CAAC,UAAU,EAAE,iDAAiD,EAAE,IAAI,CAAC;KAC3E,MAAM,CAAC,WAAW,EAAE,8CAA8C,CAAC;KACnE,MAAM,CAAC,OAAO,CAAC,CAAC;AAEnB,OAAO;KACJ,OAAO,CAAC,QAAQ,CAAC;KACjB,WAAW,CAAC,+CAA+C,CAAC;KAC5D,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AO,CAAC,KAAK,EAAE,CAAC"}
package/dist/render.d.ts CHANGED
@@ -3,7 +3,6 @@ interface RenderOptions {
3
3
  data?: string;
4
4
  json?: string;
5
5
  mode?: 'schema' | 'data';
6
- renderer?: string;
7
6
  title?: string;
8
7
  toolName?: string;
9
8
  toolDesc?: string;
@@ -11,7 +10,11 @@ interface RenderOptions {
11
10
  output?: string;
12
11
  open?: boolean;
13
12
  stdout?: boolean;
13
+ apiUrl?: string;
14
+ apiKey?: string;
15
+ model?: string;
16
+ llm?: boolean;
14
17
  }
15
- export declare function render(options: RenderOptions): void;
18
+ export declare function render(options: RenderOptions): Promise<void>;
16
19
  export {};
17
20
  //# sourceMappingURL=render.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"render.d.ts","sourceRoot":"","sources":["../src/render.ts"],"names":[],"mappings":"AAWA,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,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,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;AA+DD,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI,CAqCnD"}
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,11 +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';
8
- const VALID_RENDERERS = ['data-grid', 'metrics-card', 'json-tree', 'reading-block', 'composite', 'auto'];
10
+ import { renderFromSchema, renderFromData, renderFromDataSync } from '@mcp-html-bridge/ui-engine';
11
+ import { resolveLLMConfig } from './config.js';
9
12
  function loadJSON(options) {
10
13
  let raw;
11
14
  if (options.schema) {
@@ -22,7 +25,6 @@ function loadJSON(options) {
22
25
  parsed.type === 'object' && parsed.properties;
23
26
  return { json: parsed, detectedMode: isSchema ? 'schema' : 'data' };
24
27
  }
25
- // Try reading from stdin if piped
26
28
  try {
27
29
  raw = readFileSync('/dev/stdin', 'utf-8');
28
30
  if (raw.trim()) {
@@ -33,43 +35,12 @@ function loadJSON(options) {
33
35
  }
34
36
  }
35
37
  catch {
36
- // Not piped, ignore
38
+ // Not piped
37
39
  }
38
- console.error(' Error: No input provided.');
39
- 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.');
40
41
  process.exit(1);
41
42
  }
42
- function buildHTML(json, mode, options) {
43
- const rendererChoice = options.renderer && options.renderer !== 'auto'
44
- ? options.renderer
45
- : undefined;
46
- if (mode === 'schema') {
47
- return renderFromSchema(json, {
48
- title: options.title ?? options.toolName ?? 'MCP Tool Input',
49
- toolName: options.toolName,
50
- toolDescription: options.toolDesc,
51
- debug: options.debug ?? true,
52
- });
53
- }
54
- return renderFromData(json, {
55
- title: options.title ?? options.toolName ?? 'MCP Tool Result',
56
- toolName: options.toolName,
57
- toolDescription: options.toolDesc,
58
- debug: options.debug,
59
- renderer: rendererChoice,
60
- });
61
- }
62
- export function render(options) {
63
- // Validate renderer choice
64
- if (options.renderer && !VALID_RENDERERS.includes(options.renderer)) {
65
- console.error(` Error: Unknown renderer "${options.renderer}".`);
66
- console.error(` Available: ${VALID_RENDERERS.join(', ')}`);
67
- process.exit(1);
68
- }
69
- const { json, detectedMode } = loadJSON(options);
70
- const mode = options.mode ?? detectedMode;
71
- const html = buildHTML(json, mode, options);
72
- // --stdout: print raw HTML to stdout (for embedding in response streams)
43
+ function writeAndOpen(html, options) {
73
44
  if (options.stdout) {
74
45
  process.stdout.write(html);
75
46
  return;
@@ -88,8 +59,51 @@ export function render(options) {
88
59
  execSync(`${cmd} "${outPath}"`, { stdio: 'ignore' });
89
60
  }
90
61
  catch {
91
- // Silently fail if can't open browser
62
+ // Can't open browser
92
63
  }
93
64
  }
94
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
+ }
95
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;AAG9E,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,cAAc,EAAE,WAAW,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;AAiBzG,SAAS,QAAQ,CAAC,OAAsB;IACtC,IAAI,GAAW,CAAC;IAEhB,IAAI,OAA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E;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.3.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",