Pocketsflow MCP Setup for Claude Code: Sell from Your Terminal
To set up Pocketsflow MCP in Claude Code, run claude mcp add --transport http pocketsflow https://api.pocketsflow.com/mcp --header “Authorization: Bearer pk_live_...” with an API key from Developers in your Pocketsflow dashboard, restart the CLI session, and prompt “list my Pocketsflow products” to verify. Claude Code then gets 53 tools for products, checkout, discounts, orders, refunds, subscriptions, and more, all scoped to that key. The whole setup takes about five minutes, and your first product can be live without ever opening a browser tab.
What Claude Code plus Pocketsflow actually gives you
Claude Code already lives where builders live: the terminal, next to git, npm, and your editor. Adding Pocketsflow as an MCP server turns that terminal into a storefront manager. You describe the outcome in plain words and Claude Code picks the right API calls over HTTP transport with your Bearer key.
Say “create a $49 one-time product called Pro license with a 20% launch discount and give me the checkout link” and Claude Code chains create_product to create_discount to create_checkout_session. Every action shows up in your dashboard at app.pocketsflow.com exactly as if you had clicked it by hand. If you started in the Claude web app, our guide to connecting Pocketsflow to Claude via MCP covers the no-key connector path; this post is the CLI-native version for terminal sellers.
What you need before you start
You need exactly three things:
- A Pocketsflow account. Selling has no monthly fee—each sale carries one estimated itemized transaction cost of 4.7% + $0.30 (about $5.00 on a $100 sale), shown line by line on every order.
- Claude Code installed and signed in, with MCP support enabled. Any recent version works; update first if your
mcpsubcommand is missing. - An API key from your dashboard at app.pocketsflow.com under Developers. Use a
pk_test_key while learning and apk_live_key for real money—test mode never touches real customers.
The hosted server address is always https://api.pocketsflow.com/mcp. That is a connector address for your MCP client, not a web page you visit. Full protocol details live in the Pocketsflow MCP server reference.
Step 1: Create an API key with the right scope
Open your Pocketsflow dashboard, go to Developers, and create a new API key. Give it a name you will recognize in six months, like “claude-code-terminal”. Copy the full key once—you cannot see it again later.
Scope matters because the MCP server can do everything the key can do and nothing more. A live key creates real products, real checkouts, and real charges. A test key does all the same things against sandbox data. Start with pk_test_, prove your workflow end to end, then repeat the setup below with pk_live_ when you are ready to sell. Keep keys out of screenshots, dotfiles you commit, and chat transcripts, and rotate a key the moment you suspect it leaked.
Test versus live, in one rule
If the key starts with pk_test_, nothing the agent does can charge anyone. If it starts with pk_live_, everything is real. Never mix them in the same session, and say which mode you are in out loud in your first prompt so the transcript is unambiguous.
Step 2: Add Pocketsflow to Claude Code
Run this single command in your terminal, replacing the placeholder with your real key:
claude mcp add --transport http pocketsflow https://api.pocketsflow.com/mcp --header “Authorization: Bearer pk_live_...”
For practice mode, use your pk_test_ key instead. Restart Claude Code or start a fresh session so the new server loads, then verify with a harmless read-only prompt first: “list my Pocketsflow products.” If Claude Code answers with your catalog, or an empty list on a new account, the connection works.
Other clients use the same URL
The same hosted server powers every MCP client. Cursor stores it in .cursor/mcp.json, Windsurf and VS Code use mcp.json, and headless agents can use the stdio bridge with npx -y @pocketsflow/mcp plus POCKETSFLOW_API_KEY. There is also a one-command skill install via npx skills add Pocketsflow/pocketsflow-imperium@pocketsflow. Learn the URL and key pattern once and you can reuse it everywhere.
Step 3: Run your first sale from the terminal
Here is the canonical first transcript. Paste this into Claude Code once connected: “Create a $49 one-time product called Pro license with a 20% launch discount, and give me the checkout link.” Behind the scenes Claude Code chains three tools: create_product builds the $49 listing, create_discount adds the 20%-off launch code, and create_checkout_session returns a shareable payment link.
Before you share that link, know your numbers. Pocketsflow has no monthly selling fee; each sale carries an estimated itemized transaction cost of 4.7% + $0.30. For the $49 Pro license that is $49 × 0.047 + $0.30 ≈ $2.60, so you keep about $46.40. A buyer using the 20% launch code pays $39.20, the estimated cost is $39.20 × 0.047 + $0.30 ≈ $2.14, and you keep about $37.06. All figures are illustrative estimates—the exact amount varies by payment method, buyer region, and currency, and is itemized on every order:
| Line item | Amount |
|---|---|
| Pro license, launch price (20% off $49) | $39.20 |
| Estimated transaction cost (4.7% + $0.30) | −$2.14 |
| You keep (estimate) | $37.06 |
Price with this math in mind from day one. Our guide to pricing digital products shows how to fold fees into prices customers still say yes to, and Pocketsflow itemizes the platform, payment infrastructure, tax handling when required, and dispute prevention on every order.
The 53 tools Claude Code gets
The connection exposes 53 tools across 13 groups. You never call them directly—you describe outcomes and Claude Code picks the calls. Here is the map so you know what to ask for: products (6), checkout (1), orders plus customers (4), subscriptions (3), refunds (3), discounts (5), upsells (5), reviews (1), webhooks (6), newsletters (10), link-in-bio (2), partners (6), and account (1).
Practical translation: products, discounts, upsells, and checkout cover launches; orders, refunds, and subscriptions cover operations; newsletters, link-in-bio, partners, and webhooks cover growth and automation. If you need product inspiration for what to sell through all of this, our roundup of MCP server ideas developers can build and sell is a strong starting list.
Merchant-of-record cover while you code
As your Merchant of Record, Pocketsflow assumes the legal and financial responsibility for each sale, including payment processing, tax calculation and remittance where required, fraud screening, and disputes. That is why a terminal workflow is safe to scale: you ship from the CLI while Pocketsflow handles global tax compliance and chargebacks behind the checkout link.
Five copy-paste prompts for terminal sellers
Once the first product works, these cover a full selling week:
- “Using test mode, draft a 25%-off weekend discount for my bestseller and show me the checkout link before creating anything.”
- “Add a $19 order-bump upsell to my Pro license checkout and estimate my earnings per 100 buyers at a 15% take rate.”
- “Summarize yesterday's orders: total revenue, refunds, and anything unusual I should look at.”
- “Draft a newsletter to past buyers announcing the Pro license launch discount, but do not send it until I approve the copy.”
- “Set up a partner program for the Pro license at 30% commission and draft the invite message for affiliates.”
Read every draft before it goes live, especially anything that charges money, refunds money, or emails customers. Claude Code proposes; you approve.
Troubleshooting and safety rules
Three fixes cover most CLI connection problems:
- Server not found: re-check the URL character by character—
https://api.pocketsflow.com/mcpwith HTTP transport and no trailing page path. Confirm theAuthorization: Bearerheader has the full key with no extra spaces or quotes. - Wrong data or missing products: you mixed up
pk_test_andpk_live_. List which key prefix the session uses, then re-add the server with the other key in a fresh session. - Tools load but calls fail: update Claude Code, restart the session, and retry the read-only “list my products” test. If that works, the write failure is usually a missing required field—ask Claude Code to show the exact tool arguments.
And three rules keep agent commerce safe: build every new workflow in test mode first, require your explicit approval before refunds, mass emails, or price changes go out, and treat anything the agent quotes from customer data as untrusted input worth verifying in the dashboard. Scoped keys, narrow permissions, and a human in the loop are the whole security model.
You now know the exact Claude Code command, the test-versus-live key discipline, all 53 tools, and the fee math on a first $49 sale. The connector takes minutes; the catalog is the real work, and you can build that conversationally too. Start free on Pocketsflow and let your terminal handle the busywork while you make the product.