mcp

js/cli/mcp.md

fino mcp serves the workspace tools from fino:ai/tools to an MCP client over stdio, so an editor, desktop assistant, or another agent can list, read, search, edit, and run commands in one directory through fino.

fino mcp
fino mcp --root ~/src/project
fino mcp --read-only
fino mcp --no-shell

Register it with a client as a stdio server whose command is fino and whose arguments are mcp plus any options. The client starts the process, speaks newline-delimited JSON-RPC on its stdin and stdout, and closes stdin to stop it. Nothing else is written to stdout; startup errors go to stderr.

Every tool is bounded to the workspace root, which defaults to the current directory. Reads and writes outside it are refused, including through .., absolute paths, and symbolic links. shell runs /bin/sh under the strict process sandbox with the root writable, read-only system directories, and all network access denied; where strict sandboxing is unavailable it returns an error instead of running unconfined.

Option Effect
--root DIR Bound the tools to DIR instead of the current directory.
--read-only Serve only list_files, read_file, and search_files.
--no-shell Keep the editing tools but omit shell.

The tools run without fino's approval step: MCP clients confirm tool calls themselves and cannot answer a fino approval suspension. Use --read-only or --no-shell when the client should not be able to change files or run commands.

The command is a thin binding over createWorkspaceTools() from fino:ai/tools, mcpServer() from fino:ai/mcp, and streamTransport() over stdin() and stdout(). Compose those directly to serve a different tool set.