MCP server
Connect
The hosted endpoint:
Add it to ~/.config/claude-code/mcp.json (or the equivalent for your client) under mcpServers:
If your tenant gates the server behind a bearer token, add it as a header:
Once registered, prompts like “list every route in this project” or “validate this .tibi snippet before I save it” fire the tools below instead of guessing.
The endpoint speaks the Streamable HTTP transport (POST / for JSON-RPC, GET / for the SSE channel) on a single root URL, so it also adds cleanly as a Claude Desktop / claude.ai custom connector — paste the URL above as-is, with no /mcp suffix and no OAuth (auth is bearer-token only, and only when your tenant sets one).
Available tools
Every tool is read-only — none write to disk or shell out.
tibi_about
Server identity, version, and the configured public URL. Useful to confirm an LLM is talking to the project you think it is.
tibi_routes
Walks the project's pages/ dir through the same router tibi serve uses. One line per route: <url_pattern> <file>. Flags (404 fallback) / (500 fallback) and dynamic params ({slug}, *rest) inline.
tibi_channels
Walks every .tibi file in pages/ + components/ and surfaces any __channels frontmatter. Returns <name> <interval_ms> <payload> per channel — the same shape tibi serve reads to spawn tick tasks.
tibi_stores
Every [[store]] entry from .tibi-config with its default TTL. Tells the LLM which client-store namespaces exist (and which keys carry which lifetime) without parsing the config itself.
tibi_crons
Every [[cron]] entry: <name> <schedule> <file>. Mirrors the cron table tibi serve spawns.
tibi_plugins
Every script plugin under [server] plugins_dir. Returns <name> <lang> <file> so the client knows what hooks fire at startup.
tibi_packages
Every packaged plugin (the two-file tibi-plugin.toml + tibi-plugin.tpkg bundles) under [server] plugins_dir. Returns <name> <version> <prefix*-from-dir> <path>; the prefix column tells the client what tag namespace the package contributes (e.g. Ti*<-components means every file there resolves as <Ti{Tag}/>).
tibi_file_format
Returns the canonical authoring spec for a .tibi file: required <template> wrapper, optional <style> / <script>, the <script tibi> opt-in for the reactive surface, frontmatter fence rules, and common authoring mistakes. Call this before hand-writing or editing .tibi sources.
tibi_validate
Pass a raw .tibi source string and the server runs the real parser against it. Surfaces structural errors (missing template, unterminated blocks) plus heuristics for the most common LLM-authoring mistake — using reactive helpers (state / effect / onMount / emit) in a plain <script> tag that lacks the tibi attribute.
Authoring rules an LLM should follow
Surface the spec via tibi_file_format before any edit. The high-bit rules:
- Top-level
<template>is mandatory. Bare HTML at the file top isn't valid. - Reactivity (
state/computed/effect/onMount/emit/$route/ template directives like{{expr}}/:attr/t-show/t-bind/t-if/t-for) only exists inside<script tibi>. A plain<script>won't see them. - Component tags are
CamelCase; lowercase tags are treated as native HTML. - Frontmatter fence:
---/---js/---ts/---py/---rsat the very top, closed with---.result = { ... }exposes top-level keys to the template as{ident}tokens.
tibi_validate catches both parser-level mistakes and the “forgot the tibi attribute” class of bug.
Self-host (optional)
The MCP server ships as the tibi-mcp binary in the standard Tibi CLI install. Run it against a project root if you'd rather host your own (air-gapped, private repo, custom auth in front):
The knobs:
TIBI_PROJECT_DIR— absolute path to the project root (where.tibi-configlives). Required.TIBI_MCP_BIND— address to listen on. Defaults to0.0.0.0:3300.TIBI_MCP_AUTH_TOKEN— optional bearer required on every request. Constant-time compare so probes can't time-leak it. Skip for local dev; set it if you expose the port to anything other than127.0.0.1.TIBI_MCP_PUBLIC_URL— surfaced intibi_about+ the docs page so clients know the live origin (e.g.https://tibi-mcp.services.strands.gg).
Server is read-only by design — every tool returns derived information; none write to disk or hit the network. If you put it on the public internet, terminate TLS in front and set TIBI_MCP_AUTH_TOKEN.
Embed it in your own service
The transport and tools are also a library, the tibi_mcp crate, so a service can mount the same endpoint with its own sign-in and its own tools. Implement McpHandler: authenticate turns each request into a caller (or returns the response to send back, such as a 401 with your WWW-Authenticate challenge), tools lists what that caller may use, and call_tool runs one. tibi_mcp::router wraps it in the Streamable HTTP endpoint, ready to nest under any path.
ProjectTools is the read-only tibi_* set above, and BearerToken is the shared-token gate the binary uses, both reusable on their own. The tibi-mcp binary is exactly this, with BearerToken and ProjectTools wired from the environment.