Skip to main content
stateset-agents mcp exposes the improvement loop as MCP tools, so an agent can run it directly instead of shelling out to the CLI. Every tool is a thin wrapper over the same module functions the CLI calls — grading, curation and preset resolution are not reimplemented in the server, so output is comparable either way.

Install and run

The server is an optional extra rather than a core dependency:
Without the extra, the command exits with the install hint rather than a traceback. stdio is the only transport in v1.
Or as client configuration directly:

The tools

No tool in v1 starts real training. dry_run_finetune only ever runs the fine-tune script with --dry-run against the stub backend: no model download, no GPU, no spend. That is a deliberate boundary — an agent driving this loop can grade, curate and preview a configuration, and cannot commit you to a training bill. Real runs go through the CLI.
improve_run calls the same orchestration function as stateset-agents improve run, so a curated set produced through MCP is byte-for-byte comparable with one produced from the shell. That matters when an agent curates a set and a person needs to check it.

A loop through the tools

What an agent driving this actually does, in order:
The agent stops there. Turning that resolved config into a trained model is a CLI step a person runs, because it is the step that costs money.

Verifying it works

A tools/call against a server with no mcp extra, or a bad path, returns a clear error rather than a traceback — so a failed call tells you which of the two it was:
Seven tools in the response means the server is registered and reachable.

Next steps

Agents quickstart

The same loop from the command line, including the training step MCP will not run.

CLI reference

What each wrapped command does natively.

MCP servers

The other servers StateSet publishes.

Agent Gate

Requiring an authorization proof before any MCP tool call takes effect.