Skip to main content
Cursor is an AI-native code editor. Connect it to the Pocketsflow MCP server and it can call the API as your account while you build; add a project rule so it writes integration code the right way.
Prerequisites
  • Cursor installed.
  • A Pocketsflow API key from Developers → API keys (use pk_test_… while building).

Connect the Pocketsflow MCP server

Add the Pocketsflow MCP server to Cursor’s MCP config at ~/.cursor/mcp.json (global) or .cursor/mcp.json (per project):
Reload Cursor. In Composer/Chat (Agent mode), Cursor lists the Pocketsflow tools and can run them — “list my products”, “create a checkout link for product X”, “show orders from the last 7 days”. Each call runs as your account, scoped by the key.
Keep ~/.cursor/mcp.json out of version control — it contains your API key. Prefer a pk_test_… key, and never commit pk_live_… keys.

Add a project rule

Create a Cursor project rule so the editor follows Pocketsflow conventions when generating code. In your integration repo:
Create .cursor/rules/pocketsflow.mdc:
Add https://api.pocketsflow.com/docs.json (the OpenAPI spec) to Cursor’s Docs so it can search endpoint definitions while it codes. You can also use the Open in Cursor / Copy as Markdown action in the top-right of any docs page to hand a page in as context.

Typical workflow

1

Describe the integration

In Agent mode, ask Cursor to build the checkout + webhook flow, referencing the rule and docs.
2

Let it call the API via MCP

Have it create a test product and a checkout session with your pk_test_… key to validate the request shape.
3

Test the webhook

Ask it to send a test event and confirm your handler verifies the signature and settles the order.