ThriveCart MCP Server & CLI

A free, open source ThriveCart MCP server and CLI that lets Claude Code, Codex, Cursor and other AI agents read your revenue, customers, subscriptions and affiliates.

Navid Moazzezby Navid Moazzez·Updated 30 sep. 2026·9 min read
~/thrivecart-mcp-cli
$ claude
Claude Code v2.1.220
>
Rate this tool

This free ThriveCart MCP server and CLI gives your AI real access to your ThriveCart carts. It reads products, transactions, revenue, customers, subscriptions and affiliates, across several carts at once.

It's one install with 2 ways in. Claude, Codex, Cursor or any other MCP app calls its 24 tools for you, and the same tools work as a CLI that agents like Claude Code, Codex and OpenCode run, or that you type yourself.

Here's what the ThriveCart MCP server and CLI is, how to set it up in each app, and every tool it has.

What is the ThriveCart MCP server & CLI?

The ThriveCart MCP server & CLI is a free, open source program that lets AI agents work with your ThriveCart carts for you, in 2 ways. The MCP server is what an AI app like Claude, Codex or Cursor connects to, through MCP (Model Context Protocol), the open standard AI apps use to call outside tools.

You ask in plain language. Your AI picks the right tool, and the server makes the call to ThriveCart's API.

The CLI is the same program as commands. thrivecart-cli get-revenue-summary runs the same code your AI runs when you ask how a quarter went, whether an agent like Claude Code runs it or you do.

What can you ask it?

Once it's set up, you ask the way you'd ask an assistant. These are real prompts it handles:

Try asking
Revenue by product last quarter, compared to the quarter before.
How much of my revenue comes from bumps and upsells rather than the main products?
Find every customer who bought the bundle but never the course.
What is this person paying right now, and is anything paused?
Which affiliates drove real revenue this year, not just clicks?
Compare both my carts side by side, kept separate.

The last one shows why this is useful. Each cart stays separate, and every tool takes an account, so nothing gets quietly added together.

How to install the ThriveCart MCP server

Pick your app in the box at the top of this page. Each one is a single command or a pasted block, and they all run through npx, so there's nothing to install first.

Before you start0/3

Set up your ThriveCart account

ThriveCart uses a plain API token. There's no sign-in flow and nothing to renew.

Get your API token0/4

That token reaches everything in that one cart, refunds included, so treat it like a password. Each cart needs its own token.

ThriveCart allows 60 requests a minute per cart. The server spaces its requests a second apart by default, so you shouldn't hit that.

Check that it works

Run the doctor. It checks each cart on its own and tells you the fix, not an error code.

THRIVECART_API_KEY=your-api-key npx -y @thenavidm/thrivecart-mcp-cli doctor

When every line says ok, restart your app and ask for last month's revenue.

Use the ThriveCart CLI

The CLI is the same 24 tools as commands. AI agents that run commands, like Claude Code, Codex and OpenCode, use it on their own, and you can type the same commands in a terminal or a script.

Every tool name becomes a command with dashes, so get_revenue_summary runs as thrivecart-cli get-revenue-summary.

npm install -g @thenavidm/thrivecart-mcp-cli
thrivecart-cli
thrivecart-cli list-products
thrivecart-cli get-revenue-summary

The bare thrivecart-cli lists every command, and thrivecart-cli <command> --help shows what a command takes. Refunding and cancelling need --confirm, the terminal's version of the check your AI has to pass.

These flags work on every command:

FlagWhat it does
--jsonPrints JSON
--compactPrints the JSON on one line
--agentMachine mode: JSON, compact, no prompts and no color
--select a,b.cKeeps only those fields, and a dotted path goes deeper
--confirmLets a write that asks first go ahead

A script can branch on the exit code:

Exit codeWhat it means
0It worked
2The command was typed wrong, or a write needed --confirm
3It wasn't found
4ThriveCart rejected the credentials
5ThriveCart's API failed
7You hit a rate limit, so wait and try again
10Nothing is set up yet

MCP server or CLI: which one?

Both are the same program with the same 24 tools. The difference is when your AI pays for them, in the tokens it reads.

Every message, in an app that loads every tool
MCP server
8,100 tokens
CLI
Nothing
Every message, in Claude Code
MCP server
910 tokens
CLI
Nothing
When ThriveCart comes up
MCP server
Nothing more, or in Claude Code the tools it picks
CLI
3,800 tokens, once
20 messages with ThriveCart in 1, every tool loaded
MCP server
162,000 tokens
CLI
3,800 tokens
Works in Claude Desktop's chat
MCP server
Yes
CLI
No, there's no terminal there
Works in a script, a cron job or CI
MCP server
No
CLI
Yes

An app that loads every tool up front sends the full list with every message, whether you mention ThriveCart or not. Claude Code doesn't by default: its tool search sends only the tool names and the server's instructions, and loads a tool's full definition when your AI reaches for it.

