MCP vs API vs CLI: Which One Should You Use?
Three very different doors into the same building. Here's how to pick the right one without overthinking it.
In this chapter
- What MCP, API, and CLI actually are, in plain English
- A simple decision rule for picking the right one
- How Supabase, Stripe, and Vercel each offer all three
- Copy-paste prompts to set each one up with AI
The 30-Second Version
A service like Supabase doesn't give you just one way to connect. It usually gives you three. Each one is for a different moment in your build.
MCP: Plug Services Into Your AI
MCP stands for Model Context Protocol. It's a standard, built by Anthropic, that lets AI tools like Claude Code and Cursor connect directly to outside services. Once you set up an MCP, your AI can do things in that service on its own: no tab switching, no copy-pasting, no "here's my API key, go look this up."
Great for
- "Claude, check my database and tell me why this user isn't seeing their orders."
- "Look at my recent Vercel deploys and find the one that broke."
- "Search my Notion for the spec on the landing page."
- "Fix this Stripe webhook. Look at the real event in my Stripe dashboard."
Rule of thumb
If you keep copy-pasting something from a dashboard into your AI chat, there's probably an MCP for that. Set it up once.
API: How Your App Talks to the World
An API is the door your deployed app walks through to talk to someone else's service. This is the classic setup: your site running on the internet needs weather data, so it calls a weather API. A user clicks "Pay" and your site calls the Stripe API. A user signs up and your site calls the Supabase API to save them to the database.
Great for
- Showing live weather on your page
- Saving a new blog post to your database when someone clicks Publish
- Charging a credit card through Stripe at checkout
- Sending a welcome email through Resend when someone signs up
Rule of thumb
If a real user has to trigger the action, it's an API. APIs run while your app is live, at the speed of your users' clicks.
CLI: Commands You Run Once in a While
A CLI (command line interface) is a little program you install on your computer that lets you type one-line commands to a service. You use it for one-time setup jobs: the stuff you do before or around building, not the stuff your live app does.
Great for
vercel deploy: push your site livesupabase migration new: create a new database changestripe listen: test webhooks on your laptopgh pr create: open a pull request on GitHub
Rule of thumb
If it's a setup step, deploy step, or database migration, it's the CLI. Your AI runs these for you.
Same Service, Three Doors
Most modern platforms offer all three. Here's how Supabase does it. The pattern repeats everywhere.
supabase.from("posts").select() to fetch blog posts for visitors in real time.
supabase login once, then supabase db push to ship a schema change.
The Pattern Repeats Everywhere
Once you see it, you can't un-see it. Three popular services, same three-door setup.
| Service | MCP | API | CLI |
|---|---|---|---|
| Stripe | Let AI look up customers & debug failed payments | Your checkout page charges real cards | stripe listen to test webhooks locally |
| Vercel | Let AI read deploy logs & env vars | Programmatic deploys from another service | vercel deploy from your terminal |
| GitHub | Let AI read issues, PRs & comments | Your app shows repo activity to users | gh pr create to open pull requests |
The 3-Question Decision Rule
When you don't know which door to walk through, ask these in order.
Real World Example: Adding Stripe to a side project
You're building a SaaS and want to add Stripe. You'll actually touch all three: the CLI gets Stripe set up on your machine and tests webhooks. The API runs your live checkout when users pay. The MCP lets Claude read your Stripe dashboard while debugging failed subscriptions.
“I want to add Stripe subscriptions to my Next.js app. Please do three things: (1) Install the Stripe CLI and walk me through logging in so we can test webhooks locally. (2) Build a /api/checkout route that uses the Stripe API to create a checkout session and redirect the user. (3) If an MCP for Stripe is available in my setup, use it to verify my products and prices are configured correctly in my Stripe account before writing the checkout code.”
Prompts to Give Your AI Tool
Paste these into Claude Code, Cursor, or whichever AI tool you use.
“Set up the Supabase MCP in my project so you can read my database directly while helping me code. Walk me through getting the access token from my Supabase dashboard, adding the MCP config, and restarting the editor. Then confirm you can see my tables.”
“Add a /api/checkout route to my Next.js app that calls the Stripe API to create a checkout session for a $19/month subscription. Use an environment variable for the Stripe secret key. Show me a Subscribe button on the pricing page that redirects to Stripe.”
“Install the Vercel CLI on my computer, log me in, and deploy my current project. Walk me through each command, explain what it's doing, and tell me the live URL when it's done.”
“I want to [describe what you're trying to do]. Tell me whether I need an MCP, an API, or a CLI for this, and why. If I need more than one, explain the order I should set them up in.”
Prompt This
Two quick prompts to use right away.
“Look at my project and tell me which MCPs, APIs, and CLIs I'm currently using. For each one, explain what it's doing and whether I'm using the right tool for the job, or whether I should switch to a different one.”
“Based on the services in my project, suggest which MCPs I should install for my AI coding tool. Explain what each MCP would let you do that you can't do today, and walk me through installing the top 2 in priority order.”
Common Questions
What does MCP stand for?
MCP stands for Model Context Protocol. It's a standard way for AI tools (like Claude Code or Cursor) to plug directly into other services, so the AI itself can read your database, check your deployments, or search your Notion without you copy-pasting anything.
Is an MCP the same as an API?
Not quite. An API is how your deployed app talks to another service. An MCP is how your AI coding tool talks to another service while it's helping you build. Most platforms that offer an MCP also offer an API. You use each one for different situations.
Do I need a CLI if I'm vibe coding?
Usually yes, but your AI does the typing. A CLI (command line interface) is how you set things up on your computer: creating a project, deploying, running migrations. You tell your AI what you want, and it runs the CLI commands for you.
How do I know which one to use for a task?
Ask: is this something my AI needs to do right now while building? → MCP. Is this something my app needs to do for users at runtime? → API. Is this a one-off setup or deploy step? → CLI.