Mullet
Provides a Docker tool for executing and managing Docker containers, enabling containerized code execution and testing.
Provides a Git tool for version control operations, including diffs, staged changes, and repository interactions.
Checks the public GitHub repository for the latest version via the auto-update checker, keeping the server up to date.
Integrates with Google Gemini models (Gemini 2.5, Gemini Flash) as a provider, supporting optional Gemini CLI subscriptions and API access.
Integrates with Ollama as a local LLM provider, enabling self-hosted model inference for cost-effective task routing.
Integrates with OpenAI models (GPT-5) and exposes an OpenAI-compatible REST + WebSocket API for chat completions and model listing.
Exposes Prometheus metrics at /metrics for monitoring request counts, token usage, latency, and tool-call activity.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Mulletrefactor the auth module and route it to the cheapest capable model"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mullet
Mullet takes work off an AI coding tool such as Claude Code. Over the Model Context Protocol (MCP), it sends each task to the cheapest model that can handle it, from a local model in LM Studio or Ollama to Kimi, OpenRouter, Gemini or Claude, and it searches your own documents and code.
Status
Mullet is paused, not finished. I still run its knowledge search, Trawl, but I've turned delegation off: a larger Anthropic subscription turned out quicker than handing work to other models. If Anthropic's prices rise, I'll switch it back on and send most of the work to cheaper models through Kimi and OpenRouter. Set MULLET_DELEGATION=off in .env to turn delegation off; Trawl, status and budget keep working. The code, model list and prices date from October 2026.
Related MCP server: OpenAI-Compatible MCP Gateway
Install
Mullet isn't on PyPI (the name there belongs to another package), so install it from a clone. It needs Python 3.10 or later.
git clone https://github.com/tomgould/mullet-public.git
cd mullet-public
python3 -m venv .venv && source .venv/bin/activate
pip install -e .Keep the install editable (-e): the Claude Code hooks run from scripts/hooks/ in the clone. Optional extras are gemini, bedrock, postgres, gpu, all and dev, for example pip install -e ".[gemini]". opencode needs Node.js 18 or later.
Quick start
cp .env.example .env # add the API keys you have
mullet doctor # checks the install and which providers it can reach
mullet explain "add a retry with exponential backoff to the HTTP client" # scores a task, calls no model
mullet "explain this codebase in one paragraph" # runs a taskMullet reads .env from the root of the clone. KIMI_API_KEY alone is enough to start, and a local model in LM Studio or Ollama needs no key. ANTHROPIC_API_KEY is optional: without it, Mullet hands Anthropic work back to Claude Code or uses the claude command-line tool.
The MCP server is mullet mcp. To add it to Claude Code for every project:
claude mcp add --scope user mullet -- mullet mcpmullet setup-claude goes further. Read what it does first, or run it with --dry-run: it installs hooks that run in every project, adds delegation rules to ~/.claude/CLAUDE.md, installs skills, agents and a status line into ~/.claude/, and installs opencode with npm.
Documentation
The guides are in docs/:
Installation, with guides for Linux, macOS and ChromeOS
The rest of this page is a reference.
What it does
Scores each task out of 100 before it picks a model, from keywords, the number of subtasks, how much of the system it touches and whether it needs tests. The score puts the task in a tier: LOW, STANDARD, ADVANCED or CRITICAL.
mullet explainshows the working without calling a model.Watches the budget. It reads how much of a Claude subscription's five-hour and weekly allowance has gone and, as that runs low, moves work away from Claude to providers such as OpenRouter and Kimi.
Edits files through opencode, an open-source coding agent, then checks what it did. The list of changed files comes from
git status, not from the model's report, and a classifier with no model behind it flags edits that often mean trouble.Splits a goal across parallel Kimi calls and merges the answers, and has longer-running modes that break a task up, work through it and check the result.
Searches your own documents and code with Trawl, its knowledge engine. Trawl indexes collections called pools, searches them by keyword and by meaning together, re-ranks the results and can build a knowledge graph.
Limits which providers it may use through presets.
Serves an OpenAI-compatible API with
mullet serve.
Using it from Claude Code
The MCP server has 10 Mullet tools and 43 Trawl tools.
Tool | What it does |
| Sends a task to the cheapest suitable model. The model can't see your files, so the task must carry everything it needs. |
| Gives the task to opencode, which edits files in place and returns the list of changed files. It never commits. |
| Fans a goal out across parallel Kimi calls and merges the results. |
| Runs a child agent on providers you choose. |
| Searches a Trawl pool. |
| Stores a note in a project's knowledge base. |
| Scores a task and shows the routing decision. |
| Show provider health and budget. |
The Trawl tools manage pools, search code, documents and the knowledge graph, and list a pool's newest documents. With MULLET_DELEGATION=off, mullet_run, mullet_opencode, mullet_swarm and mullet_delegate refuse, and the rest keep working.
Routing
Routing has three stages.
A preflight step estimates how much the task will read and write and how hard it is. It asks a local model first, then Gemini Flash, and falls back to heuristics.
A routing matrix picks the cheapest model that can take that input and output at that complexity. Size estimates get a 10% margin before they're compared with a model's context window.
A fallback chain takes over if that model isn't available.
Local models are classified from their names, by size and by whether they're built for code, vision or reasoning, so routing works with whatever is loaded in LM Studio. A fifth tier, PREMIUM, is for the orchestrating model only: mullet override on sends work to Opus until the current five-hour window resets.
mullet models and mullet cost list the models and prices Mullet knows about. docs/MODEL_ROUTING.md has the detail.
Budget guard
mullet.hud.guard.check_budget() returns one of three states. It's "go" normally. It's "throttle", which steers work to a cheaper provider, once five-hour usage reaches 70% (55% when weekly usage is 85% or more) or the day's share of the weekly allowance drops below 8%. It's "pause" when five-hour usage is at least 95% and weekly usage at least 90%.
Provider presets
A preset limits which providers Mullet may use.
Preset | Providers | opencode model |
| all |
|
|
|
|
|
| none |
|
|
|
mullet preset list # * marks the active one
mullet preset use cheap-cloud
mullet preset show local-only
mullet preset add --name my-preset --label "My preset" --providers local,kimi --speed balanced
mullet preset remove my-presetOrchestration modes
Command | What it does |
| One routed call |
| Splits the task and runs the parts in parallel |
| Repeats ultrawork until every user story passes, up to ten times |
| Plans, runs ralph, then checks the result |
| Runs N coordinated agents |
| Runs another mode on cheaper tiers |
Over MCP, mullet_run takes standard, ultrawork or ralph as its mode.
Built-in tools
A task run by Mullet's own agent can use 24 tools, in mullet/core/tools/:
Kind | Tools |
Files and code |
|
Shell |
|
Web |
|
Agents |
|
Memory and sessions |
|
Images |
|
Tools from other MCP servers can be added through the client in mullet/core/tools/mcp_client.py.
Commands
Command | What it does |
| Starts the MCP server (stdio) |
| Starts the API server on |
| Checks the install, providers, pools, config and hooks |
| Sets up Claude Code, as above |
| Writes a |
| Lists, switches, shows, adds or removes presets |
| Scores a task without calling a model |
| List models and prices |
| Show spend and routing history |
| Search and manage knowledge pools |
| Show past sessions and model calls |
| Turns the Opus override on or off |
mullet --help lists the rest.
API server
mullet serve offers /v1/chat/completions, /v1/models, /health, /metrics (Prometheus) and a WebSocket at /ws.
mullet serve
curl http://localhost:3000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"messages":[{"role":"user","content":"hello"}]}'docs/API.md covers the REST, WebSocket and admin endpoints.
Configuration
API keys and switches such as
MULLET_DELEGATIONgo in.env;.env.examplelists them.Project settings go in
mullet.yamlin the project, or~/.mullet/config.yaml;mullet.yaml.exampleshows the shape. For example, to add an OpenAI-compatible server on a port Mullet doesn't probe:providers: my_server: type: openai_compatible base_url: http://localhost:8080/v1 models: default: my-modelKnowledge pools live in
~/.mullet/pools/, or whereverTRAWL_POOLS_DIRpoints.A pool can also crawl a website on every
mullet reindex, from its sitemap, with linked PDFs and Office files. docs/REINDEX.md has the options.
Development
pip install -e ".[dev]"
pytestThere are more than 17,800 tests. GitHub Actions runs them on Python 3.10, 3.11 and 3.12, and ruff checks for errors. See CONTRIBUTING.md.
Licence
Mullet is source-available under the Business Source License 1.1. You may copy, change and redistribute it, and use it outside production. One developer may also use it in production, free, for their own work on one running instance, but not offer it, or a service based on it, to anyone else. Any other production use needs a commercial licence; LICENSE says how to ask.
Each version becomes available under the Apache License 2.0 on 3 April 2030, or four years after its first public release if that comes sooner.
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Chat, image, video, and audio models from many vendors behind one remote MCP server and one key.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceExposes your local machine's filesystem, git, shell, network, databases, and system to any MCP-compatible LLM client over HTTP.7-
- FlicenseNot gradedqualityDmaintenanceLocal MCP server that exposes fixed tools for GPT, Claude, and Gemini while routing to any OpenAI-compatible chat completions backend with independent configuration per target.1-
- AlicenseAqualityDmaintenanceOne MCP that turns Claude Code into your whole dev stack by swallowing other MCP servers, delegating to Codex & Gemini on your CLI subscriptions, remembering projects in a searchable knowledge graph, and carrying setup across sessions — secret-free by design.234MIT
- FlicenseNot gradedqualityAmaintenanceExposes an MCP server that pools free LLM provider routes behind one OpenAI-compatible endpoint, enabling chat and coding-agent requests with automatic failover, model/route discovery, and keyless start when available. It can begin serving without credentials whenever an enabled keyless route is up.-