js/commands/mcp

js/commands/mcp.ts

fino:commands/mcp — serve the workspace tools to an MCP client.

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 either over this process's stdin and stdout with streamTransport(), or with --http as a Streamable HTTP endpoint from httpHandler(). There is no second server implementation behind either.

Boundaries

Over stdio, stdout carries protocol traffic only and the command exits when the client closes stdin or the process is interrupted. Over HTTP, stdout reports the endpoint and the command serves until interrupted.

fino mcp --root ~/src/project
fino mcp --read-only
fino mcp --http --port 3090

Constants

const command

Serve the workspace tool set over MCP until the client disconnects or the command stops.