Skip to content

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 ​

  1. Switch it on. MCP is off by default. Set FIONE_MCP_ENABLED=true to let a client read your projects, and also FIONE_MCP_WRITE_ENABLED=true to let it create projects, upload data, start jobs and predict (in docker/.env for Compose, then restart Fione). Everything below needs both.

  2. 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.

  3. Give the client the URL and the token. The endpoint is /mcp on Fione's own port. In Claude Code:

    sh
    claude 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.csv as the training data, look at the columns, and train a model to predict churned. Tell me how good it is.

Claude then works through these steps, each one a tool call you can follow in its output:

  1. create_project makes the project and returns its id.
  2. create_upload_url returns a one-time URL, and Claude sends the file with curl -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).
  3. describe_dataset returns column statistics, correlations and columns that look like leaks. propose_training_config turns that and the column to predict into a training configuration (nothing is saved yet).
  4. start_training queues the job. wait_for_job is called again and again until done is true; the finished job's result has the model_id.
  5. get_leaderboard (and get_feature_importance or get_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. predict takes 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 classification p_<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, call start_batch_predict, wait with wait_for_job, then read the result with get_predictions a 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_job waits at most timeout_secs (10 by default, 15 at most) and returns the job's state with done. A long training takes many calls; that is expected.
  • get_job shows a job once without waiting, list_jobs the newest 50 jobs of the projects the token's user can read (jobs that belong to no project are not listed), and get_training_events what a training is doing.
  • cancel_job stops 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_events tell 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, set FIONE_PUBLIC_URL so the URL Fione hands out is the public one.
  • Behind a reverse proxy, block /mcp unless 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 ​

WhatLimit
Tool calls at once2 (a third waits up to 15 seconds, then answers "busy")
wait_for_job15 seconds per call
upload_dataset text512 KiB
File sent to an upload URLFIONE_MAX_UPLOAD_BYTES (1 GiB by default)
Upload URL15 minutes, one successful upload
predict1000 rows, and a 32 KiB result
Any tool result32 KiB
list_jobsThe newest 50

When something goes wrong ​

What you seeWhat to do
The client lists only read toolsFIONE_MCP_WRITE_ENABLED is off. Set it to true and restart Fione.
401 from /mcpThe 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 404It 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 largeSend fewer rows, or use a predict dataset with start_batch_predict and get_predictions.
A write tool is refusedThe 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.