Skip to main content
@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.
Using Claude Code? The fastest install is the Agent Toolkit plugin — two commands set up this MCP server and five Kelviq skills that teach Claude the workflows. This page covers manual setup for every MCP client.
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 launches npx -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:
  1. Validates the LLM-provided arguments against a Zod schema derived from Kelviq’s OpenAPI spec.
  2. Adds your API key as a Bearer token and sends the HTTPS request to the appropriate Kelviq host.
  3. Returns the JSON response (or a structured {"error": {...}} object) back to the LLM.
API errors are returned as content, not exceptions — the LLM reads them and reacts (retries with a fix, asks you to clarify, etc).

Step 1: Get Your API Keys

  1. Sign in at app.kelviq.com.
  2. Navigate to Settings → API Keys.
  3. Copy:
    • Server API Key — required for all API tools.
    • Client API Key — required only for the promotion_get tool.
Never commit API keys to version control or paste them into shared chats. Use your MCP client’s env configuration mechanism — most clients store secrets in their own credentials file.

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.
The -- separator is required so that claude doesn’t intercept -y as one of its own flags. Put all --env arguments before the --.
Verify the connection with /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

Docs tools (docs_search, docs_read) work with no API keys at all. Even without a key, the LLM can answer Kelviq questions from the bundled documentation.

Point at Staging

Pair these with a staging-scoped Server API Key from your dashboard’s staging environment.

Tool Reference

Tools are grouped by domain. Each tool name uses domain_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:
Create a Kelviq product called “Notion Plus” with tax code saas, then create three plans (Free, Pro Monthly, Pro Yearly), add an api-calls feature with limits 1000 / 50000 / unlimited, and publish all three plans.
Calls (in order): product_createfeature_createplan_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.
Activate license LIC-ABCDE for customer geojacob, instance name “MacBook Pro M3”, then validate it.
Calls: license_activatelicense_validate.
Show me all subscriptions for customer acme-42 and tell me which features they have access to.
Calls: subscription_listentitlements_get.
How do digital downloads work in Kelviq? What’s the file-size limit?
Calls: docs_searchdocs_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_search for 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:
  1. Symlink node into a system path (recommended):
    One-time fix for every MCP server you’ll ever add.
  2. Use the absolute node path:
  3. Install Node via Homebrew:
    Puts node on 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

The repo is the canonical reference for tool schemas, build process, and contribution guidelines. New Kelviq API endpoints are added by extending the hand-written Zod schemas in src/schemas/kelviq.ts and the per-domain files in src/tools/.

Need Help?