frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I benchmarked MCP vs. CLI for browser automation. MCP wins by 25x

https://github.com/HKUDS/CLI-Anything/pull/212
1•Achiyacohen•1h ago

Comments

Achiyacohen•1h ago
Author here. Some context that didn't fit in the title.

I built safari-mcp a few weeks ago — a macOS-native Safari automation MCP server (no Chrome, no headless, keeps Safari logins). 84 tools via the Model Context Protocol, used directly by Claude Code, Cursor, Cline, etc.

When I saw HKUDS/CLI-Anything (29k stars, auto-wraps open-source software as agent-native CLIs), I wondered if wrapping safari-mcp as a CLI was actually a good idea — so I benchmarked it before shipping.

The numbers, measured live against real Safari:

  Per-call latency (10x list_tabs, warm cache):
    MCP (persistent stdio session):   119ms median
    CLI (subprocess per call):      3,023ms median
    MCP is 25.3x faster.

  5-op reactive workflow:
    MCP:                  2.7s
    CLI sequential:      15.3s
    CLI shell pipeline:  15.2s
    MCP 5.6x faster (pipelining does NOT amortize npx spawn).

  Token overhead per API call (real tools.json, cl100k_base tokenizer):
    MCP (84 tool definitions):  7,986 tokens
    CLI (just `bash` tool def):    95 tokens
    CLI 84x fewer per-call tokens.

  Accuracy: byte-identical output (both paths hit the same safari-mcp).
So for Claude Code / Cursor / Cline users, MCP is the right answer — 25x lower latency per call. I say this up front in the harness's README and SKILL.md.

The CLI exists for a different audience:

- Agents that don't speak MCP (Codex CLI, GitHub Copilot CLI, older frameworks, bash scripts) - CI / cron — subprocess-friendly, jq-pipeable JSON output - Long Opus sessions where tool-def tokens dominate cost. At $15/MTok input, sending 7,986 tokens of tool definitions on every API call adds up. 100-turn session: ~$12 in tool-def overhead for MCP vs ~$0.22 for CLI. Prompt caching narrows the gap to ~10x but it's still real money at scale.

The harness is schema-driven: an offline parser reads safari-mcp's Zod definitions, emits a JSON bundle, and at import time safari_cli.py generates 84 Click commands from it — zero manual mapping, parity tests pin the result. The parser went through 5 review rounds before I caught everything, including a sneaky nested-schema bug where .describe() was picked from the inner field instead of the outer.

Happy to answer questions about the architecture, the benchmark methodology, or why it took 5 review rounds to find all the bugs.

Full writeup with methodology and the bug post-mortems: https://dev.to/achiya-automation/mcp-vs-cli-for-browser-auto...

safari-mcp repo: https://github.com/achiya-automation/safari-mcp

Minimax M2.7 Weights Released

https://huggingface.co/MiniMaxAI/MiniMax-M2.7
1•anonym29•2m ago•0 comments

Mythos Just Proved the Alignment Field Is Building the Wrong Thing

https://substack.com/home/post/p-193928243
1•ajspizz•3m ago•0 comments

Ask HN: Do you remux WebM to MP4 without re-encoding?

1•vanta_tool•6m ago•0 comments

Show HN: Depsly – a CLI to see the dependency impact of NPM packages

https://github.com/sshiraz/depsly
1•cyborg933•7m ago•0 comments

Smartpress

https://smartpress.netlify.app
1•nickfosterna•14m ago•1 comments

Parity of permutations, impossible puzzles and the magical determinant [video]

https://www.youtube.com/watch?v=rUiulWItECQ
1•vismit2000•18m ago•0 comments

Oxygen made from Moon dust for first time

https://www.telegraph.co.uk/news/2026/04/09/oxygen-made-from-moon-dust-for-the-first-time/
2•jonbaer•25m ago•0 comments

cmakefmt: A lightning-fast CMake file formatter

https://github.com/cmakefmt/cmakefmt
1•rmast•25m ago•0 comments

