mcp-server

v7.6.0
@hyperfixi/mcp-server Checked 13 hours ago Published 21 days ago

Model Context Protocol server for HyperFixi hyperscript development

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

search_patterns

Search the pattern database by keyword, optionally within one category (events, dom-manipulation, class-manipulation, visibility, forms, async, etc.). Unlike get_examples which takes task descriptions, this searches pattern names and content.

ParameterTypeDescription
query *stringSearch query (e.g., "modal", "form validation", "infinite scroll")
categorystringFilter by category (e.g., "class-manipulation", "visibility", "async")
limitnumberMaximum number of patterns to return

translate_to_english

Normalize non-English hyperscript to English. Returns English code plus explicit bracket syntax. Set getAllLanguages=true to get all 24 translations at once. Use when you receive code in Japanese, Korean, Arabic, etc. Code the parse cannot carry whole is refused (refused: true, with `lost` and the `partial` English), never returned as `english`.

ParameterTypeDescription
code *stringHyperscript code in source language
sourceLanguage *stringSource language code (ja, ko, es, ar, etc.)
getAllLanguagesbooleanIf true, return translations for all supported languages

get_code_fixes

Get available auto-fixes for a specific error code or diagnostic — the repair half of the agent loop. When validate_and_compile reports a coded error, this returns LSP-compatible CodeFix suggestions to apply before re-validating.

ParameterTypeDescription
diagnosticCodestringDiagnostic code from get_diagnostics (e.g., "parse-error", "missing-role")
errorCodestringA diagnostic code from validate_and_compile, translate_code or score_fidelity (e.g., "ENGINE_PARSE_ERROR", "UNCONSUMED_INPUT")
listAllbooleanIf true, list all available error codes that have fixes

get_diagnostics

Analyze hyperscript code and return LSP-compatible diagnostics with line/column ranges (errors, warnings, hints). English is checked by the engine that runs the code: a parse error is reported at the token where it stopped. Other languages (24 in all) are checked by the semantic parser.

ParameterTypeDescription
code *stringThe hyperscript code to analyze
languagestringLanguage code (en, ko, ja, es, zh, ar, tr, pt, fr, de, id, qu, sw, etc.). Default: en
uristringOptional document URI for caching (default: "inline")

get_command_docs

Get documentation for a specific hyperscript command. Returns syntax, description, and usage details.

ParameterTypeDescription
command *stringThe command name (e.g., "toggle", "add", "fetch")

get_expression_docs

Get documentation for hyperscript expression types. Returns description, category, operators, and examples.

ParameterTypeDescription
expression *stringThe expression name (e.g., "attribute-ref", "query-reference", "it")

list_supported_languages

List all supported languages with their metadata (name, native name, direction, word order)

ParameterTypeDescription
includeDetailsbooleanInclude full metadata for each language (default: true)

get_keyword_translations

Get translations of a specific keyword/command across languages

ParameterTypeDescription
keyword *stringThe English keyword to look up (e.g., "toggle", "add", "remove", "put")
languagesarrayOptional: specific languages to include. If omitted, returns all languages.

validate_and_compile

START HERE when generating hyperscript: parse into semantic IR with diagnostics. Returns action, roles, and trigger structure so you can check the parse matches your intent. Accepts natural language (code + language), explicit bracket syntax (explicit, e.g. "[toggle patient:.active destination:#btn]"), or LLM JSON (semantic: { action, roles, trigger }). Natural-language input must also parse on @hyperfixi/engine, the engine that runs it (ENGINE_PARSE_ERROR when it does not); for English the engine decides ok, and doubts from the semantic parser (LOW_CONFIDENCE, an unread role) are warnings tha…

ParameterTypeDescription
codestringNatural language hyperscript
confidencenumberMinimum confidence
explicitstringExplicit syntax
languagestringLanguage code
semanticobjectLLM JSON

translate_code

Translate hyperscript between any of 24 languages via full semantic parsing — deterministic grammar transformation (SVO/SOV/VSO word order), not LLM translation. Every result carries a `verification` report (the output scored against the source via score_fidelity): verification.faithful === true is the claim "this rendering is structurally exact", so present it alongside the translation when showing code to a user for review. A variable the target language reads as a pronoun or another value word (tl `ako` is `me`) comes back as a NAME_COLLISION warning with a rename: rename it in the source…

ParameterTypeDescription
code *stringHyperscript code to translate
from *stringSource language code
to *stringTarget language code

score_fidelity

Score a candidate hyperscript snippet against a reference for structural fidelity — the multilingual CI ratchet's deterministic scorers applied to one pair. Returns actionRecall/multisetRecall/precision/roleFidelity/valueRecall (each 0–1), plus the exact missing/spurious actions and lost invariant values (e.g. a silently rewritten target: toggle.destination=#panel). Sides accept any input format and may be in DIFFERENT languages, so it also verifies a translation preserved meaning. Use after editing or translating code to prove the result faithful; diff_behaviors answers identical-or-not,…

ParameterTypeDescription
candidate *objectThe side being checked (same shape as reference)
reference *objectThe trusted side (code/explicit/semantic + language)
confidencenumberMinimum confidence threshold

diff_behaviors

Compare two hyperscript inputs at the behavior level. Returns whether they are semantically identical, trigger diffs, and per-operation diffs. Works across languages and input formats.

ParameterTypeDescription
a *objectFirst input (code, explicit, or semantic)
b *objectSecond input (code, explicit, or semantic)
confidencenumberMinimum confidence threshold

detect_domain

Auto-detect which registered domain handles the input. Tries all domains (sql, todo, behaviorspec, llm, flow, voice) and returns the best match by confidence score.

ParameterTypeDescription
input *stringThe natural-language input to classify
languagestringLanguage code (en, es, ja, ar, ko, zh, tr, fr). Default: en

compile_auto

Auto-detect domain and compile in one shot. Returns compiled output along with the detected domain name.

ParameterTypeDescription
input *stringThe natural-language input to compile
languagestringLanguage code (en, es, ja, ar, ko, zh, tr, fr). Default: en