
MCP Browser
io.github.brainfuel由 GitHub 帳號 brainfuel 發布v1.0.1更新於 Oct 24, 2026
Native macOS browser exposing an MCP server so AI agents can drive a real WKWebView.
概覽
一款原生 macOS 瀏覽器,將自身作為本機 MCP 伺服器暴露,讓 AI 助理驅動真實的 WKWebView 視窗進行導覽、點擊、填表與讀取頁面。
- 可以做什麼
- 導覽與分頁:開啟網址、上一頁下一頁、重新載入、新增、切換與關閉分頁,讀取目前網址與標題。操作 DOM:點擊、填寫、送出、懸停、按鍵、輸入文字、捲動、頁內尋找、取得元素與無障礙樹。讀取頁面內容:擷取文字、頁面資料與中繼資料、截圖、匯出 PDF、轉譯 HTML、執行 JavaScript、列出連結與表單。管理 Cookie 與儲存:讀取與設定 Cookie、檢視儲存、清除工作階段。檢查活動:主控台記錄、網路記錄、對話框,以及書籤、下載與需使用者許可的上傳。
- 適用情境
- 適合需要助理在 Mac 上的真實瀏覽器視窗中操作、共用你已登入的工作階段並看到與你相同頁面的情境,而非無頭或雲端瀏覽器。適用於本機填表、閱讀頁面、截圖與偵錯網頁。
- 執行需求
- macOS 14 或更新版本;以已簽署 DMG 形式提供 Apple Silicon 版本。伺服器透過本機 HTTP 在 8833 埠(可設定)執行,需要從設定取得每次啟動產生的 bearer 權杖,並以 Authorization 標頭送出。從原始碼建置需要 Xcode 16 或更新版本。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP Browser,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP Browser
A native macOS web browser that exposes itself as a Model Context Protocol server, so AI agents can drive a real WKWebView the same way a person would — navigate, click, fill forms, read the DOM, take screenshots, run JavaScript, and capture network and console activity.
Built with SwiftUI + WKWebView. The MCP server runs in-process over local HTTP with bearer-token authentication and DNS-rebinding defense.
Download
⬇ Download the latest macOS build — signed, notarised .dmg for Apple Silicon.
After downloading, open the DMG and drag MCP Browser to your Applications folder.
Screenshots
[MCP Browser tools and settings]
Why
Most "browser-as-a-tool" stories for agents fall into two camps:
- Headless automation (Playwright, Puppeteer) — fast and scriptable, but the agent never sees what you see, can't share your logged-in sessions, and runs in a different browser engine than the one you trust.
- Remote-controlled cloud browsers — your data leaves your machine, and you pay per session.
MCP Browser is the third option: a real browser window on your Mac that you log into, navigate, and use yourself — and that an LLM can drive through MCP when you ask it to. Cookies, history, bookmarks, and downloads stay local. The agent sees the same page you do.
Features
Browser
- WKWebView-backed tabs with a Safari-style tab strip (favicons, hover close, equal-width pills)
- URL bar with history + bookmark autocomplete
- Bookmarks bar, full bookmarks manager, history view, downloads popover
- Find on page, zoom-per-host persistence, picture-in-picture controller
- Bookmark importer (HTML / Safari / Chrome formats)
- Per-tab cookie and network capture
MCP server
- Local HTTP transport on port
8833(configurable) —POST /mcpfor JSON-RPC,GET /mcpfor SSE-style status - Bearer-token authentication with a per-launch token, regeneratable from Settings
- DNS-rebinding defense —
Hostheader validated against127.0.0.1/localhost - Auto-registration with common MCP clients (Claude Desktop, Codex, etc.) via
MCPRegistrar - Tool action log — every tool call is recorded with arguments, result summary, and timing
Tools (current catalog)
- Navigation —
navigate,back,forward,reload,current_url,current_title - Tabs —
list_tabs,new_tab,switch_tab,close_tab - DOM —
click,fill,submit,hover,press_key,type_text,scroll,find_in_page,get_element,accessibility_tree - Page content —
read_text,read_page,page_metadata,screenshot,pdf_export,render_html,eval_js,find,list_links,list_forms - Cookies / storage —
get_cookies,set_cookie,storage,clear_session - Bookmarks —
list_bookmarks,open_bookmark_folder - Inspection —
console_logs,network_log,dialog - Files —
download,upload_file(gated by user permission) - Misc —
wait_for,emulate,resize
See MCP Browser/MCP/MCPToolCatalog.swift for the authoritative list.
Privacy & safety
- Per-launch bearer token — clients without it get
401 Unauthorized - Origin / Host validation — blocks DNS-rebinding attacks from a malicious local web page
- User confirmation for downloads, uploads, and any
dialoginteractions - Local-only by default — server binds to
127.0.0.1, never the public network - Action log in Settings → you can see exactly what an agent has done in your browser
Requirements
- macOS 14+ (Sonoma or later)
- Xcode 16+ to build from source
Getting Started (users)
- Download the latest DMG from the Releases page.
- Drag MCP Browser to
/Applicationsand launch it. - Open Settings → Connection to copy the bearer token and MCP endpoint URL.
- In your MCP client (Claude Desktop, Codex, etc.) add the server. The app's Settings → MCP Clients tab can patch the config for the most common clients automatically.
- Browse normally. When the LLM needs to do something on the web, it calls the tools through MCP and you'll see the action in the log.
Getting Started (developers)
- Clone this repository.
- Open
MCP Browser.xcodeprojin Xcode. - Select the
MCP Browserscheme. - Build and run on My Mac.
CLI build:
Building your own fork
The project ships with the original author's signing settings. If you're forking to build and ship your own copy:
- Development team — open the
MCP Browsertarget in Xcode → Signing & Capabilities → pick your own team. This rewritesDEVELOPMENT_TEAMinMCP Browser.xcodeproj/project.pbxproj. - Bundle identifier — change
PRODUCT_BUNDLE_IDENTIFIERfromcom.moosia.mcp-browserto something you own. - No API keys are bundled. MCP Browser doesn't call any LLM provider itself — it only serves tools to whatever client connects.
Configuring an MCP client
Most MCP clients accept an HTTP transport block. Example for claude_desktop_config.json:
The bundled MCP Clients settings tab can write this for you for the clients it knows about (Claude Desktop, Codex, etc.) — pick the client, hit Add MCP Browser, and it'll patch the file in place.
The token rotates each time you click Regenerate token in Settings → Connection. Re-patch your clients after rotating.
Data Storage
- Bookmarks, history, zoom-per-host, downloads, and the action log are stored locally with
PersistentStore(file-backed) and SwiftData where appropriate. - The bearer token is stored in
UserDefaults. It's regenerated from Settings → Connection whenever you want to revoke existing clients. - Favicons are cached on disk under Application Support.
- No telemetry. No cloud sync. Nothing leaves the machine unless an MCP tool you invoke causes it to.
Project Structure
Key files
MCP/MCPServer.swift—NWListener-based HTTP/JSON-RPC server, auth, rebind defenseMCP/MCPCoordinator.swift— routes tool calls to the focused window's active tabMCP/MCPToolCatalog.swift— registry of every exposed toolMCP/MCPSecret.swift— Keychain-backed bearer tokenBrowser/BrowserTab.swift— per-tab@Observablemodel wrappingWKWebViewBrowser/WebViewHost.swift—NSViewRepresentablebridge
Security model
MCP Browser deliberately runs un-sandboxed so it can:
- Patch MCP-client config files in
~/Library/Application Support/~/.config - Drive other apps (e.g. open external schemes) when explicitly asked
It does not:
- Bind any network interface other than loopback (
127.0.0.1) - Accept connections without the per-launch bearer token
- Honor requests whose
Hostheader doesn't match127.0.0.1orlocalhost(DNS-rebinding defense) - Send anything off the machine on its own
If you're audit-minded, the entire HTTP surface is in MCP Browser/MCP/MCPServer.swift and is roughly 400 lines.
Known Limitations
- The action log isn't yet retroactively searchable from the UI.
- Multi-window support exists but the MCP coordinator only routes to the most-recently-focused window.
- The OAuth and basic-auth flows for sites are handled by WebKit; MCP Browser itself does not store passwords. Use the system keychain through Safari/Chrome import for now.
- No mobile/iOS build — this is a Mac-only tool.
Contributing
See CONTRIBUTING.md for how to file bugs, request features, and submit pull requests.
License
來源:README.md,提交 90d9a05
工具
0版本歷史
1- v1.0.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分