A Model Context Protocol (MCP) server that integrates with Tilt to provide programmatic access to Tilt resources and logs through LLM applications.
The Tilt MCP server allows Large Language Models (LLMs) and AI assistants to interact with your Tilt development environment. It provides tools to:
- List all enabled Tilt resources
- Fetch logs from specific resources
- Monitor resource status and health
This enables AI-powered development workflows, debugging assistance, and automated monitoring of your Tilt-managed services.
- π Resource Discovery: List all active Tilt resources with their current status
- π Log Retrieval: Fetch recent logs from any Tilt resource
- π‘οΈ Type Safety: Built with Python type hints for better IDE support
- π Async Support: Fully asynchronous implementation using FastMCP
- π Structured Output: Returns well-formatted JSON responses
- Python 3.8 or higher
- Tilt installed and configured
- An MCP-compatible client (e.g., Claude Desktop, mcp-cli)
pip install tilt-mcpgit clone https://github.com/aryan-agrawal-glean/tilt-mcp.git
cd tilt-mcp
pip install -e .Add the following to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"tilt": {
"command": "tilt-mcp"
}
}
}You can run the server directly:
python -m tilt_mcp.serverOr use it with the MCP CLI:
mcp run python -m tilt_mcp.serverOnce configured, the Tilt MCP server provides the following tools:
Lists all enabled Tilt resources with their current status.
Example response:
[
{
"name": "frontend",
"type": "k8s",
"status": "ok",
"updateStatus": "ok"
},
{
"name": "backend-api",
"type": "k8s",
"status": "pending",
"updateStatus": "pending"
}
]Fetches recent logs from a specific Tilt resource.
Parameters:
resource_name(string, required): Name of the Tilt resourcetail(integer, optional): Number of log lines to return (default: 1000)
Example request:
{
"resource_name": "frontend",
"tail": 50
}Example response:
{
"logs": "2024-01-15 10:23:45 INFO Starting server on port 3000\n2024-01-15 10:23:46 INFO Server ready"
}Here are some example prompts you can use with an AI assistant that has access to this MCP server:
- "Show me all the Tilt resources that are currently running"
- "Get the last 100 lines of logs from the backend-api service"
- "Which services are failing or have errors?"
- "Show me the recent logs from all services that aren't healthy"
- "Help me debug why the frontend service is crashing"
# Clone the repository
git clone https://github.com/yourusername/tilt-mcp.git
cd tilt-mcp
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"pytest# Format code
black src tests
# Run linter
ruff check src tests
# Type checking
mypy src-
"Tilt not found" error
- Ensure Tilt is installed and available in your PATH
- Try running
tilt versionto verify installation
-
"No resources found" when Tilt is running
- Make sure your Tiltfile is loaded and resources are started
- Check that you're running the MCP server in the correct directory
-
Connection errors
- Verify the MCP client configuration is correct
- Check the logs at
~/.tilt-mcp/tilt_mcp.log
To enable debug logging, set the environment variable:
export LOG_LEVEL=DEBUGWe welcome contributions! Please see our Contributing Guide for details on:
- Setting up your development environment
- Running tests
- Submitting pull requests
- Code style guidelines
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with FastMCP for the MCP server implementation
- Integrates with Tilt for Kubernetes development
- π§ Email: aryan.agrawal@glean.com
- π¬ Issues: GitHub Issues
- π Docs: GitHub Wiki