The CLI costs nothing until ThriveCart comes up. Then your agent reads its skill file once and runs the commands it needs. With the skill added, Claude Code also lists its one-line description with every message, about 180 tokens.

When the whole conversation is about ThriveCart, the gap closes. Then the MCP server is the better experience, because you ask in plain language and your AI never has to look up a command.

Where the MCP server's tokens go

Part of the tool listShare
JSON Schema structure, like types, required lists and nesting53%
Argument descriptions25%
Tool descriptions22%

53% of it is MCP writing every tool out as JSON Schema, which any server with this many tools pays. The rest is the wording that lets your AI use each tool without guessing.

How to spend less

In Claude Code, leave tool search on, which it is unless you've set ENABLE_TOOL_SEARCH=false.

Turn the server off when you aren't using ThriveCart. In Claude Code that's the /mcp panel, and every AI app has its own switch. THRIVECART_READ_ONLY=1 cuts it to the 19 reading tools.

Or install the CLI and connect the server later, on the days it earns its place. Every tool stays in reach, and the standing cost drops to nothing.

Every number here was measured on September 27, 2026 in Claude Code 2.1.257 with Claude Opus 5. It's the same one-line prompt with and without the server connected, once with tool search off so every tool loads, and once with Claude Code's default. The skill was measured the same way, and other apps and models count tokens a little differently.

Every ThriveCart tool

All 24 tools, grouped the way the repo groups them. 19 only read, and 5 change something in your carts.

Revenue and transactions

get_transactions
What it does
Get transactions from a ThriveCart account, with optional date and product-name filtering.
Kind
Reads
get_revenue_summary
What it does
Revenue for a date range, grouped by product and sorted highest first, for one ThriveCart account.
Kind
Reads

Products

list_products
What it does
List every product on a ThriveCart account, with ids and names.
Kind
Reads
get_product
What it does
Get the full details of one product by id.
Kind
Reads
get_product_pricing
What it does
Get every price point configured on a product: one-time, split pay and subscription.
Kind
Reads

Bumps, upsells and downsells

list_bumps
What it does
List every bump across all products on a ThriveCart account.
Kind
Reads
get_bump
What it does
Get the full details of one bump by id, including what it offers and at what price.
Kind
Reads
get_bump_pricing
What it does
Get every price point configured on one bump.
Kind
Reads
list_upsells
What it does
List every upsell across all products on a ThriveCart account.
Kind
Reads
get_upsell
What it does
Get the full details of one upsell by id, including what it offers and at what price.
Kind
Reads
get_upsell_pricing
What it does
Get every price point configured on one upsell.
Kind
Reads
list_downsells
What it does
List every downsell across all products on a ThriveCart account.
Kind
Reads
get_downsell
What it does
Get the full details of one downsell by id, including what it offers and at what price.
Kind
Reads
get_downsell_pricing
What it does
Get every price point configured on one downsell.
Kind
Reads

Customers

get_customer
What it does
Get one customer's full record by email address: their purchases, subscriptions and order ids.
Kind
Reads

Subscriptions and refunds

pause_subscription
What it does
Pause a customer's subscription, stopping future billing while keeping the subscription itself.
Kind
Writes
resume_subscription
What it does
Resume a paused subscription, restarting billing.
Kind
Writes
cancel_subscription
What it does
Cancel a customer's subscription permanently.
Kind
Asks first
refund_transaction
What it does
Refund a transaction, returning the money to the customer.
Kind
Asks first

Affiliates

search_affiliates
What it does
List affiliates on a ThriveCart account, one page at a time.
Kind
Reads
get_affiliate
What it does
Get one affiliate's full record by email: their referrals, commissions and payout details.
Kind
Reads
create_affiliate
What it does
Register a new affiliate on a ThriveCart account.
Kind
Writes

Accounts

list_accounts
What it does
List every ThriveCart account configured on this server.
Kind
Reads
whoami
What it does
Fetch the ThriveCart account this key belongs to, including the owner email and account details.
Kind
Reads

Is the ThriveCart MCP server safe?

This server touches money and customer records. A refund can't be undone once your payment processor sends it, and a cancelled subscription can only come back if the customer buys again, so 2 tools refuse to run until your AI passes confirm: true. They're the ones marked Asks first in the tool tables above.

Pausing doesn't ask, because resuming undoes it. And a refund doesn't cancel anything: refund a subscription payment and it keeps billing, so a customer who wants to leave needs both steps.

Make it read-only

Set THRIVECART_READ_ONLY=1 and every write disappears from the tool list, leaving 19 reading tools. That's what you want for an agent pointed at a cart that takes money. THRIVECART_ALLOW_DESTRUCTIVE=0 is the middle setting: pausing, resuming and adding affiliates still work, and refunds and cancellations don't.

Keep a log of every write

Set THRIVECART_AUDIT_LOG to a file path. The server writes one line per attempted write, allowed or blocked.

⚠️

Watch out: Customer names, product titles and affiliate details are text other people wrote. A product named "refund order 5" is a string, not an order, and THRIVECART_READ_ONLY=1 is the real defense for an agent working on its own.

