xeer-mcp

v0.2.41
@impetik/xeer-mcp Checked 1 day ago Published 15 days ago

Model Context Protocol server for Xeer project context, diagnostics, scaffold, check, test, dev, build, and preview deployment.

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

xeer_agent_context Read normalized Xeer project context

Read the bounded, deterministic, versioned project context without writing generated files. Returns normalized manifest facts, source zones, operations, diagnostics, tests, safe next actions, resources, and a stable content hash.

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.

xeer_check Check a Xeer project

Validate a Xeer project and return its diagnostics as JSON. This is the repair loop: read diagnostics, apply the smallest edit each one names, run it again, converge on ok: true. A Xeer application runs manifest, module graph, zone, operation, and type analysis. Its result is { manifest }. A framework project delegates its check script and returns { framework, config, check }. Diagnostic codes are stable. Look one up with xeer_diagnostics.

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.

xeer_build Build a Xeer project

Build the content-addressed artifact. Runs check first, so build diagnostics are a superset of check diagnostics plus bundling, budget, and asset codes (XE14xx, XE15xx). A Xeer application returns { artifactId, outputDirectory, modules, assets, operations }. A framework project returns { framework, artifactId, outputDirectory, modules, assets }. Framework results omit operations because the framework owns its routes and build contract. Run xeer_test before this to prove behavior as well as compilation.

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.

xeer_test Run a Xeer project's tests

Run the project's own tests. A Xeer application builds, type-checks every tests/**/*.ts module against the generated contract, boots the artifact in workerd with fresh state, runs every registered test, and tears down. A framework project delegates its package test script. Returns { exitCode, ok, reason?, total, passed, failed, durationMs?, files, cases, diagnostics, events }. Each failed case carries a Diagnostic-shaped failure with matcher, expected, actual, and the project-relative test location: XE1904 assertion, XE1905 threw or unexpectedly refused call, XE1906 timeout. A diagnostics entr…

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.
timeoutMillisecondsinteger

xeer_new Scaffold a Xeer project

Create a new Xeer project in an empty or non-existent directory. Every template checks, tests, and builds clean, so use one as the starting point rather than writing a manifest by hand. "notes" (the default) and "todo" are per-user apps, "blog" is public to read and private to write, and "personal-site" has no database at all. None of them scaffolds sign-in UI. "ui" selects "preact" or "react" for a bundled starter only. Catalog templates own their renderer and reject "ui" with XE3013. "framework" is the other axis and is exclusive with "template": "sveltekit" writes a SvelteKit project with x…

ParameterTypeDescription
directory *stringTarget directory, relative to the server root. Must be empty or absent.
frameworkstringScaffold a fresh project for this framework instead of a Xeer application: it declares xeer.config.json, owns its own renderer and routes, and delegates check, dev, test, and build to its package scri…
templatestringA bundled starter name, the bundled emdash framework template, or an exact template catalog id. Defaults to notes. Bundled names resolve offline. Exclusive with framework, which is refused with XE3005…
uistringWhich UI provider the written manifest selects. Defaults to preact, and omitting it writes no client block at all. Applies only to bundled starters. Catalog templates reject it with XE3013, and framew…

xeer_doctor Diagnose the Xeer toolchain

Check the local toolchain and generated-file state. Use it when a command fails for a reason no project edit explains. result is { checks, summary }; failures also appear as XE4001 diagnostics.

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.

xeer_deploy_preview Deploy a Xeer preview

Build, verify, and upload the artifact to the preview environment. This tool never changes production. It accepts a credential established by `xeer auth login` or a service token supplied in XEER_SERVICE_TOKEN. result is { application, url, ... } for the app's side-by-side preview URL; production keeps serving, and preview has its own disposable state.

ParameterTypeDescription
controlUrlstringAllowed control-plane origin override. The hosted Xeer origin is allowed by default; additional exact HTTPS or loopback development origins must be preconfigured.
directorystringProject directory. Relative paths resolve against the server root; defaults to it.

xeer_auth_status Report builder sign-in status

Report whether a builder credential is available for deployment. A person can establish it with `xeer auth login`, or a service can use XEER_SERVICE_TOKEN. Interactive sign-in cannot be completed by an agent.

ParameterTypeDescription
controlUrlstringAllowed control-plane origin override.

xeer_inspect Inspect a running preview

Read the inspector API of a running dev or preview server: normalized manifest (manifest), per-table record counts (state), the bounded structured log ring (logs), or every stored record with the schema that describes it (export). Use the URLs from xeer_dev_status.preview.

ParameterTypeDescription
previewUrl *stringLoopback URL from preview.ready, hosted https://<app>.xeer.run origin, application name, or appId.
afterstringLog cursor, for view: "logs".
viewstring

xeer_dev_start Start a dev session

Start `xeer dev --json` and return the xeer.dev.v0 events it emitted up to the point it settled. Returns when preview.ready arrives (status "ready"), or when the first compile fails (status "compile_failed", openDiagnostics populated). Port 0 by default, so the real URL is in preview.ready. Keep the returned cursor and pass it to xeer_dev_status after each edit. You do not need a dev session to repair diagnostics: xeer_check is the same compiler.

ParameterTypeDescription
directorystringProject directory. Relative paths resolve against the server root; defaults to it.
hoststringDefaults to 127.0.0.1.
portintegerDefaults to 0 (OS-assigned).
sharebooleanPublish the session through an authenticated Xeer tunnel.
timeoutMillisecondsinteger

xeer_dev_status Read new dev-session events

Read the xeer.dev.v0 events emitted since `cursor`, then return the session summary. After editing a file, call this with waitMilliseconds set: the CLI coalesces changes behind a 75 ms quiet window, rebuilds, and emits compile.start, any compile.diagnostic, and compile.ready when the rebuild is accepted. openDiagnostics is the outcome of the latest attempt, so an empty openDiagnostics with a higher generation means the edit was accepted.

ParameterTypeDescription
cursorintegerLast seq you have already read.
limitinteger
sessionIdstringOptional when only one session exists.
waitMillisecondsintegerWait up to this long for new events to arrive and settle.

xeer_dev_stop Stop a dev session

Stop a dev session over the documented xeer.dev.control.v0 IPC shutdown, releasing the local state lease. Always stop sessions you started: the lease is per project and mode, so a leaked session blocks the next dev run with XE1812.

ParameterTypeDescription
cursorinteger
sessionIdstringOptional when only one session exists.

xeer_diagnostics Look up Xeer diagnostic codes

Explain one diagnostic code: what the platform observed and which edit closes it. Pass the exact XE#### emitted by the command; this lookup intentionally never returns the whole catalogue.

ParameterTypeDescription
code *stringAn XE#### code, e.g. XE1202.