Monsters in the Archives by Caroline Bicks – The Writing Secrets of Stephen King

https://www.theguardian.com/books/2026/mar/30/monsters-in-the-archives-by-caroline-bicks-review-t...
2•lermontov•26m ago•0 comments

Save Walter White

https://save-walt.onrender.com/
1•flykespice•27m ago•1 comments

Artemisia Gentileschi Masterpiece Goes to Auction–Without Its Face

https://news.artnet.com/market/gentileschi-mary-magdalene-fragment-dorotheum-auction-2763142
1•bookofjoe•31m ago•0 comments

Trick Might Stop Gulls from Nabbing Your Lunch

https://gizmodo.com/this-ridiculously-simple-trick-might-stop-gulls-from-nabbing-your-lunch-20007...
2•gnabgib•31m ago•0 comments

Linktree for Professionals

https://airlinkee.com/en/
1•wonsukchoi97•33m ago•0 comments

FullScope-MCP – Cut agent token usage by 60% without lossy summarization

https://github.com/justguy/FullScope-MCP/
1•justguyB•36m ago•0 comments

OpenOats – A meeting note-taker that talks back

https://github.com/yazinsai/OpenOats
3•rahimnathwani•40m ago•3 comments

After the Attack on Sam Altman's Home, Will AI CEOs Go on the Offensive?

https://www.motherjones.com/politics/2026/04/after-the-attack-on-sam-altmans-home-will-ai-ceos-go...
1•cdrnsf•42m ago•0 comments

The oldest known evidence of stitched clothing

https://refractor.io/history/oldest-evidence-stitched-clothing-fabric-prehistoric-oregon/
1•breve•45m ago•0 comments

Optimization of 32-bit Unsigned Division by Constants on 64-bit Targets

https://arxiv.org/abs/2604.07902
1•simjnd•46m ago•0 comments

B2alpha

https://b2alpha.io/
1•21J3phy•48m ago•0 comments

Elastic Tabstops (2006)

https://nick-gravgaard.com/elastic-tabstops/
1•birdculture•50m ago•1 comments

AI Job Loss Tracker

https://jobloss.ai/
21•gnabgib•50m ago•16 comments

We Are All Constantly Mutating – and That's a Good Thing

https://www.newyorker.com/magazine/2026/04/13/beyond-inheritance-roxanne-khamsi-book-review
1•mitchbob•1h ago•1 comments

More than 12 tons of KitKat's 'new chocolate range' stolen in Italy

https://www.theguardian.com/world/2026/mar/28/kitkat-stolen-italy-f1-bar
1•wslh•1h ago•0 comments

Artemis II Astronauts Back in Houston, Reunite with Families

https://www.nasa.gov/blogs/missions/2026/04/11/artemis-ii-astronauts-back-in-houston-reunite-with...
1•salkahfi•1h ago•0 comments

Curated Costa Rica: The Best Tailor-Made Experiences for Every Type of Traveller

https://johnquam.substack.com/p/curated-costa-rica-the-best-tailor
1•headmonkey•1h ago•1 comments

Unified Perception Engine: never render more than humans can see (public domain)

https://github.com/warofwar2011-dev/unified-perception-engine
1•Mars2011•1h ago•0 comments

The Enigma of Gertrude Stein

https://www.thenation.com/article/culture/gertrude-stein-afterlife-wade-review/
2•samclemens•1h ago•0 comments

Midnight Captain – A midnight commander inspired file manager

https://github.com/duguyue100/midnight-captain
3•duguyue100•1h ago•3 comments

Hackers meet match: New DNA encryption protects engineered cells from within

https://phys.org/news/2026-04-hackers-dna-encryption-cells.html
2•pseudolus•1h ago•0 comments

High-Level Rust: Getting 80% of the Benefits with 20% of the Pain

https://hamy.xyz/blog/2026-01_high-level-rust
2•maxloh•1h ago•0 comments