Skill Tracer
Skills › Visual Explainer › visual-explainer › README.md

README.md

78 lines · plugins/visual-explainer/mcp/README.md at 9d5f880

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Visual Explainer MCP server
2
3This directory contains the local Model Context Protocol server for visual-explainer.
4

Visual Explainer MCP server

This directory contains the local Model Context Protocol server for visual-explainer.

Raw lines 1 to 4
Uses an outside tool MCP :1
5## Scope
6
7The server is stdio-only. It is meant for MCP hosts that launch a local child process.
8It does not start an HTTP listener, handle credentials, call an LLM, or store output outside the local machine.
9
10Rendered files are written only inside the configured output directory. The default is `~/.agent/diagrams/`. Set `VISUAL_EXPLAINER_OUTPUT_DIR` to move that jail to another directory on the same machine; unset keeps the default path byte-identical. A configured jail must resolve to itself, so symlinked jail paths, including macOS `/tmp`, are rejected before anything is created. The default directory follows a symlinked `~/.agent`. Render targets reject existing symlinks and are written through a temporary file rename. Choose a directory only your user can write; avoid world-writable or group-writable shared folders so another local user cannot replace render targets between validation and write. Filenames must be basenames. Paths, traversal, control characters, and symlink targets are rejected.
12A page can hold a state-machine model (`<ve-flow>` with a `<script type="text/plain" model>`), which is code the render runs. The server refuses it unless started with `VISUAL_EXPLAINER_RUN_MODELS=1`. With it set, a page's model runs as Node with this server's permissions, importing from the `root` argument or the server's working directory; set it only when every client that can call the render tool is trusted.

Scope

The server is stdio-only. It is meant for MCP hosts that launch a local child process. It does not start an HTTP listener, handle credentials, call an LLM, or store output outside the local machine.

Rendered files are written only inside the configured output directory. The default is ~/.agent/diagrams/. Set VISUAL_EXPLAINER_OUTPUT_DIR to move that jail to another directory on the same machine; unset keeps the default path byte-identical. A configured jail must resolve to itself, so symlinked jail paths, including macOS /tmp, are rejected before anything is created. The default directory follows a symlinked ~/.agent. Render targets reject existing symlinks and are written through a temporary file rename. Choose a directory only your user can write; avoid world-writable or group-writable shared folders so another local user cannot replace render targets between validation and write. Filenames must be basenames. Paths, traversal, control characters, and symlink targets are rejected.

A page can hold a state-machine model (<ve-flow> with a <script type="text/plain" model>), which is code the render runs. The server refuses it unless started with VISUAL_EXPLAINER_RUN_MODELS=1. With it set, a page's model runs as Node with this server's permissions, importing from the root argument or the server's working directory; set it only when every client that can call the render tool is trusted.

Raw lines 5 to 13
Uses an outside tool MCP :7
14## Run from a package install
16```json
18 "mcpServers": {
19 "visual-explainer": {
20 "command": "visual-explainer-mcp"
21 }
22 }
24```

Run from a package install

{
  "mcpServers": {
    "visual-explainer": {
      "command": "visual-explainer-mcp"
    }
  }
}
Raw lines 14 to 25
26## Run from a checkout
28Install dependencies first:
30```bash
31npm install --no-package-lock
32```
34Then point the host at the server entry:
36```json
38 "mcpServers": {
39 "visual-explainer": {
40 "command": "node",
41 "args": ["/absolute/path/to/visual-explainer/plugins/visual-explainer/mcp/server.mjs"]
42 }
43 }
45```

Run from a checkout

Install dependencies first:

npm install --no-package-lock

Then point the host at the server entry:

{
  "mcpServers": {
    "visual-explainer": {
      "command": "node",
      "args": ["/absolute/path/to/visual-explainer/plugins/visual-explainer/mcp/server.mjs"]
    }
  }
}
Raw lines 26 to 46
47## Exposed tools
49- `visual_explainer_prepare`: returns a recommended visual explanation flow. It does not write files.
50- `visual_explainer_render_html`: validates a complete HTML document and writes it to the configured output directory (default `~/.agent/diagrams/`).
52Render defaults to `open: false`. Set `open: true` only when you want the server to request a browser or Glimpse window.

Exposed tools

  • visual_explainer_prepare: returns a recommended visual explanation flow. It does not write files.
  • visual_explainer_render_html: validates a complete HTML document and writes it to the configured output directory (default ~/.agent/diagrams/).

Render defaults to open: false. Set open: true only when you want the server to request a browser or Glimpse window.

Raw lines 47 to 53
54## Exposed prompts
56The server exposes the bundled command templates as MCP prompts:
58- `generate-web-diagram`
59- `generate-visual-plan`
60- `generate-slides`
61- `generate-video`
62- `diff-review`
63- `plan-review`
64- `project-recap`
65- `compare`
66- `fact-check`
67- `state-machine`
69Pass `request` to fill the template's `$@` argument.

Exposed prompts

The server exposes the bundled command templates as MCP prompts:

  • generate-web-diagram
  • generate-visual-plan
  • generate-slides
  • generate-video
  • diff-review
  • plan-review
  • project-recap
  • compare
  • fact-check
  • state-machine

Pass request to fill the template's $@ argument.

Raw lines 54 to 70
Uses an outside tool MCP :56
71## Exposed resources
73The server exposes read-only resources for the canonical skill, its references, the kit stylesheet, and command templates:
75- `visual-explainer://skill/SKILL.md`
76- `visual-explainer://references/*.md`
77- `visual-explainer://kit/kit.css`
78- `visual-explainer://commands/*.md`

Exposed resources

The server exposes read-only resources for the canonical skill, its references, the kit stylesheet, and command templates:

  • visual-explainer://skill/SKILL.md
  • visual-explainer://references/*.md
  • visual-explainer://kit/kit.css
  • visual-explainer://commands/*.md
Raw lines 71 to 78