ChatGPT and Claude (MCP)¶
The plugin's explorer also works without Claude Code. A remote MCP server gives ChatGPT, Claude (web and desktop) or any MCP client the same method and the same checks: the assistant explores a public GitHub repository, writes the architecture model, validates it against the explorer's own validator and the ontology's SHACL shapes, exports it as RDF, and draws the explorer inline in the chat as an MCP Apps view.

The view in a test host that speaks the MCP Apps protocol (ext-apps AppBridge, sandbox proxy, the spec's CSP). In ChatGPT and Claude it appears under the assistant's message; ⤢ expand opens it full screen or in Claude's side panel.
The server lives in mcp/ and reads the
explorer template, its references and the ontology from the repository at startup, so the chat version and the
plugin cannot drift apart. It is stateless: every call carries the whole model, and nothing about it is stored.
Connect it¶
You need the URL of a running server, such as https://<your-space>.hf.space/mcp (see Host it).
- Customize → Connectors → Add → Add custom connector (on Team and Enterprise plans an Owner adds it under Organization settings → Connectors).
- Name it, paste the server URL ending in
/mcp, choose No sign-in (unless you setMCP_BEARER_TOKEN), then Add. - In a chat, turn the connector on from the + menu → Connectors.
Custom connectors work on Free (one connector), Pro, Max, Team and Enterprise plans. Interactive views render on Claude's web and desktop apps.
- Open chatgpt.com/plugins, click +, then Add custom MCP server.
- Give it a name and a description, enter the server URL including
/mcp, choose no authentication (unless you setMCP_BEARER_TOKEN), and Create as a plugin. - Review the tools ChatGPT found. After a server update, open the plugin and Refresh.
Whether you can add custom servers depends on your plan and workspace settings (an administrator may have to allow them, or developer mode may need to be on).
Remote: claude mcp add --transport http c4-explorer https://<your-server>/mcp
Local, without hosting anything (stdio):
The MCP Inspector connects the same ways.
Then ask, for example:
Map the architecture of github.com/owner/repo as a C4 explorer. I'm onboarding a new backend developer.
The connector also offers this as a prompt (explore_github_repository), plus model_from_description for a system
you describe in the chat instead of a repository.
What the assistant does¶
get_methodonce: the exploration method (adapted from theexplore-projectskill for a chat without a shell), the MODEL schema (data model) and a summary of the ontology.- Explores with
github_tree,github_read_fileandgithub_search, asks you its questions once, and writes the model from evidence, citing paths and lines. When the data matters, it reads the schema files (migrations, JSON Schema, OpenAPI, ontologies, JSON-LD contexts) and turns them into the model's data layer withimport_schema. validate_modelwith the repository until there are no errors: the explorer's validator, SHACL on the RDF graph, the layout check (arrows behind boxes), and everypathandlinechecked against GitHub.show_explorer: the explorer, in the chat.- On request:
export_rdf(Turtle, JSON-LD, N-Triples,.rete),build_explorer_page(the standaloneindex.html),query_sparqlover the graph.
Tools¶
| Tool | Does |
|---|---|
get_method |
Method, MODEL schema, ontology summary (part: method, schema, ontology, all). |
github_tree |
Files of a public repository at a ref, to a depth; vendored and generated folders collapsed. |
github_read_file |
A file or a line range, with line numbers (up to 1,000 lines a call). |
github_search |
Paths and contents of up to 200 small text files per call, substring or regex. |
validate_model |
Validator, SHACL, layout, and (with repo, root) paths and lines against GitHub. |
export_rdf |
ttl, jsonld, nt as text; rete as an embedded binary resource. |
model_from_rdf |
A graph (nt, ttl, jsonld, or .rete as base64) back to the MODEL. |
show_explorer |
The interactive view; view picks the level, open boxes, selection, tab (data for the Data view), an entity or entity.field to select there, scenario, style, theme and flows (scenario ids painted on the map); history adds the timeline. The library icons the model names (tabler:…, si:…) travel with the result, since the view loads nothing itself. |
build_explorer_page |
The standalone page as an embedded text/html resource (about 1.2 MB, more with embedded images), with the library icons the model names written into it, as build-explorer.mjs does. |
import_schema |
Schema files as text (SQL DDL, JSON Schema, OpenAPI 3 in JSON, OWL / RDFS / SHACL, JSON-LD contexts; up to 40 in one call) → the model's schemas, entities and relations. With model, the drift against its entities and the validator's verdict on the merged model. |
list_elements, get_element, list_relationships, get_layout, query_sparql |
The explorer's own agent tools that read a model, with the model as an argument: the boxes, one box with its relationships (each with its index), the relationships, the grid cells of a group, SPARQL over the graph. |
edit_model |
The page's edit operations as a function: a model and a list of edits (add, connect, change, rename, move to another box or grid cell, group, delete boxes; change or delete relationships), all or none, back the edited model, checked with the validator. |
list_schemas, get_entity |
The same for the data layer: the schemas and where each lives; one entity with its fields, lines in and out, and the steps and arrows that read or write it. |
search_icons |
Icons for a box, an arrow, a schema or a scenario, by words or for an element (for): on the server, the built-in set and the model's own icons. Any tabler:<name> or si:<slug> reference also works in a model. |
get_mermaid |
The map as Mermaid text, flowchart (TB or LR) or C4, for a level, the boxes given open, or the model's opening view: for a README, a pull request or an issue. |
Resources: the method, data-model.md, rdf-graph.md, features.md, the explore-project skill files, c4.ttl,
c4-data.ttl, c4-view.ttl, c4-shapes.ttl, EXTENDING.md, a generated ontology summary and the example model, for
clients that attach resources.
The view¶
The view is the explorer page itself (ui://c4-explorer/explorer.html, text/html;profile=mcp-app), generated
from the template at startup: the web fonts are removed, a small bridge script is added after the engine, and the
model arrives with the tool call. Nothing in it touches the network, so its declared
Content Security Policy lists no
domains at all.
- Drawing. The bridge uses the official
Appclass of@modelcontextprotocol/ext-apps(protocol2026-01-26). Onui/notifications/tool-inputandtool-resultit restarts the engine with the model, exactly as the page's own editor does (ARCH_EXPLORER.teardown(), thenarchEngine()), then appliesview. - Size. Inline it asks for 620 px (less if the host caps it) and reports it with
ui/notifications/size-changed; a compact toolbar keeps the map large, and the details panel (a bottom sheet in a narrow view) and the minimap start folded. ⤢ expand requests full screen (ui/request-display-mode); there the view fills what the host gives it and brings the panel and the minimap back, unless you folded or unfolded them yourself. - Downloads. Chat apps block downloads from their frames, so every export of the page (SVG, PNG, HTML, JSON-LD,
Turtle, the editor's
model.jsand page) goes through the host's download dialog (ui/download-file). A.retefile is built by the server (export_rdf, called from the view) instead of fetching the builder from a CDN.model.jsis saved asmodel.js.txt, because Claude refuses.jsdownloads. - Links to the source open through the host (
ui/open-link); the host's light or dark theme is followed while the reader's theme isauto. - Images. The view draws
data:image/…images only: its CSP lets it load nothing from outside, and it has no folder next to the model. Anhttpsimage is shown as a card with its alt text and an open ↗ link, which opens through the host; a relative path (img/…) as a card saying the file is not available in the chat. The server does not fetch images on the model's behalf: no request leaves the server for a URL a model names (no server-side request forgery, no tracking pixel), and the model the view exports stays exactly the one it was given. To show a picture in the chat, pass it as a data URI (keep it small: the model is limited to 1.5 MB of JSON, and models up to 100 KB travel inside the tool result). The bundled example (c4-explorer://examples/image-annotation-tool/model.json) carries its wireframes that way. - Icons. The view draws the icons the model names: built-in ones from the page, library ones sent with the tool result, data URIs. It loads no icon itself, so there the editor's icon picker offers the built-in set, your own SVG and a reference typed by hand, not the online libraries.
- Mermaid. The map's Mermaid panel (
G) opens in the view too, without its preview: the preview needs mermaid.js from a CDN, and the view loads nothing. The text, Copy and the downloads work. - Agents. The view also offers the explorer's agent tools to the chat's
assistant as MCP Apps app tools, so it can open a level, select boxes or connections (
select_relationships), show a scenario, paint flows (show_flows), open the Data view on a table or a field (show_data), hide or zoom to boxes, get what the map shows as Mermaid text (get_mermaid), or change the model (each change asked in the view, as in the page) in the view you have open. Claude offers app tools to a limited set of organizations so far. - History. With
history(ahistory.jsonfrom the history skill) the view shows the history bar along its bottom edge, the version list and compare mode; without it the bar stays hidden.
Where a chat has no MCP Apps support, show_explorer still answers with a text summary and points to
build_explorer_page and export_rdf.
Privacy and security¶
- Stateless. Models, graphs and histories exist only for the duration of a call. The server logs the tool name, the outcome and the time it took, never arguments.
- GitHub. Only
api.github.com(repository metadata, file trees) andraw.githubusercontent.com(file contents) are contacted, only when the assistant calls a GitHub tool orvalidate_modelwithrepo. Public repositories only; private ones are refused even if the server's token could read them. Fetched files are cached in memory for ten minutes (48 MB at most). - Icons. For
show_explorerandbuild_explorer_page, the library icons a model names (tabler:…,si:…) come from a local npm package or the server's disk cache, else from jsDelivr at pinned versions (Tabler Icons 3.51.0, Simple Icons 16.37.0); a request names one icon file and carries nothing else of the model.C4_ICONS_NO_FETCH=1keeps the server off jsDelivr: icons not in the cache then draw as placeholders. Vendor cloud icon sets (AWS, Azure, GCP) are never fetched. - Untrusted content. Repository files can contain text written to steer an AI. The GitHub tools say so in their
descriptions and mark their output as untrusted data; the agent tools that return page text carry the same
caution and WebMCP's
untrustedContentHint. - The view runs in the chat's sandboxed frame with a CSP that allows no external origin, and asks for no camera, microphone, location or clipboard.
- A public server has no sign-in by default. Set
MCP_BEARER_TOKENto require a token (supported by clients that send custom headers), and keep the per-client rate limit on.
Limits¶
| What | Limit |
|---|---|
| Model (any tool) | 1.5 M characters of JSON; 1,500 boxes, 4,000 arrows, 60 scenarios; 60 schemas, 2,000 entities of up to 500 fields, 4,000 relations |
import_schema |
3 M characters in all, 40 files |
Model inside the show_explorer result |
100 K characters (larger models reach the view through the tool arguments) |
RDF input to model_from_rdf |
4 M characters |
github_read_file |
1 MB per file, 1,000 lines or 100 K characters per call |
github_search |
200 files of up to 512 KB per call, 200 results |
query_sparql |
10 s, 500 rows |
| HTTP | 6 MB per request, 120 requests per minute per client (configurable) |
Claude passes a tool result inline up to about 150,000 characters; above that (with code execution on) it stores the
result as a file, and a view would not receive it. show_explorer stays well under that for models of a few hundred
boxes. build_explorer_page returns about 1.2 MB, so in Claude it usually lands as a file to download.
Host it¶
The server is one Node process (Node 20+), configured by environment variables (PORT, HOST, GITHUB_TOKEN,
MCP_BEARER_TOKEN, RATE_LIMIT, ALLOWED_HOSTS, …; see the
server README).
- Docker:
docker build -f mcp/Dockerfile -t c4-explorer-mcp .from the repository root, thendocker run -p 7860:7860 c4-explorer-mcp. - Hugging Face Space: create a Space with the Docker SDK and add the two files in
mcp/deploy/huggingface/; the endpoint ishttps://<user>-<space>.hf.space/mcp. - To try a local server from a hosted chat, expose it with a tunnel (for example
npx cloudflared tunnel --url http://localhost:3000) and shut the tunnel down afterwards.
WebMCP: agents in the browser¶
WebMCP lets a web page offer tools to an AI agent running in the browser, with no server. The pages this plugin produces use it when the browser has it:
- The explorer registers its agent tools: read the model, move the view (open levels and boxes, hide boxes, zoom,
select connections), find icons, and change the model (add, connect, change, move, group and delete boxes and arrows, many at once, undo), each change
shown to you in a bar on the page before it is made. Agents without WebMCP (Claude Code through Claude in Chrome,
Playwright) call the same tools with
window.archTools.call(…). See Agents in the page: browser support (November 2026), how to turn it on, examples, the safety model and the full tool list. - The deck registers
get_outline,get_slide_text,go_to_slide,next_slideandprevious_slide.
The explorer's tools are defined once, in the template (window.ARCH_TOOLS), and used by WebMCP in the page, as app
tools in the MCP view, and by this server for the ones that read a model (and edit_model). Both pages detect the API:
without it nothing is registered and nothing changes.