I built a Bitbucket CLI — and it convinced me CLIs beat MCP servers for AI agents

Published: (April 16, 2026 at 08:49 PM EDT)
3 min read
Source: Dev.to

Source: Dev.to

Cover image for I built a Bitbucket CLI — and it convinced me CLIs beat MCP servers for AI agents

Overview

GitHub has gh. GitLab has glab. Bitbucket Cloud has…?
It’s called bb.

Basic commands

bb pr list                 # open PRs, most recent first
bb pr view 42              # details, reviewers, status — no browser
bb pr diff 42              # raw diff, pipeable into less / delta / anything
bb pr merge 42             # merge, squash, or fast‑forward
bb pipeline wait          # blocks until the current build finishes

Why CLIs beat MCP servers for AI agents

1. Tool schemas burn context on every turn

An MCP server advertises its tools as JSON schemas that get injected into the model’s context on every message. Twelve tools, twelve schemas, every turn. A CLI advertises itself once, through --help, and the agent remembers the shape. You pay the tokens once, not forever.

2. Shell is the universal tool protocol

Every agent framework — Claude Code, Cursor, Aider, Codex, the next one — already knows how to run bash. bb pr view 42 works the day you install it, in every tool, with zero integration code. MCP needs a client that speaks MCP, which adds non‑trivial coupling for something that was always going to be a subprocess under the hood.

3. Composition is free

bb pr list --output-style ai | grep OPEN | head -5
bb pipeline latest --output-style ai | jq -r .status
bb pr diff 42 | wc -l

An agent can pipe, filter, count, and chain — all using primitives it already knows. An MCP tool is a sealed function call; you can’t grep an MCP response or pipe it into jq. Every slice and dice would require a new tool or a new argument.

4. You can debug it

When the agent does something weird, you can run the exact command it ran and see the exact output it saw. With MCP, the agent sees a structured payload the server built, and you’re left reconstructing what happened from logs.

5. Distribution is solved

npm install -g @hugo-hebert/bbucket-cli and you’re done. No config file, no server process, no “restart your editor so the tool picks up.” The agent inherits the tool the moment the shell does.

The one thing CLIs owe to agents

Existing CLIs fall short on default output, which is hostile to models because of box‑drawing characters and ANSI colours. Every bb command therefore has a third mode next to the default and --json:

bb pr list --output-style ai

Output (tab‑separated, no colour, no borders):

42  OPEN    Fix auth token refresh       hugo
41  MERGED  Add env variable endpoint    sara

Set it as the default with bb option --output-style ai and an agent can read the output in one pass. That’s the whole adaptation—no server, no schema, no protocol—just an output mode. You get most of what an MCP server provides without the integration tax.

Try it

npm install -g @hugo-hebert/bbucket-cli
bb auth
bb pr list
  • Repo:
  • Docs:

Demo

0 views
Back to Blog

Related posts

Read more »