@kelviq/mcp-server is the official Model Context Protocol server for Kelviq. It plugs into any MCP-compatible client — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code, Antigravity — and exposes the full Kelviq API as typed tools that the LLM can call directly, plus the entire Kelviq documentation as searchable resources.
Instead of asking your assistant to “write me a curl command,” you describe the outcome (“create a Pro plan under product X and publish it”) and it does the work in a single turn.
45 tools spanning customers, checkout, subscriptions, entitlements, licenses, usage, offerings, promotions, the customer portal, and full catalog management (products, plans, features) — plus 69 resources including the full OpenAPI spec, and 3 guided prompts for the most common workflows. Every tool carries MCP safety annotations, so clients can auto-approve read-only calls while confirming destructive ones.
How It Works
The server runs locally on your machine as a Node process started by your AI client. It speaks the MCP stdio transport — your client launchesnpx -y @kelviq/mcp-server, connects over stdio, and discovers the tools and resources advertised by the server.
When the LLM decides to call a Kelviq tool, the server:
- Validates the LLM-provided arguments against a Zod schema derived from Kelviq’s OpenAPI spec.
- Adds your API key as a Bearer token and sends the HTTPS request to the appropriate Kelviq host.
- Returns the JSON response (or a structured
{"error": {...}}object) back to the LLM.
Step 1: Get Your API Keys
- Sign in at app.kelviq.com.
- Navigate to Settings → API Keys.
- Copy:
- Server API Key — required for all API tools.
- Client API Key — required only for the
promotion_gettool.
Step 2: Add the Server to Your AI Client
Every client uses the same underlying command —npx -y @kelviq/mcp-server — with your two keys passed as environment variables. What differs is the config file location and, in a few cases, the root JSON key. Pick the tab for your client.
- Claude Code
- Claude Desktop
- Cursor
- Windsurf / Devin Desktop
- VS Code (Copilot)
- Antigravity
- Other Clients
The
-- separator is required so that claude doesn’t intercept -y as one of its own flags. Put all --env arguments before the --./mcp inside a Claude Code session — you should see kelviq ✓ Connected, 45 tools.Step 3: Try It
In a new session, type a prompt like:Search Kelviq docs for license keys.or
List my Kelviq products.Your AI client should pick the right tool, call it, and show the result inline. If you see a
Configuration error, your env vars didn’t make it through — re-check the config above.
Environment Variables
Point at Staging
Tool Reference
Tools are grouped by domain. Each tool name usesdomain_action form (customer_create, plan_publish). The LLM picks the right tool from the description automatically — you rarely need to name a tool explicitly.
Customers
Checkout & Portal
Subscriptions
Entitlements, Licenses, Usage
Offerings & Promotions
Catalog: Products
Catalog: Features
Catalog: Plans
Plans are versioned. Updates create a draft;plan_publish releases it.
Docs (no API key required)
Resources
Resources let your AI client pin pages into context. The server advertises three categories:
For exhaustive per-endpoint request/response shapes, the OpenAPI spec is the source of truth. Ask your assistant “check the OpenAPI spec for createSubscription” and it will read the resource directly.
Built-in Prompts
The server ships three MCP prompts that encode Kelviq’s golden-path workflows — including the gotchas (plans start as invisible drafts until published; entitlements attach by feature UUID; pricing is set in the dashboard or with the Kelviq CLI, not through the MCP server). In Claude Code they appear as slash commands (e.g./kelviq:setup_product); other MCP clients list them under prompts.
Example Prompts
Describe the outcome, not the API call. A few realistic prompts that exercise the toolchain:Build a catalog from scratch
Build a catalog from scratch
Create a Kelviq product called “Notion Plus” with tax codeCalls (in order):saas, then create three plans (Free, Pro Monthly, Pro Yearly), add anapi-callsfeature with limits 1000 / 50000 / unlimited, and publish all three plans.
product_create → feature_create → plan_create × 3 → plan_entitlements_add × 3 → plan_publish × 3. Set each plan’s prices in the dashboard or with the Kelviq CLI, which manages pricing as reviewable code.Issue a checkout link
Issue a checkout link
Create a checkout session for plan pro-monthly for a new customer, success URL https://example.com/done.
Calls: checkout_create_session. Returns the checkoutUrl you can hand to your buyer.License key management
License key management
Activate licenseCalls:LIC-ABCDEfor customergeojacob, instance name “MacBook Pro M3”, then validate it.
license_activate → license_validate.Inspect customer state
Inspect customer state
Show me all subscriptions for customer acme-42 and tell me which features they have access to.
Calls: subscription_list → entitlements_get.Documentation lookup
Documentation lookup
How do digital downloads work in Kelviq? What’s the file-size limit?Calls:
docs_search → docs_read. No API key needed — works offline.Tips for Effective Prompts
- Mention “Kelviq” early. LLMs typically have many MCP tools loaded. Saying “create a Kelviq customer” steers the model toward this server’s tools instead of guessing.
- Use
docs_searchfor fuzzy questions. When you’re unsure of an identifier or behaviour, ask the LLM to “search Kelviq docs” first — it grounds the follow-up calls in real semantics. - Trust the errors. Tools return
{"error": {"status", "message"}}shapes for API errors. The LLM reads them and adjusts automatically (e.g. “Invalid product identifier” → asks you for the right one). - Combine tools in one prompt. The LLM is happy to chain calls. “Create the product, then publish all its plans” is one prompt, not five.
Troubleshooting
Executable not found in $PATH: "node" in Claude Code
GUI/launcher processes don’t source ~/.zshrc, so nvm’s node isn’t visible to them. Pick one fix:
-
Symlink node into a system path (recommended):
One-time fix for every MCP server you’ll ever add.
-
Use the absolute node path:
-
Install Node via Homebrew:
Puts
nodeon the system PATH so all GUI tools see it.
error: unknown option '-y' from claude mcp add
claude is intercepting -y as one of its own flags. Use -- to separate Claude’s args from the actual command:
Tool returns {"error": {"status": "Configuration error", ...}}
A required env var is missing. The error message names which one — set it in your client config and reconnect.
Tool returns {"error": {"status": "Bad request", "message": "Invalid product identifier"}}
Your API key works but the identifier doesn’t exist on this account. Most common cause: your key is for production but the identifier exists only in staging (or vice versa). Check KELVIQ_BASE_URL.
Test Without an AI Client
Use the official MCP Inspector to browse and call tools directly from a browser:Source & Contributing
- npm —
@kelviq/mcp-server - GitHub —
kelviq/kelviq-mcp-server - Issues — github.com/kelviq/kelviq-mcp-server/issues
- License — MIT
src/schemas/kelviq.ts and the per-domain files in src/tools/.
Need Help?
- Email us at hi@kelviq.com
- Book a demo