Tilt MCP Server
MCP (Model Context Protocol) server for Tilt CLI integration, enabling AI assistants to interact with Tilt development workflows.
Features
Status Monitoring: Real-time status of Tilt resources with summary counts
Resource Management: List, describe, enable, disable, and trigger resources
Log Access: Access logs from Tilt resources with ANSI stripping, tail limits, and optional client-side search
Verbose Actions: Optional
verboseresponses on control tools to return updated resource stateWebSocket Client: Real-time updates via Tilt's WebSocket API
Safe Execution: Secure CLI wrapper with timeout and buffer limits
LLM-Optimized Responses: Slim resource format, pagination, and status filtering
Available Tools
Tool | Description |
| Get Tilt session status summary (counts by status + errors) |
| List resources with filtering, pagination, and slim/verbose modes |
| Get detailed information about a resource (cleaned format) |
| View logs from resources (plain-text output); supports client-side search;
filters Tilt system messages only (not app logs); see docs/log-filtering-behavior.md |
| Manually trigger a resource update (add
to include updated resource state) |
| Enable a disabled resource (add
to include updated resource state) |
| Disable a resource (add
to include updated resource state) |
| Set or clear Tiltfile arguments |
| Wait for resources to reach a ready state (add
for a slim status summary) |
βΉοΈ tilt_dump is implemented and tested but intentionally not registered for MCP use because the raw engine state can exceed 6MB and needs further shaping for Agent consumption. Use only after tailoring output for your client.
π¦ Connection configuration: Set TILT_PORT in your .mcp.json server config (under env) or export it in your shell. TILT_HOST defaults to localhost if not set. Tools will fail fast if port is missing; host/port inputs are not exposed to avoid cross-instance mistakes.
π Discovery note: The previous tilt_discover helper was removed. Configure TILT_PORT/TILT_HOST explicitly instead of relying on discovery.
Prerequisites
Installation
Quick Install for Claude Code
The fastest way to use this MCP server with Claude Code is via npx or bunx:
Understanding the command:
--transport stdio: Run as a local process (required for stdio-based MCP servers)--env TILT_PORT=10350: Set the Tilt API port (required; adjust if your Tilt uses a different port)--: Separates Claude's flags from the MCP server commandnpx -y @0xbigboss/tilt-mcporbunx @0xbigboss/tilt-mcp: Automatically downloads and runs the latest version
Optional environment variables:
Verify installation:
Using the tools:
Once installed, you can ask Claude Code to interact with Tilt:
Note: This requires the package to be published to npm. For local development, see the Building a Standalone Executable section below.
Usage
As MCP Server
The server communicates via stdio transport:
Configure in Claude Desktop
Add to your Claude Desktop MCP configuration:
Note: TILT_HOST defaults to localhost. Only set it explicitly if connecting to a remote Tilt instance.
Connection Configuration
Required: define
TILT_PORTin your MCP serverenvblock in.mcp.json(or export it before starting the server).Optional:
TILT_HOSTdefaults tolocalhostif not explicitly set.Typical local setup:
TILT_PORT=10350(host defaults to localhost)Tools do not accept host/port parameters; set them once in configuration to avoid cross-instance mistakes.
Values are validated and the server fails fast if port is missing or invalid.
Building a Standalone Executable
To create a standalone executable that can be added to your PATH:
The standalone executable includes the Bun runtime and all dependencies, making it portable and easy to distribute.
Using the Standalone Executable
Once installed to your PATH, you can run it directly:
Development
Common Tool Examples
List resources with slim summaries:
tilt_get_resourceswith no args (addstatus: "error"orverbose: trueas needed).Tail Tilt hints only:
tilt_logswithlevel: "error"(filters Tilt system messages; app logs are returned unfiltered).Manage Tiltfile args safely:
tilt_argswithmode: "get"to view,mode: "set", args: ["arg1=value"]to update, ormode: "clear"to reset (avoid running without arguments).Trigger and inspect a resource in one call:
tilt_triggerwithverbose: trueto include the updated resource state.Wait with post-state snapshot:
tilt_waitwithresources: ["api"], verbose: trueto receive a slim readiness summary after the wait.
Project Structure
Architecture
CLI Client
The TiltCliClient provides safe command execution:
No shell execution: Uses
spawn()with argument arraysTimeout handling: Configurable timeouts with process termination
Buffer limits: 10MB default, 50MB for logs
Error parsing: Typed errors (TiltNotRunningError, TiltResourceNotFoundError, etc.)
Response Design
Slim by default: resources are returned in a compact βslimβ format with optional
verboseto include full details.Tailored logs: ANSI stripping with a default
tailLinescap;levelfilters Tilt system messages only.Reduced noise: build history truncated to the last two entries and duplicate endpoints deduped.
Control tools with state:
tilt_enable,tilt_disable,tilt_trigger, andtilt_waitacceptverboseto return post-action state.
WebSocket Client
The TiltWebSocketClient connects to Tilt's WebSocket API for real-time updates:
Log line streaming
Resource status updates
Event callbacks with unsubscribe support
Input Validation
All tool inputs are validated using Zod schemas:
Resource names: Kubernetes naming conventions (plus special Tilt
(Tiltfile))Arguments: Shell injection prevention
Testing
The project includes comprehensive tests:
Unit tests for all tools and clients
Integration tests for MCP protocol compliance
Mock fixtures for Tilt CLI responses
Troubleshooting
Tiltfile args fixture: If Tilt reports
You specified some resources that could not be found: "--foo", "bar", clear stored Tiltfile args viatilt_args(mode="clear"). This scenario is used in QA coverage to validate error handling and is not a code defect.Log level filtering: The
levelflag ontilt_logsfilters Tilt system messages only. Application logs are returned unfiltered; seedocs/log-filtering-behavior.mdfor details, search examples, and limitations.
License
MIT
This server cannot be installed