
fm-mcp
io.github.yranganav0.1.0更新於 Oct 10, 2026
Delegate summarising, extraction, classification and OCR to the macOS 27 on-device model.
概覽
讓程式開發代理把摘要、欄位擷取、分類與圖片 OCR 等簡單文字工作交給 macOS 27 上的裝置端 Apple Foundation Models 模型處理。
- 功能
- 這是一個本機 stdio MCP 伺服器,提供四個工具:summarise(把日誌、文件、筆記或逐字稿濃縮成一段文字或最多 7 個要點)、extract(依你提供的 JSON Schema 把具名欄位擷取成 JSON)、classify(把文字歸入你指定的標籤,可用 multi 選多個),以及 ocr(讀取 PNG、JPEG、HEIC、TIFF、GIF 或 BMP 圖片中的文字,不支援 PDF)。前三個工具可接收文字,也可接收最大 1 MB 的文字檔路徑,代理不必自行讀取檔案。首次呼叫工具時它會自行啟動 fm serve 模型服務,工作階段結束時停止。
- 適用情境
- 適合開發代理原本要花付費遠端 token 處理例行文字工作的情境,例如摘要日誌或從文件擷取欄位,同時希望文字留在本機。不適合程式碼、數學、推理、文字中不存在的事實,以及答錯代價高又無法核對的任務。
- 執行需求
- 需要 Apple Silicon 的 Mac(不支援 Intel)、已開啟 Apple Intelligence 的 macOS 27,並需先執行一次 fm license 接受授權。可透過 Homebrew、cargo 或安裝指令稿安裝;fm-mcp install 會設定 Claude Code 與 Codex,也可使用 Claude Code 外掛。選用環境變數 FM_MCP_REQUEST_TIMEOUT_SECS(預設 120)與 FM_MCP_LOG=debug。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 fm-mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
fm-mcp
An MCP server that lets coding agents such as Claude Code and Codex hand simple text work to the on-device model for Apple Foundation Models, the fm that ships with macOS 27. It's free, private, and runs offline.
mcp-name: io.github.yrangana/fm-mcp
Why
Coding agents spend paid, remote tokens on simple jobs, like summarising a log or pulling fields out of a document. A small model already on your Mac can do much of that for nothing, and your text never leaves the machine. fm-mcp lets the agent hand off that work, and tells it plainly what the small model can't do.
Install
You need a Mac with Apple Silicon (Intel Macs are not supported), macOS 27 with Apple Intelligence turned on, and the fm licence accepted once (fm license).
Then start a new Claude Code or Codex session. fm-mcp starts the model server (fm serve) itself the first time a tool is called, and stops it when the session ends.
Other ways to get the binary:
What fm-mcp install changes
- Claude Code: adds the
fm-mcpMCP server to~/.claude.json(throughclaude mcp addwhen theclaudecommand is there), and installs thefm-delegateskill in~/.claude/skills/. - Codex: adds
[mcp_servers.fm-mcp]to~/.codex/config.toml, and a marked section in~/.codex/AGENTS.md(or inAGENTS.override.md, if you use one).
It backs up each file before changing it and prints every path it touched; running it again changes nothing. --claude or --codex picks one agent, --dry-run shows the changes without writing, and --no-guidance skips the skill and the AGENTS.md section. fm-mcp install --uninstall removes everything it added.
The skill and the AGENTS.md section tell the agent when to delegate. Without them the agent sees only the tool descriptions, and delegates less well.
Or: the Claude Code plugin
The plugin gives Claude Code the MCP server and the skill, without fm-mcp install. It still needs the binary on your PATH, so install that first (Homebrew above); otherwise Claude Code reports the server as failed to connect.
Use the plugin or fm-mcp install for Claude Code, not both: both together give Claude Code two fm-mcp servers. With the plugin, run fm-mcp install --codex to set up Codex only.
Other MCP clients
fm-mcp is a plain stdio MCP server, so other clients that run local servers on the same Mac can use it. fm-mcp install doesn't set them up, and they don't get the delegation guidance: the agent decides from the tool descriptions alone. Each client below was tried on a real Mac; others may work but are untested.
Claude Desktop (tried with 2.31226.1, 2026-10-11). In Settings › Developer › Edit Config, add this to mcpServers in claude_desktop_config.json, then quit and reopen Claude Desktop:
Use the full path (which fm-mcp prints it). fm-mcp helps most with files on your Mac: give Claude the file's path and it passes path, so the text never goes through Claude. For a web page, Claude Desktop reads the page itself first, so delegating it saves nothing.
Devin (formerly Windsurf) (tried with Devin.app 3.8.20, 2026-10-11). Add this to mcpServers in ~/.config/devin/mcp_config.json:
Tools
summarise, extract and classify take text, or a path to a text file (up to 1 MB) so the agent never has to read the file itself.
Limits
- Small model, small context: about 8K tokens, shared by the input and the answer. Logs full of IDs and numbers use far more tokens per word than prose.
- Not for code, maths, reasoning, facts the text doesn't contain, or anything where a wrong answer is costly and you can't check it.
- It makes mistakes. Summaries can drop or distort details.
extractusually returnsnullfor a field the text doesn't contain, but when the text has something close in meaning (no PO number, but line items), about 1 in 3 such fields gets a wrong value. Nested schemas are less reliable than flat ones. Check what matters. - One request at a time. The model is shared by every session on the Mac, so calls queue: a short
extracttakes 1–2 s, a longsummarisea minute or more. - Safety filter: the on-device model sometimes refuses harmless input. fm-mcp reports that clearly, and the agent does the task itself.
Privacy
Everything runs on your Mac. fm-mcp talks to fm serve over a local Unix socket and sends nothing over the network. Your text goes only to the on-device model.
Troubleshooting
Run fm-mcp doctor. It checks the Mac, macOS, fm, the licence, the model, a test request, and both agents' setup, and says how to fix anything that fails.
Uninstall
Development
AGENTS.md has the architecture, the tested facts about fm serve, and the project rules. docs/MANUAL_TEST.md is the checklist for each release.
Licence
MIT. fm-mcp is not affiliated with or endorsed by Apple. It calls the fm tool installed on your Mac and includes nothing from Apple.
來源:README.md,提交 831d5dd
工具
0版本歷史
1- v0.1.0最新Oct 10, 2026

