Tilt MCP Server is a Model Context Protocol (MCP) server that integrates Tilt, providing programmatic access to Tilt resources and logs through LLM applications. Its core value is: users no longer need to explain to the LLM how to build and deploy code; they only need to have the LLM make code changes, and then call the Tilt MCP server to get real-time feedback, thereby saving a large number of LLM tokens (time and cost), and avoiding the LLM actually performing build/deploy operations. Tilt itself is a powerful tool for handling Docker/Kubernetes workloads.
Usage: This MCP server follows the Model Context Protocol specification and provides three types of capabilities: Resources, Tools, and Prompts.
Resources (read-only data) are automatically discovered by MCP clients via URI, and support an optional tilt_port parameter (default 10350) to query different Tilt instances. For example: tilt://resources/all gets all resources on the default port; tilt://resources/frontend/logs gets the last 1000 lines of logs for frontend; tilt://resources/frontend/logs?tail=100&tilt_port=10351 gets the last 100 lines of logs for frontend under the specified port; tilt://resources/backend/logs?filter=error filters logs by error; tilt://resources/backend/describe gets detailed information for backend.
Tools (operations with side effects) allow the LLM to perform operations that modify the state of the Tilt environment. Read-only tools (list_resources, get_resource_logs, describe_resource) have the same functionality as the resources above, but are exposed as tools to be compatible with LLM clients that do not fully support MCP resource discovery (such as Claude Code). All tools support an optional tilt_port parameter.
Prompts (guided workflows) are reusable templates that guide the LLM through common debugging and troubleshooting workflows.
All capabilities include comprehensive error handling: resource not found throws ValueError; Tilt connection issues throw RuntimeError; JSON parsing errors provide detailed information. All operations are logged to ~/.tilt-mcp/tilt_mcp.log.
Main capabilities include: resource discovery (list all active Tilt resources and their statuses); log retrieval (configurable tail to get recent logs); resource triggering (manually trigger rebuild/update); resource control (dynamically enable/disable); detailed information (get comprehensive details for a resource); wait conditions (wait for a resource to reach a specific state); guided workflows (preset prompt templates). Technical features: type safety (Python type hints), asynchronous support (fully asynchronous based on FastMCP), adherence to MCP best practices, comprehensive logging.
Installation requirements: Python 3.10 or higher (required by FastMCP 2.0), Tilt installed and configured, an MCP-compatible client (such as Claude Desktop, mcp-cli). Three installation methods are provided: Docker (recommended for macOS/Windows, no Python environment required, automatically stays up to date, uses Alpine Linux to optimize size, automatically discovers the Tilt API port from ~/.tilt-dev/config, dynamically creates a TCP tunnel to the host Tilt server via socat, requires mounting the ~/.tilt-dev directory with write permissions, a single MCP server can query multiple Tilt instances by specifying different tilt_port values), installation from PyPI (suitable for Linux or when a local installation is preferred), installation from source (suitable for development or testing local changes). For configuration, the corresponding configuration needs to be added to the Claude Desktop configuration file; the macOS path is ~/Library/Application Support/Claude/claude_desktop_config.json, Windows is %APPDATA%\Claude\claude_desktop_config.json, and Linux is ~/.config/claude/claude_desktop_config.json. The environment variable TILT_MCP_USE_SOCAT can be set to auto (default, auto-detect), true/1 (always use socat), false/0 (never use socat).
Use cases: AI-driven development workflows, debugging assistance, automated monitoring, intelligent resource management for Tilt-managed services. Example prompts include: using the debug_failing_resource prompt to debug a backend service, running health checks on all resources, using troubleshoot_startup_failure to troubleshoot frontend startup failures, analyzing backend logs, optimizing resources to focus on the backend and database, etc.
Limitations and troubleshooting: Ensure Tilt is installed and in PATH; ensure the Tiltfile has been loaded and resources have started; check the MCP client configuration; for the Docker approach, ensure the ~/.tilt-dev directory exists and is mounted as writable, the tilt_port parameter should be the Web UI port rather than the API port, and --network=host must be included. Logs are located at ~/.tilt-mcp/tilt_mcp.log.