Use mfeflow from a coding agent
mfeflow mcp starts an MCP server on stdin and stdout. A coding agent that speaks MCP can then read your project, check it, and plan changes with mfeflow's own commands. It is part of the CLI, so there is nothing else to install.
Available from the release after 0.8.0. Until then npx -y mfeflow mcp does not have the command.
The tools run the same code as the CLI, in the same process, in --json mode. They do not start a shell or a child process, and the answers match what you get on the command line.
Install
Claude Code:
Codex:
Cursor, in .cursor/mcp.json:
VS Code, in .vscode/mcp.json:
Tools
Every tool takes cwd, the absolute path of the project (a folder inside it works too). Every tool also takes response_format: concise is the default, detailed returns the full CLI document. Answers come back as structured data with a text copy, and the text is cut at 40,000 characters with a note when it is cut.
Planned and applied changes do not install packages. Run pnpm install yourself afterwards.
How changes are kept safe
- Plan, then apply. The agent cannot write by calling one tool.
mfeflow_planruns the command with--dry-runand shows the diff. Onlymfeflow_apply_planwith the returnedplan_idwrites, and the agent should show you the diff first. - You can read the whole diff.
mfeflow_planreturns the first page of a long diff and says how many pages there are (diff_pages).mfeflow_plan_diffreturns the others. Lists of written files come with a count, and a cut never dropsplan_id. - A plan expires after 10 minutes and can be applied once. It is held in the server's memory, so restarting the server drops every plan.
- A changed file stops it. The plan records the SHA-256 of every file it touches, including files it would skip, and of
mfeflow.json. It also records where symlinks lead and which files were absent. If any of them changed, or a file it meant to create now exists, the apply is refused. Make a new plan. - A registry feature is checked again.
add_featurerepeats the dry run when you apply, and refuses if the changes or their content differ from what was planned. - Registry plans pin versions. A rollback with no
versionis stored as a rollback to the version the dry run found. A promote or rollback records the version it moves and what the target serves. The apply repeats the dry run and refuses if either changed, for example because someone deployed in between. - A plan belongs to one folder. Applying it from a different
cwdis refused. - Registry writes are off by default.
mfeflow_registry_planandmfeflow_registry_applyexist only when the server starts with--allow-registry-writes. Add the flag to the command in your client config if you want them. - Registry tools use only the configured host. They take no
hostargument. They readregistry.hostfrommfeflow.jsonand say so if it is not set.mfeflow_doctortreatsagainstlike a shell address from a committed file: no credentials, no private or loopback hosts, and a file must be inside the project folder. - Tokens come from the environment. The server reads the same variables as the CLI (
MFEFLOW_S3_ENDPOINT,AWS_ACCESS_KEY_IDand the rest). No tool takes a token or a password as an argument, and a host with credentials in it is rejected. - A plan id is not a login. Anyone who can talk to the server can apply a plan. The server runs as you, on your machine, over stdio.
- The server never asks you. It has no prompt of its own, so the confirmation has to come from your client. Set it to ask before
mfeflow_apply_plan,mfeflow_registry_applyandmfeflow_registry_plan(in Claude Code, leave them out of the allowed tools so each call asks).
The hints on each tool (readOnlyHint, destructiveHint) are set honestly, but they are hints for the client. The safety comes from the plan and apply steps above. A registry plan can only check the project files; it cannot check what is on the remote host, so the apply runs the CLI's own guards (create-only uploads, index compare-and-swap) against it.
Try it
Ask your agent: "Add a remote called reviews, then run doctor." You should see it call mfeflow_plan, show you the diff for reviews, wait for your yes, call mfeflow_apply_plan, then call mfeflow_doctor.
To see the raw protocol without an agent:
The second reply lists the tools. The server ends when its input closes.
Related
- CLI reference for the commands behind each tool.
- Add a remote and Add features.
- Deploy and roll back for what
promoteandrollbackdo.