Skip to main content
Glama
hakowan-mcp
by Hakowan

Hakowan MCP

Provider-neutral agent integration for Hakowan.

hakowan-mcp exposes Hakowan's deterministic inspection, schema, validation, compilation, rendering, observation, camera-fitting, and patch operations over MCP. Model selection, credentials, conversation state, and reasoning remain the responsibility of the MCP host.

Install

Requires Python 3.11+ and Hakowan 0.6.x.

pip install hakowan-mcp

Optional observation support:

pip install 'hakowan-mcp[observe]'
playwright install chromium

Related MCP server: NOETRA

Run

hakowan-mcp --root /path/to/project

Streamable HTTP:

hakowan-mcp --root /path/to/project \
  --transport streamable-http --host 127.0.0.1 --port 8000

Connect clients to http://127.0.0.1:8000/mcp. The server has no built-in authentication, so keep it on loopback unless an authenticated proxy protects it.

See docs/mcp.md for tools, resources, prompts, host configuration, path confinement, and transport details.

Add to AI harnesses

Use the stdio server with an absolute project root. The root is the security boundary for every file Hakowan reads or writes.

Claude Code:

claude mcp add --scope project --transport stdio hakowan -- \
  hakowan-mcp --root /absolute/path/to/project

Codex:

codex mcp add hakowan -- hakowan-mcp --root /absolute/path/to/project

Oh My Pi reads the following project-level .mcp.json directly. Pi reads it after pi install npm:pi-mcp-adapter; Cursor uses the same content at .cursor/mcp.json:

{
  "mcpServers": {
    "hakowan": {
      "type": "stdio",
      "command": "hakowan-mcp",
      "args": ["--root", "/absolute/path/to/project"]
    }
  }
}

For GitHub Copilot in VS Code, place the same server entry under servers instead of mcpServers in .vscode/mcp.json. In any harness, use its /mcp command or server list to confirm the connection. See docs/mcp.md for transports, tools, path confinement, and the recommended agent workflow.

Token-efficient by design

Hakowan MCP avoids repeatedly sending full schemas, specifications, and observation manifests through the model context. Agents begin with compact schema catalogs and focused templates, then chain calls through content-addressed spec_id handles and request detailed payloads only when needed. This keeps routine visualization workflows substantially smaller than passing complete FigureSpec documents between every tool call.

The optional evaluator for canonical FigureSpec JSON is documented in docs/evaluation.md.

Responsibility boundary

Hakowan owns the schema and deterministic visualization behavior. This package owns MCP transport, agent instructions, gallery grounding, host execution, and LLM evaluation. It imports Hakowan's public APIs and does not fork its schema or validator.

The initial implementation was extracted from Hakowan commit 1012b00. This release targets the Hakowan 0.6 series and CI verifies compatibility with v0.6.0.

LLM benchmark

Verify the evaluator with its deterministic reference provider:

hakowan-mcp-eval --provider reference

Expected: 21/21 passed (100.0%), plus llm-eval-report.json and llm-eval-report.html.

Benchmark a real model through isolated, MCP-only Oh My Pi sessions, then score the captured responses:

python -m hakowan_mcp.eval.mcp_harness \
  --model github-copilot/gpt-5-mini \
  --gallery ../hakowan-gallery \
  --output /tmp/hakowan.responses.json \
  --keep-events

hakowan-mcp-eval --provider replay \
  --responses /tmp/hakowan.responses.json \
  --json /tmp/hakowan.report.json \
  --html /tmp/hakowan.report.html

The harness prints per-case progress and stores replay data plus optional event streams. The scorer prints N/21 passed (P.P%); JSON and HTML reports contain stage and intent scores. Add --observe for browser-backed occupancy checks. See docs/evaluation.md for all options.

Available Tools

13 tools
apply_patchC
Read-onlyIdempotent

Apply patches and return a spec_id; include JSON only on request.

Inputs: spec (required), operations (required), strict, backend, +3 more. Returns: object

compile_specB
Read-onlyIdempotent

Compile a FigureSpec and return resolved view and overlay metadata.

Inputs: spec (required), data_bindings. Returns: object

evaluate_visual_patchD
Idempotent

Compare compact evidence; include full specs/manifests only on request.

Inputs: spec (required), operations (required), output_dir (required), views, +5 more. Returns: object

fit_cameraC
Read-onlyIdempotent

Fit scene.camera from a validated spec_id while preserving intent.

Inputs: spec (required), fov, margin, backend, +7 more. Returns: object

get_backendsA
Read-onlyIdempotent

Return declared features and limitations for every rendering backend.

Inputs: no named parameters. Returns: object

get_schemaC
Read-onlyIdempotent

Return compact guidance; use fragment='full' only as a last resort.

Inputs: fragment, include_dependencies. Returns: object

get_specA
Read-onlyIdempotent

Resolve a session-local content-addressed FigureSpec handle.

Inputs: spec_id (required). Returns: object

get_spec_templateC
Read-onlyIdempotent

List or return minimal canonical FigureSpec templates.

Inputs: name, data_id, attribute, categories, +1 more. Returns: object

inspect_dataB
Read-onlyIdempotent

Inspect a workspace mesh before selecting attributes.

Inputs: source (required). Returns: object

observe_specC
Idempotent

Capture PNG output and compact visual evidence from a FigureSpec.

Inputs: spec (required), output_dir (required), views, passes, +5 more. Returns: object

render_specB
Idempotent

Render an interactive or backend-native artifact when explicitly requested.

Inputs: spec (required), output (required), strict, backend, +2 more. Returns: object

validate_specC
Read-onlyIdempotent

Validate and return a spec_id; include canonical JSON only on request.

Inputs: spec (required), strict, backend, include_spec, +2 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 13 tools

    Disambiguation4/5

    The tools are mostly distinct by resource and action, especially the pipeline stages: validate, compile, observe, render, patch, and evaluate. The only mild ambiguity is among get_schema, get_spec_template, and get_spec, though their descriptions do enough to guide selection.

    Naming Consistency5/5

    Every tool follows a consistent verb_noun snake_case pattern, such as get_spec, validate_spec, compile_spec, and apply_patch. There are no vague single-word names or mixed conventions.

    Tool Count5/5

    Thirteen tools is within the ideal scope for a specification-and-rendering server. Each tool maps to a distinct stage in the workflow, from schema exploration and validation to rendering and patch evaluation.

    Completeness5/5

    The tool surface covers the full FigureSpec lifecycle: creation from templates, validation, retrieval, compilation, observation, rendering, patching, and visual evaluation. No critical workflow dead ends are evident for the stated domain.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents and software to create, edit, inspect, validate, and export CAD geometry through MCP using backend-neutral typed operations, with FreeCAD/OpenCascade as the authoritative B-rep backend and JSCAD preview.
      2
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI hosts to retain evidence, check explicit constraints, plan bounded work, and record outcomes through local-first MCP operations. Optional reconstruction tools also support experimental image-to-3D workflows with local model providers and Blender.
      37 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      This MCP server enables clients and agents to validate, compile, inspect, audit, and export hash-locked video production context packs and evidence-chain job records, with optional ComfyUI or HTTP API generation when explicitly invoked.
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      Enables MCP hosts to create and modify Plasticity 3D models through higher-level skills and relational placement, read open documents, and verify results using mesh geometry checks, overlap detection, and viewport analysis.
      29
      MIT