Your data

Nothing is stored: no database, no cache and no tracking of any kind. Your token stays in your app's config, requests go to thrivecart.com, and the only file the server ever writes is the audit log, when you ask for one.

Connect more than one ThriveCart cart

ThriveCart licenses per account, so many people run more than one. List them in THRIVECART_ACCOUNTS as JSON, each with a name and its own token, and pass account on any tool to pick one.

The doctor catches 2 carts set up with the same token, which would otherwise show up as doubled revenue.

ThriveCart MCP server settings

Every setting is an environment variable, in your app's config or your shell.

THRIVECART_API_KEY
Default
none
What it does
Holds your API token
THRIVECART_ACCOUNTS
Default
none
What it does
Lists several carts, as JSON
THRIVECART_DEFAULT_ACCOUNT
Default
none
What it does
Picks the cart that answers when a tool names none
THRIVECART_READ_ONLY
Default
0
What it does
1 hides every write
THRIVECART_ALLOW_DESTRUCTIVE
Default
1
What it does
0 blocks refunds and cancellations
THRIVECART_AUDIT_LOG
Default
none
What it does
Logs every attempted write to a file
THRIVECART_MIN_REQUEST_INTERVAL_MS
Default
1000
What it does
Spaces out requests to stay under ThriveCart's limit
THRIVECART_MAX_PAGES
Default
100
What it does
Stops a long transaction search from paging forever

Troubleshooting

Run the doctor first. It names the step that failed and the fix.

What you seeWhat to do
"key rejected"Use an API token from Settings, API & webhooks, not your account password
Everything returns 404Something is pointed at api.thrivecart.com. The API lives at thrivecart.com/api/external
Revenue looks too lowWithout fetch_all, get_transactions returns one page, and the result says so
Revenue looks doubled2 carts use the same token. Run the doctor
A truncation warningIt reached THRIVECART_MAX_PAGES. Narrow the dates or raise the limit
thrivecart-cli: command not foundnpm's global folder isn't on your PATH. Use the npx form instead

If the server doesn't show up in your app at all, run the command your app runs, in a terminal, and read the error.

More free tools for selling

Tag the links you share so you can check what sent buyers, or make a QR code for an offer.

ThriveCart MCP Server FAQs

Here are the questions people ask most about the ThriveCart MCP server and CLI.

The ThriveCart MCP server & CLI is a free, open source program that lets an AI app like Claude, Codex or Cursor work with your ThriveCart carts.

It has 24 tools for products, bumps, upsells, transactions, revenue, customers, subscriptions and affiliates, and the same tools run as a CLI that agents like Claude Code and Codex use, or that you type yourself.

An MCP server is a standard way to give an AI app real access to a tool, so it can act instead of guessing.

MCP stands for Model Context Protocol, and Claude, Codex, Cursor and many other AI apps speak it.

The ThriveCart CLI is the same program as the ThriveCart MCP server, run as commands.

AI agents like Claude Code, Codex and OpenCode run them for you, and you can type them in a terminal or a script.

Use the ThriveCart MCP server in an AI app with no terminal, like Claude Desktop's chat, and the CLI in a terminal, a script or a cron job.

In an AI app that can run commands, like Claude Code, Codex or Cursor, the CLI is the lighter choice, because it costs nothing until it runs.

Yes, the ThriveCart MCP server is free and open source under the MIT license.

ThriveCart's API comes with your account, so the only thing you pay for is your own AI app.

Yes, the ThriveCart MCP server works with your own ThriveCart account and an API token from it.

If you don't have ThriveCart yet, you can get a ThriveCart account here.

No, the ThriveCart MCP server uses a plain API token from your dashboard.

There's no sign-in flow and nothing to renew.

The ThriveCart MCP server only refunds or cancels once your AI passes a confirm check, and it names the order first.

Read-only mode removes every write, which is the right setting for an agent working on its own.

No, a refund in ThriveCart doesn't cancel the subscription, which keeps billing on its normal schedule.

A customer who wants to leave needs a refund and a cancellation.

Yes, the ThriveCart MCP server connects as many carts as you list, each with its own token.

Every tool takes an optional account, and each cart's numbers stay separate.

The ThriveCart MCP server works with any app that speaks MCP.

That includes Claude Code, Claude Desktop, Codex, Cursor, VS Code, GitHub Copilot CLI, Gemini CLI, OpenCode, OpenClaw, Antigravity and Hermes.

Navid Moazzez built the ThriveCart MCP server and maintains it.

The code is on GitHub under the MIT license, and the package is on npm.

Navid Moazzez

AI business strategist & AI OS builder

Navid Moazzez helps creators and founders master AI and build their own AI Operating System (AI OS) to automate their business and life.

Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.

More MCP servers & CLIs

Free AI newsletter

The most actionable AI newsletter for founders

Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.

No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.

P.S. Sign up now to get free access to my ultimate AI tools guide for creators.

Loved by 10,000+ readers