Connect MerchantFlow to Claude Code
Connect MerchantFlow to Claude Code (the CLI) in one command via MCP. Ask about your store data right from the terminal.
Connect MerchantFlow to Claude Code
Claude Code is Anthropic's command-line coding agent. It supports remote MCP servers natively, so you can connect MerchantFlow with a single command - no config file to edit.
Prerequisites
- Claude Code installed (
npm install -g @anthropic-ai/claude-code) - A MerchantFlow account on the Plus tier
- Logged into MerchantFlow in your browser (for the one-time authorization)
Step 1: Add the server
Run this once, from any directory:
claude mcp add --transport http merchantflow https://merchantflow.ai/api/mcp
That registers MerchantFlow as a remote MCP server for your user. To scope it to a single project instead, add --scope project (writes to .mcp.json in the current repo).
Step 2: Authorize
Inside Claude Code, run:
/mcp
Select merchantflow, then choose Authenticate. Claude Code opens your browser to the MerchantFlow consent page. Click Allow access - the browser hands the token back to Claude Code automatically. You only do this once; the connection is remembered.
Step 3: Ask about your store
> What's my blended MER this week, and which channel is dragging it down?
Claude Code will call the MerchantFlow tools and answer with real numbers from your account.
Headless / CI environments
If the machine cannot open a browser (a server, SSH session, or CI runner), use a Personal Access Token instead of OAuth. Generate one in Settings - Developer - MCP, then pass it as a header when adding the server:
claude mcp add --transport http merchantflow https://merchantflow.ai/api/mcp \
--header "Authorization: Bearer mf_pat_your_token_here"
A PAT skips the browser flow entirely and works anywhere.
Make Claude 10x smarter (optional but recommended)
Download the MerchantFlow Skill file and add it to your project (for example as CLAUDE.md or a referenced instruction file). It teaches Claude how to think about ecommerce data and pick the right tool on the first try.
Troubleshooting
/mcp shows merchantflow as "failed" or "needs authentication"
- Re-run
/mcpand choose Authenticate. Make sure you're logged into MerchantFlow in the same browser. - Confirm the URL is exactly
https://merchantflow.ai/api/mcp(no/sseor other suffix).
Authorization succeeds but no tools appear
- Your account must be on the Plus tier. Check Settings - Developer - MCP shows the server as enabled.
Everything else
- See the Claude Desktop troubleshooting section - most issues apply identically.