Skip to main content

Tilt MCP Server

A Model Context Protocol (MCP) server that integrates with Tilt to provide programmatic access to Tilt resources and logs through LLM applications.

Overview

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.

Features

  • 🔍 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

Prerequisites

  • Python 3.8 or higher
  • Tilt installed and configured
  • An MCP-compatible client (e.g., Claude Desktop, mcp-cli)

Installation

From PyPI (recommended)

pip install tilt-mcp

From Source

git clone https://github.com/aryan-agrawal-glean/tilt-mcp.git
cd tilt-mcp
pip install -e .

Configuration

For Claude Desktop

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"
    }
  }
}

For Development/Testing

You can run the server directly:

python -m tilt_mcp.server

Or use it with the MCP CLI:

mcp run python -m tilt_mcp.server

Usage

Once configured, the Tilt MCP server provides the following tools:

get_all_resources

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"
  }
]

get_resource_logs

Fetches recent logs from a specific Tilt resource.

Parameters:

  • resource_name (string, required): Name of the Tilt resource
  • tail (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"
}

Example Prompts

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"

Development

Setting up the development environment

# 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]"

Running tests

pytest

Code formatting and linting

# Format code
black src tests

# Run linter
ruff check src tests

# Type checking
mypy src

Troubleshooting

Common Issues

  1. "Tilt not found" error

    • Ensure Tilt is installed and available in your PATH
    • Try running tilt version to verify installation
  2. "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
  3. Connection errors

    • Verify the MCP client configuration is correct
    • Check the logs at ~/.tilt-mcp/tilt_mcp.log

Debug Logging

To enable debug logging, set the environment variable:

export LOG_LEVEL=DEBUG

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Setting up your development environment
  • Running tests
  • Submitting pull requests
  • Code style guidelines

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with FastMCP for the MCP server implementation
  • Integrates with Tilt for Kubernetes development

Support

Metadata

Release files for tilt-mcp 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tilt-mcp 0.1.3
File Size Uploaded
tilt_mcp-0.1.3.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tilt-mcp 0.1.3
File Interpreter ABI Platform
tilt_mcp-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 15.6 kB

Release files / tilt_mcp-0.1.3.tar.gz

Download URL tilt_mcp-0.1.3.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
1932885e5be6b3f155319886b8fb1b4b419ba897f0d06e9589122afcaadc811f
BLAKE2b-256 checksum
How to use checksums
e5522c07b3719c1814b3690af9c37fc6ffd5be78aa6550ed7090e8a98b85940a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release files / tilt_mcp-0.1.3-py3-none-any.whl

Download URL tilt_mcp-0.1.3-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75480468b62852e3e6b22bbf0aa6eee11a1e891421ce128e61c8a326158848ad
BLAKE2b-256 checksum
How to use checksums
d80f954c862cac2af689c507e547a818f0c7c551025a2ef0ec0cb306afefb913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page