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 to the hosted server
For instant documentation access, connect your MCP client to the public Tavo.js Streamable HTTP endpoint:
texthttps://mcp.tavojs.dev/mcpClients that accept JSON server definitions can use this common configuration shape. The filename and settings location depend on your client; merge the tavo entry into any existing server list:
json{
"mcpServers": {
"tavo": {
"url": "https://mcp.tavojs.dev/mcp"
}
}
}Reload the client's MCP connections after saving. Ask it to search Tavo.js documentation for “pages and layouts” and return the guide link. A successful tool response confirms the connection. Opening this URL in a browser is not an MCP connection test; the endpoint expects protocol requests from a compatible client.
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.
bash# Run from the application directory before enabling project tools.
node --version
npm install
npx tavo --version
npx tavo verify --no-project-scripts --jsonRestart the MCP connection after changing the project path. Ask the client to read tavo://status: local project mode should report project.configured: true. Compare the installed package versions with the documentation snapshot before using a new API. A mismatch is a signal to verify the installed API; it does not automatically update your project or select a different documentation snapshot.
Choose a connection mode
| Mode | Best for | Project data | Capabilities |
|---|---|---|---|
| Local stdio | Working inside a Tavo.js application | Read locally; inspection results are returned to the AI client | Public knowledge plus project context, inspection, and verification |
| Hosted Streamable HTTP | Instant public Tavo.js knowledge for remote clients | No project data accepted | Public documentation, APIs, components, and prompts |
| Self-hosted Streamable HTTP | Operating a private public-knowledge endpoint | 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.
Local transport describes where the MCP process runs. Your AI client may send returned source excerpts and diagnostics to its model provider according to its own settings. For self-hosting instructions, see the MCP deployment guide.
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, 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.
Use documentation and project context together
Start with a focused task so the agent can retrieve the relevant guide, then inspect only the files that need to change. These prompts can be used in sequence with a local project connection:
Read tavo://status and report any package-version mismatch. Search the Tavo.js docs for a form with validation and summarize the documented pattern with links.
Get project context for adding a settings form. Inspect the existing route and its related components, then explain the files and state changes needed.
After the code has been changed through my coding client, verify the changed project-relative files with verify_tavo_project and explain every diagnostic.
Pass route targets as the patterns reported by tavo routes, such as /projects/:id, and file targets relative to the configured application such as src/pages/projects/[id].tsx. The absolute path belongs only in the server's --project configuration. A successful restricted verify result covers Tavo.js diagnostics; run your project's typecheck, tests, and production build separately to validate the feature.
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 |
|---|---|
| The client cannot start npx | Check that Node.js and npm are installed and visible to the AI client's process. Restart the client after changing PATH, or configure the absolute path to npx. |
| The hosted URL shows an error in a browser | Connect through an MCP client with Streamable HTTP support and test search_tavo. A browser GET is not the MCP initialization handshake. |
| 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. Documentation is bundled per MCP release, so changing the website alone does not update an already running MCP server. |
| File inspection rejects a path | Use a path relative to the configured project without .. segments. Absolute paths and symlinks escaping the project are rejected. |
| A response is truncated | Follow its continuation resource or request a larger maxTokens value. |