Use Tavo.js with AI coding agents
Connect MCP-compatible AI agents to versioned Tavo.js documentation, API metadata, component guidance, and optional read-only project inspection.
Give agents exact Tavo.js context
Tavo.js MCP gives an AI coding agent a structured, searchable view of Tavo.js. The agent can discover Framework APIs, Tavo.js UI components, semantic tokens, and task-oriented guides instead of relying on generic framework assumptions.
Local mode can also inspect and verify a Tavo.js application through its project-local CLI. Model Context Protocol (MCP) is the connection between the AI client and Tavo.js; it does not replace the AI client or edit source code itself.
Connect locally
Tavo.js MCP runs through npm without a global installation. Add the following server definition to the configuration used by your MCP client:
json{
"mcpServers": {
"tavo": {
"command": "npx",
"args": [
"--yes",
"@tavojs/mcp",
"--project",
"/absolute/path/to/tavo-app"
]
}
}
}MCP client configuration formats differ, but the command and arguments are portable. Replace the example path with an absolute path to the target application. The application must provide a project-local @tavojs/cli package, which exposes the tavo binary.
Omit --project and its path to keep the local server documentation-only.
Choose a connection mode
| Mode | Best for | Project data | Capabilities |
|---|---|---|---|
| Local stdio | Working inside a Tavo.js application | Remains on the developer's machine | Public knowledge plus project context, inspection, and verification |
| Self-hosted Streamable HTTP | Serving public Tavo.js knowledge to remote clients | No project data accepted | Public documentation, APIs, components, and prompts |
Use local stdio for coding work because it can align guidance with the installed Tavo.js version and actual project structure. The npm package also includes a stateless HTTP transport for operators who want to host public documentation access. HTTP mode never accepts a project path or exposes project tools.
What agents can use
Public Tavo.js knowledge
| Tool | Purpose |
|---|---|
search_tavo | Search guides, APIs, components, and tokens by task. |
get_tavo_document | Read one documentation record by stable ID. |
find_tavo_components | Find UI components by intent, behavior, or accessibility need. |
lookup_tavo_api | Find public Framework or Tavo.js UI symbols and package entry points. |
Local project context
| Tool | Purpose | Safety boundary |
|---|---|---|
get_tavo_project_context | Read compact, task-bounded project conventions. | Allowlisted agent-context CLI command |
inspect_tavo_project | Inspect a route, component, store, file, plugin, or API. | Allowlisted inspect command and path validation |
verify_tavo_project | Run diagnostics for the project or selected changed files. | Restricted verification without project scripts |
The server also exposes versioned resources under tavo:// and reusable prompts for building features, choosing UI components, and diagnosing projects. Tool responses default to 2,048 tokens and accept a maxTokens budget from 256 to 8,192.
Keep project verification read-only
A normal project typecheck script is arbitrary project code: despite its name, it can write files, access the network, or perform another side effect.
The adapter rejects incompatible Framework CLI versions rather than silently falling back to verification that could execute project scripts. Documentation compatibility is reported alongside project tool results.
How documentation reaches the server
The server bundles a validated public documentation snapshot and never reads the Tavo.js Website repository at runtime:
textTavo.js Website editorial source
→ export a validated public documentation manifest
→ bundle and index the snapshot in @tavojs/mcp
→ expose version and content hash to the MCP clientDocumentation updates require a new validated snapshot and MCP release. The runtime needs neither Website source nor Website credentials.
Safety and privacy
All MCP tools are read-only; the AI host remains responsible for changes and user approval.
HTTP mode never accepts --project and cannot inspect a developer's application.
Local inspection uses validated project-relative paths and only the allowlisted agent-context, inspect, and verify CLI machine commands.
Internal documentation and credentials are excluded from the bundled public content manifest.
Custom content manifests must pass schema and size validation before indexing.
The server cannot generate, change, build, or install project code.
Troubleshooting
| Problem | What to check |
|---|---|
| No project tools | Use local stdio and pass an absolute application path with --project. |
| Project configuration fails | Confirm the application has a compatible project-local @tavojs/cli package and can run its tavo machine commands. |
| Guidance looks stale | Read tavo://status and compare the content hash and package compatibility report. |
| A response is truncated | Follow its continuation resource or request a larger maxTokens value. |