Skip to main content
Claude Code is Anthropic’s official CLI coding agent. Connect it to Pocketsflow’s MCP server and it can act on your account directly — create products, read orders, issue refunds, manage webhooks, and send newsletters — while also using the docs as context to write integration code for you.
Prerequisites
  • Claude Code installed (npm install -g @anthropic-ai/claude-code).
  • A Pocketsflow API key. Create one in the dashboard under Developers → API keys. Use a pk_test_… key while building.

Two ways to use it

Act on your account (MCP)

Connect the Pocketsflow MCP server so Claude Code can call the API as your account — no client code required.

Write integration code

Point Claude Code at these docs to generate and debug checkout-session and webhook code against the public API.

1. Connect the Pocketsflow MCP server

The Pocketsflow MCP server exposes the full public API as Model Context Protocol tools. Add it with the Claude Code CLI:
Then start claude in your project and ask things like:
  • “List my last 10 orders and their totals.”
  • “Create a $29 product called Starter Kit and give me the checkout link.”
  • “Which subscriptions went past due this week?”
  • “Refund order ord_123 and tell the customer.”
Every tool call runs as your account, scoped by the API key. See MCP server for the full tool list and transport details.
Treat API keys like passwords. A pk_live_… key lets the agent create and delete real data. Develop with pk_test_…, and use a dedicated, revocable key per integration.

2. Give Claude Code project context

Create a CLAUDE.md at the root of your integration project so Claude Code follows Pocketsflow conventions when writing code:

3. Use the docs as a source

Claude Code works best when it can read the authoritative reference. Point it at:
Every page in these docs has a Copy / view as Markdown and Open in Claude option in the top-right menu — hand a page straight to the agent as context instead of pasting URLs.

Example: scaffold a webhook handler

Ask Claude Code:
Using the Pocketsflow docs, write an Express endpoint that verifies the X-Pocketsflow-Signature header against the raw body, handles order.completed idempotently, and reads metadata.external_order_id.
It can generate the handler, wire up the signature check, and — with the MCP server connected — send a test event to exercise it end to end.