Run the AutoML loop from Claude with MCP
Fione's MCP endpoint lets an AI client such as Claude Code or Claude Desktop do the work you would do in the browser: create a project, upload a CSV, look at the data, decide how to train, start the training, wait for it, read the results and predict. Fione trains and predicts on its own server; the client decides what to do next and tells you what it found.
This page walks through the situations it is meant for. The setting-by-setting reference is in Assistant setup, privacy and MCP.
Before you start
Switch it on. MCP is off by default. Set
FIONE_MCP_ENABLED=trueto let a client read your projects, and alsoFIONE_MCP_WRITE_ENABLED=trueto let it create projects, upload data, start jobs and predict (indocker/.envfor Compose, then restart Fione). Everything below needs both.Create an API token on the Account page (see Users and sharing). The client acts as the token's owner, with that person's role and projects.
Give the client the URL and the token. The endpoint is
/mcpon Fione's own port. In Claude Code:shclaude mcp add --transport http fione http://127.0.0.1:8080/mcp \ --header "Authorization: Bearer <your token>"Other clients that can send a header take the same URL and an
Authorization: Bearer <your token>header; the reference has a JSON example. A client that can only start local programs, and cannot send a header to a remote URL, needs a bridge that adds it; check your client's documentation. That route has not been tried with Fione.
Fione's own responses never contain example values from your data, so a client that is only reading never sees a cell. Values the client itself sends (the CSV it uploads, the rows it asks to predict) are its own.
A CSV file on your computer (Claude Code)
Claude Code has a shell, so it can send a file of any size (up to FIONE_MAX_UPLOAD_BYTES) without reading it into the conversation.
Ask for the outcome, for example:
Create a Fione project called "churn". Upload
customers.csvas the training data, look at the columns, and train a model to predictchurned. Tell me how good it is.
Claude then works through these steps, each one a tool call you can follow in its output:
create_projectmakes the project and returns its id.create_upload_urlreturns a one-time URL, and Claude sends the file withcurl -T customers.csv '<url>'. The URL works for 15 minutes and for one successful upload; it needs no token. The answer to the upload describes the dataset (rows, columns, column kinds).describe_datasetreturns column statistics, correlations and columns that look like leaks.propose_training_configturns that and the column to predict into a training configuration (nothing is saved yet).start_trainingqueues the job.wait_for_jobis called again and again untildoneistrue; the finished job's result has themodel_id.get_leaderboard(andget_feature_importanceorget_model_diagnostics) show how the models compare and which columns matter.
The tools that change something say so, and a client such as Claude Code asks before running a tool unless you have allowed it. That is the only confirmation step: Fione cannot ask you itself. Keep that approval on.
A small CSV in a client without a shell
Claude Desktop is one such client. A client without a shell cannot run curl, so it sends the CSV as text in one call: upload_dataset takes project_id, name, type (train, test or predict) and csv_text, up to 512 KiB of UTF-8. The model has to write the text out, so this suits small tables. Everything after the upload is the same as above.
If the file is too large, the tool says so and names create_upload_url; that needs a client with a shell, or you upload the file yourself in the browser and tell the client the dataset exists (list_datasets finds it).
Predicting new rows
There are two ways, by how many rows you have.
- A few rows, now.
predicttakes up to 1000 rows as objects, each with a value for every column the model reads (other keys are ignored), and returns one prediction per row in order:predict, and for classificationp_<class>for each class. Nothing is stored. The result must fit in 32 KiB; a larger request is refused with about how many rows fit. - Many rows. Upload them as a dataset of type
predict, callstart_batch_predict, wait withwait_for_job, then read the result withget_predictionsa page at a time. It returns the prediction columns only, never your input values, and the client joins them to the rows it already has by row number.
Watching, stopping and finding jobs
wait_for_jobwaits at mosttimeout_secs(10 by default, 15 at most) and returns the job's state withdone. A long training takes many calls; that is expected.get_jobshows a job once without waiting,list_jobsthe newest 50 jobs of the projects the token's user can read (jobs that belong to no project are not listed), andget_training_eventswhat a training is doing.cancel_jobstops a queued or running job in a project the token's user can write to. It does not delete anything.- A job's message is not sent over MCP. The status and
get_training_eventstell what happened.
Looking at projects you already have
With only FIONE_MCP_ENABLED, a client can list projects, datasets and models and read descriptions, results and explanations, and ask for a proposed training configuration or Join, which is not saved. It cannot create, start or change anything. This suits questions such as "which of my models is best for price, and why?" or "what would you change in this dataset before training?".
Keeping it safe
- A token is you. It has your role and your projects. Give a client that must not start jobs the token of a user who can only read (a viewer): write tools are then refused.
- Nothing is deleted. No tool deletes a project, dataset, model or job.
- An upload URL is a credential for 15 minutes. Whoever holds it can add one dataset to that project, once. Fione hides it in its own logs; a reverse proxy's access log records it, so redact paths that start with
/api/v1/uploads/there. Behind a proxy, setFIONE_PUBLIC_URLso the URL Fione hands out is the public one. - Behind a reverse proxy, block
/mcpunless you want MCP clients from outside your network. - Text in your data is not an instruction. The results carry a notice saying so, but approval of each change stays your safeguard.
Limits
| What | Limit |
|---|---|
| Tool calls at once | 2 (a third waits up to 15 seconds, then answers "busy") |
wait_for_job | 15 seconds per call |
upload_dataset text | 512 KiB |
| File sent to an upload URL | FIONE_MAX_UPLOAD_BYTES (1 GiB by default) |
| Upload URL | 15 minutes, one successful upload |
predict | 1000 rows, and a 32 KiB result |
| Any tool result | 32 KiB |
list_jobs | The newest 50 |
When something goes wrong
| What you see | What to do |
|---|---|
| The client lists only read tools | FIONE_MCP_WRITE_ENABLED is off. Set it to true and restart Fione. |
401 from /mcp | The token is missing, wrong or revoked. Create one on the Account page; a session cookie does not work. |
| "busy" | Two calls are already running (a waiting wait_for_job holds one). Ask again in a moment. |
| The upload URL answers 404 | It is unknown, already used, expired, or MCP or its write switch is off. Ask for a new one. |
| The upload answers "invalid_csv" | The file does not parse as a CSV. The answer gives the field counts; fix the file and send it again to the same URL. |
predict is refused as too large | Send fewer rows, or use a predict dataset with start_batch_predict and get_predictions. |
| A write tool is refused | The token's user is a viewer, or has no write access to that project. |
What it does not do
It does not train in the client, delete anything or run Docker. To serve a trained model as a prediction API, see Fione Serving.