js/commands/mcp
js/commands/mcp.ts
fino:commands/mcp — serve the workspace tools to an MCP client over stdio.
fino mcp lets an MCP-compatible client — an editor, a desktop assistant,
another agent — use fino:ai/tools against one directory. It is a thin
binding: createWorkspaceTools() mounted on mcpServer() and served over
this process's stdin and stdout with streamTransport(). There is no
second server implementation behind it.
Boundaries
- Every tool is bounded by a filesystem grant of the workspace root
(
--root, default the current directory): reads and writes outside it are refused, andshellruns under the strict process sandbox with that root writable and network denied, failing closed where strict mode is unavailable. --read-onlyserves onlylist_files,read_fileandsearch_files;--no-shellkeeps the file-editing tools but omitsshell.- Tools run without fino's own approval step. MCP clients confirm tool calls themselves, and a client has no way to answer a fino approval suspension.
stdout carries protocol traffic only. The command exits when the client closes stdin or the process is interrupted.
fino mcp --root ~/src/project
fino mcp --read-onlyConstants
const command
Serve the workspace tool set over MCP stdio until the client disconnects.