flexprice MCP Server
A Model Context Protocol server that exposes the flexprice API as tools for AI assistants, enabling management of customers, plans, prices, subscriptions, invoices, payments, and events from IDEs or CLI.
README
flexprice MCP Server
A Model Context Protocol (MCP) server that exposes the flexprice API as tools for AI assistants (e.g. Claude, Cursor, VS Code, Windsurf). Use it to manage customers, plans, prices, subscriptions, invoices, payments, events, and more from your IDE or CLI.
Table of contents
- Prerequisites
- How to use the flexprice MCP server
- Add to your MCP client
- Tools
- Progressive discovery (dynamic mode)
- Scopes
- Troubleshooting
- Generating the MCP server
Prerequisites
- Node.js v20 or higher
- npm or yarn
- flexprice API key from your flexprice account
How to use the flexprice MCP server
You can run the server in two ways: npm package (one command) or local repo (clone and run). Pick one, then add it to your MCP client.
Option 1: npm package
Install: npm i @flexprice/mcp-server. Or run with one command (no clone or build):
npx @flexprice/mcp-server start --server-url https://us.api.flexprice.io/v1 --api-key-auth YOUR_API_KEY
Replace YOUR_API_KEY with your flexprice API key. Next: Add to your MCP client.
Option 2: Local repo
Use this if you want to change code or run without npm:
- Clone the repository and go to the MCP server directory (e.g.
api/mcpor the repo that contains it). - Install dependencies:
npm install - Create a
.envfile (from.env.exampleif present) with:BASE_URL=https://us.api.flexprice.io/v1(must include/v1; no trailing space or trailing slash)API_KEY_APIKEYAUTH=your_api_key_here
- Build:
npm run build - Start:
npm start
Docker (stdio): You can also build and run with stdio:
docker build -t flexprice-mcp .
docker run -i -e API_KEY_APIKEYAUTH=your_api_key_here -e BASE_URL=https://us.api.flexprice.io/v1 flexprice-mcp node bin/mcp-server.js start
Next: Add to your MCP client and use the Node from repo or Docker config below.
Add to your MCP client
Add the flexprice MCP server in your editor. Replace YOUR_API_KEY with your flexprice API key in all examples. Example config snippets are in examples/.
After connecting: In Cursor, open the MCP panel and confirm the server is connected. You can list tools and try an operation (e.g. list customers) from your assistant. In Claude, use /mcp to see connected servers and available tools.
Config file locations
| Host | Config location |
|---|---|
| Cursor | Cursor → Settings → MCP (or Cmd+Shift+P → "Cursor Settings" → MCP) |
| VS Code | Command Palette → MCP: Open User Configuration (opens mcp.json) |
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
Cursor
- Open Cursor → Settings → Cursor Settings and go to the MCP tab.
- Add a new MCP server and use this config (Option 1 — npx):
{
"mcpServers": {
"flexprice": {
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY"
]
}
}
}
VS Code
- Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run MCP: Open User Configuration or MCP: Add Server.
- Add:
{
"servers": {
"flexprice": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY"
]
}
}
}
Claude Code
claude mcp add flexprice -- npx -y @flexprice/mcp-server start --server-url https://us.api.flexprice.io/v1 --api-key-auth YOUR_API_KEY
Then run claude and use /mcp to confirm the server is connected.
Claude Desktop
Add to your Claude Desktop config file (path in the table above):
{
"mcpServers": {
"flexprice": {
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY"
]
}
}
}
Quit and reopen Claude Desktop.
Alternative configs
Node from repo (Option 2 — run from cloned repo):
{
"mcpServers": {
"flexprice": {
"command": "node",
"args": ["/path/to/mcp-server/bin/mcp-server.js", "start"],
"env": {
"API_KEY_APIKEYAUTH": "your_api_key_here",
"BASE_URL": "https://us.api.flexprice.io/v1"
}
}
}
}
Docker (Option 2 — stdio):
{
"mcpServers": {
"flexprice": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "API_KEY_APIKEYAUTH", "-e", "BASE_URL", "flexprice-mcp"],
"env": {
"API_KEY_APIKEYAUTH": "your_api_key_here",
"BASE_URL": "https://us.api.flexprice.io/v1"
}
}
}
}
After editing, save and restart Cursor or quit and reopen Claude Desktop so the MCP server is loaded.
Tools
The server exposes flexprice API operations as MCP tools. Only operations with certain OpenAPI tags are included (e.g. Customers, Invoices, Events). The allowed tags are configured in the repo; the filtered spec is docs/swagger/swagger-3-0-mcp.json. Tool names and parameters follow the OpenAPI spec. For the full list, see your MCP client’s tool list after connecting, or the OpenAPI spec (e.g. docs/swagger/swagger-3-0.json) in the repo.
Progressive discovery (dynamic mode)
Servers with many tools can bloat context and token usage. Dynamic mode exposes a small set of meta-tools so the assistant can discover and call operations on demand:
list_tools– List available tools with names and descriptionsdescribe_tool– Get the input schema for one or more toolsexecute_tool– Run a tool by name with given parameters
To enable dynamic mode, add --mode dynamic when starting the server:
"args": ["-y", "@flexprice/mcp-server", "start", "--server-url", "https://us.api.flexprice.io/v1", "--api-key-auth", "YOUR_API_KEY", "--mode", "dynamic"]
This reduces tokens per request and can improve tool choice when there are many operations.
Scopes
FlexPrice MCP tools are categorized into three permission scopes to allow fine-grained access control:
read- Read-only operations (GET requests): list customers, get invoices, view usage, query datawrite- Create/update operations (POST/PUT/PATCH): create customers, update subscriptions, modify resourcesdelete- Destructive operations (DELETE, finalization): delete resources, finalize invoices, void transactions
Mounting Specific Scopes
Control which tools are available by specifying scopes at server startup. You can combine multiple scopes or use a single scope for restricted access.
Read-only access (safest for exploration and reporting):
{
"mcpServers": {
"flexprice-readonly": {
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY",
"--scope",
"read"
]
}
}
}
Read and write access (most common for automation):
{
"mcpServers": {
"flexprice-full": {
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY",
"--scope",
"read",
"--scope",
"write"
]
}
}
}
Full access (including destructive operations):
{
"mcpServers": {
"flexprice-admin": {
"command": "npx",
"args": [
"-y",
"@flexprice/mcp-server",
"start",
"--server-url",
"https://us.api.flexprice.io/v1",
"--api-key-auth",
"YOUR_API_KEY",
"--scope",
"read",
"--scope",
"write",
"--scope",
"delete"
]
}
}
}
Note: Omitting --scope entirely will mount all available tools (equivalent to specifying all scopes).
Troubleshooting
"Invalid URL" or request errors
- The server builds request URLs from
BASE_URL+ path. IfBASE_URLis unset or wrong, requests fail. - Fix: Set
BASE_URL=https://us.api.flexprice.io/v1(no trailing space or slash afterv1). For npx, pass--server-url https://us.api.flexprice.io/v1. - If you get 404 on tool calls, ensure the base URL includes
/v1.
API connection issues
- Credentials: Check that your API key and base URL are correct. Test the key with the flexprice API (e.g.
curl -H "x-api-key: your_key" https://us.api.flexprice.io/v1/customers). - Network: Confirm the host can reach the flexprice API (firewall, proxy).
- Rate limiting: If you see rate-limit errors, reduce request frequency or contact flexprice support.
Server issues
- Port in use: If something else uses the port (e.g. 3000), change the server config or stop the other process.
- Missing dependencies: Run
npm installandnpm run buildin the server directory. - Permissions: Ensure the entrypoint is executable (e.g.
chmod +x bin/mcp-server.js).
Docker
- Build failures: Check Docker is installed and the daemon is running; try
docker build --no-cache. - Container exits: Inspect logs with
docker logs <container_id>. - Env vars: Verify env is passed:
docker run -it --rm flexprice-mcp printenv.
Generating the MCP server
The server is generated from a tag-filtered OpenAPI spec (docs/swagger/swagger-3-0-mcp.json), not the full spec. Only operations whose tags are listed in the allowed-tags configuration are included. To regenerate after API or overlay changes:
- (Optional) Edit the allowed-tags configuration to add or remove tags; then run
make filter-mcp-specto rebuild the filtered spec. - From the repo root, run
make sdk-all(this runsfilter-mcp-specautomatically, then generates the MCP server). - Run
make merge-customso custom files (including this README) are merged into the output. - Build and run:
npm run buildandnpm startfrom the MCP output directory.
See the main repo README and AGENTS.md for SDK/MCP generation and publishing.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。