module 08 connect tools

MCP vs CLI

System Text-to-Speech Ready
Slide: 0:00 / 0:00
Slide 1 of 0Interactive Deck

Full Lesson Reference

MCPs aren't the only way Claude Code connects to external services. There's a second option called a CLI - command-line interface. Sometimes CLIs are better. This lesson covers the trade-off.

What a CLI is

A CLI is a tool that runs in your terminal and does one specific thing. Claude can invoke CLIs the same way you would - running a command with arguments, reading the output.

Examples of CLIs Claude Code uses

  • gh - GitHub CLI (repos, PRs, deploys, issues)
  • supabase - Supabase database access
  • gws - Google Workspace (Docs, Sheets, Drive, Slides)
  • npx - Node package runner (runs utilities + tools)
  • curl - raw HTTP requests

You've already installed gh in Module 01. The others install on-demand when Claude needs them.

MCP vs CLI - the difference

Both connect Claude to external services. The difference is HOW:

Mcp

  • Loads tool schemas into context (more overhead)
  • Structured tool-call interface
  • Platform provides the abstraction
  • Good for platforms with many actions + complex data
  • Claude picks the right tool based on your instruction

Cli

  • Zero idle overhead - nothing loads until Claude runs a command
  • Freeform command-line interface
  • Claude figur es out which flags + arguments to use
  • Good for narrow, single-purpose tools
  • Much more efficient when a CLI exists for what you need

When CLIs beat MCPs

For some platforms, CLIs are just plain better

  • GitHub - gh CLI is lightweight, Claude knows it well, no schema overhead. There IS a GitHub MCP but the CLI is usually faster + cheaper.
  • Google Workspace - gws CLI for Docs/Sheets/Drive. Simpler than connecting multiple MCPs.
  • Supabase - the CLI handles database operations better than the MCP for most cases.
  • File operations - standard shell commands (ls, cat, grep) beat any file-system MCP.

When MCPs beat CLIs

For most marketing platforms, MCPs are better or the only option:

  • Google Ads - the MCP handles GAQL queries, customer IDs, authentication elegantly. No equivalent CLI.
  • Meta Ads - same reason - structured platform with lots of data + actions.
  • Klaviyo, GA4, Notion, Slack - Claude Connectors handle auth + schemas.
  • Anything with OAuth flows + multi-account access. How Claude decides

Most of the time, you don't decide - Claude does. Tell it what you want, and it picks the best tool available:

Pull the last 30 days of Klaviyo campaigns. → Uses Klaviyo MCP

Commit this file and push. → Uses gh CLI

Query my Supabase memory for last 5 sessions. → Uses supabase CLI

Create a Google Doc with this content. → Uses gws CLI

When multiple options exist (e.g. GitHub has both MCP + CLI), Claude defaults to the more efficient one based on your CLAUDE.md preferences. You can override:

Use the gh CLI, not the GitHub MCP, for this operation.

The efficiency hierarchy

Most efficient to least

  1. Database queries (pre-aggregated, one call, minimal tokens)
  2. CLIs (zero idle overhead, lean per call)
  3. MCPs with deferred loading (small idle cost, moderate per call)
  4. MCPs without deferred loading (legacy setup, avoid)
  5. Web scraping / raw HTTP (most fragile + expensive)

Claude picks based on availability. You can guide with project-level CLAUDE.md preferences.

Power-user tips

  • Install gws once, use everywhere - the Google Workspace CLI covers Docs/Sheets/Drive/Slides. One-time setup, high leverage.
  • Check what's available - "show me all CLIs installed on my machine that Claude can use"
  • Prefer CLI when both exist - your CLAUDE.md should say "default to CLIs over MCPs when both are available"
  • Don't install every possible CLI - only install what you actually need. Bloat costs time.

Action items

☐ Understand the trade-off: MCP (schemas + structured) vs CLI (lean + flexible)

☐ Confirm gh CLI is installed (from Module 01)

☐ Consider installing gws CLI for Google Workspace work

☐ Add to CLAUDE.md: "default to CLIs over MCPs when both are available for the same task"

Next lesson: Managing MCPs per project.

Exercises

  1. Review the concepts covered in this lesson: MCP vs CLI.
  2. Write down your key takeaway from this lesson.
  3. Practice running any commands or prompts mentioned above inside your terminal.