What fm-mcp does
The fm-mcp MCP server gives coding agents access to four local text-processing operations provided by Apple Foundation Models. summarise condenses logs, documents, notes, or transcripts into a paragraph or up to seven bullets. It is intended as a gist rather than a complete record.
extract returns named fields as JSON using a JSON Schema supplied by the caller. Flat schemas are the most reliable. classify assigns one or more labels selected by the caller, with multi controlling whether multiple labels are allowed. ocr reads text from a single PNG, JPEG, HEIC, TIFF, GIF, or BMP image; it does not process PDFs.
The server is aimed at the Coding Agents category. It can keep routine processing on the Mac instead of sending the input to a remote service, but its output should be treated as model-generated and checked when accuracy matters.
How it works
fm-mcp communicates with fm serve through a local Unix socket. The model server is started when the first tool call needs it and stopped when the agent session ends. Text can be passed in a tool request, or the first three text tools can receive a path to a text file up to 1 MB. Passing a path lets the agent avoid reading the file contents itself.
The server is a standard stdio MCP process, so clients that can launch local MCP servers can configure it directly. The repository documents use with Claude Code, Codex, Claude Desktop, and Devin, formerly Windsurf. The supplied installation command can add the required configuration and delegation guidance for Claude Code and Codex.
Setup and configuration
Supported machines are Apple Silicon Macs running macOS 27 with Apple Intelligence enabled. The fm licence must be accepted once with fm license. Homebrew installation is available, as are a release installer script and Cargo installation.
Run fm-mcp install to configure Claude Code and Codex, then use fm-mcp doctor to check the operating system, model availability, licence, test request, and agent setup. Installation backs up modified files and supports --claude, --codex, --dry-run, --no-guidance, and --uninstall. Claude Code can instead use the repository’s plugin, but both setup methods should not be enabled together.
The fm-mcp MCP server accepts FM_MCP_REQUEST_TIMEOUT_SECS to change the default 120-second request limit and FM_MCP_LOG=debug for additional stderr logging. Standard output remains reserved for MCP protocol traffic.
Tools and capabilities
summarise: handles roughly 30,000 words of ordinary prose, but dense logs reach the limit much sooner.
extract: handles about 3,500 words and produces JSON fields from a supplied schema.
classify: handles about 3,500 words and supports single or multiple selected labels.
ocr: extracts text from one supported raster image.
Limitations and notes
The on-device model has an approximately 8,000-token context shared between input and output. Long inputs may be split and recombined, which can take a minute or two and lose details. Requests are processed one at a time because the model is shared across sessions; short extraction calls may take one to two seconds, while long summaries can take a minute or more.
The fm-mcp MCP server is not intended for code, mathematics, unsupported factual inference, or high-cost mistakes that cannot be reviewed. Extraction can return incorrect values for missing fields, especially with nested schemas. The model may also refuse harmless content, in which case the refusal is reported. Check summaries, extracted fields, classifications, and OCR results before relying on them.