Prerequisites
Quick Start
Run the MCP server with one command:YOUR_API_KEY with your FlexPrice API key. Next: Add to your MCP client.
Installation Methods
- npm package (Recommended)
- Local repository
- Docker
Install globally or run directly with
npx:The base URL must include
/v1 with no trailing slash: https://us.api.flexprice.io/v1Add to Your MCP Client
Configure the FlexPrice MCP server in your AI assistant or editor.Cursor
VS Code
Open MCP configuration
Open Command Palette (Ctrl+Shift+P or Cmd+Shift+P) and run:
- MCP: Open User Configuration, or
- MCP: Add Server
Claude Code
Add the server via the CLI:claude and use /mcp to confirm connection.
Claude Desktop
Locate configuration file
Open the Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Available Tools
The MCP server exposes FlexPrice API operations as tools. Only operations with certain OpenAPI tags are included (e.g., Customers, Invoices, Events, Plans, Subscriptions). Common tools include:- Customers:
createCustomer,listCustomers,getCustomer,updateCustomer - Events:
ingestEvent,listRawEvents - Invoices:
listInvoices,getInvoice,createInvoice - Plans:
listPlans,getPlan,createPlan - Subscriptions:
createSubscription,listSubscriptions,cancelSubscription
docs/swagger/swagger-3-0-mcp.json).
Dynamic Mode (Progressive Discovery)
For large tool sets, dynamic mode reduces context size by exposing meta-tools for on-demand discovery:list_tools– List available tools with descriptionsdescribe_tool– Get input schema for specific toolsexecute_tool– Run a tool by name with parameters
--mode dynamic:
Dynamic mode is recommended for servers with many tools to improve token efficiency and tool selection.
Scopes (Optional)
Limit tools by scope for read-only or restricted access:read for read-only operations when the server defines scope-based restrictions.
Example Usage
Once connected, ask your AI assistant to perform FlexPrice operations:Alternative Configurations
Local Repository (Node)
For running from a cloned repo:Docker
For Docker-based stdio:Troubleshooting
Invalid URL or request errors
Invalid URL or request errors
- Ensure
BASE_URLor--server-urlis set tohttps://us.api.flexprice.io/v1(no trailing slash) - Verify the base URL includes
/v1 - Test the API key:
curl -H "x-api-key: YOUR_KEY" https://us.api.flexprice.io/v1/customers
API connection issues
API connection issues
- Credentials: Verify API key and base URL are correct
- Network: Check firewall/proxy settings
- Rate limiting: Reduce request frequency if hitting rate limits
Server not appearing in client
Server not appearing in client
- Restart your MCP client after adding configuration
- Check for JSON syntax errors in config file
- Verify Node.js 20+ is installed:
node --version
Missing dependencies (local repo)
Missing dependencies (local repo)
Run
npm install and npm run build in the server directoryDocker container exits
Docker container exits
- Check logs:
docker logs <container_id> - Verify environment variables are passed correctly
- Try
docker run -it --rm flexprice-mcp printenvto inspect env
Regenerating the Server
The MCP server is generated from a filtered OpenAPI spec. To regenerate after API changes:See the main repository README and AGENTS.md for detailed SDK/MCP generation and publishing workflows.
Next Steps
API Reference
Complete FlexPrice API documentation
MCP Specification
Learn more about Model Context Protocol
NPM Package
View package on npm
GitHub Repository
MCP server source code