---
title: "Set up license keys from Claude with MCP · Clavem"
description: "Connect Claude to Clavem over MCP, create a product with plans, link a Stripe price and issue a test license by asking. Plus what stays in the dashboard."
url: "https://clavem.io/blog/set-up-license-keys-from-claude"
---

# Set up license keys from Claude: a product, plans, Stripe and a test license

With Clavem's MCP server, Claude can create a product with plans, link a Stripe price to a plan, issue a license and publish a release. This is one worked setup with a made-up app, the calls Claude makes, and the few things you still do yourself.

By [Clavem](https://clavem.io/about) · Updated 27 November 2026

## What you can hand over

Clavem’s MCP server used to look things up and make small changes to licenses. It now covers the setup as well: products and plans, Stripe links, releases, free trials and the store settings. An assistant that speaks MCP, such as Claude, sees 38 tools and picks the ones a request needs. The [MCP documentation](https://clavem.io/docs/mcp) lists them all.

This article follows one setup from an empty account, with a made-up app called Inkwell. Every step is a tool call that you can read in the activity feed afterwards.

## Before you start

You need two things, and neither is done by the assistant.

1. **A Clavem account with Stripe connected.** Connecting needs a secret Stripe key, or the Clavem Stripe App, so it stays in the dashboard. See [connecting Stripe](https://clavem.io/docs/stripe).
2. **Claude connected to the server.** The URL is `https://clavem.io/mcp`. Add it in Claude, sign in to Clavem in the browser window that opens and click Allow; no key is needed. The steps for Claude Code, Claude on the web and Desktop, ChatGPT, Cursor and VS Code are in the [MCP documentation](https://clavem.io/docs/mcp#signin). If your tool cannot sign in, make an API key under **Developers** instead: it starts with `sk_clavem_`, is shown once and goes in as a bearer token (see [connecting with a key](https://clavem.io/docs/mcp#setup)).

## The conversation

Ask for the whole setup in one message:

> **You:** Create a product called Inkwell with plans Basic and Pro, link my Stripe price for Pro, and issue a test license for [ada@example.com](mailto:ada@example.com).

Claude starts by looking. It calls `list_products` and sees there is no product called Inkwell yet, which stops a repeated request from creating a second one. Then it asks for what it cannot guess, because `create_product` requires a device limit and a validity:

> **Claude:** Before I create it: how many devices may one license run on, does a license last forever, for a number of days or follow a subscription, and what does each plan include?
>
> **You:** Three devices, lasts forever. Basic is one seat and no sync. Pro is five seats with sync.

Claude calls `create_product`:

```json
{
  "name": "Inkwell",
  "activation_limit": 3,
  "validity_kind": "perpetual",
  "plans": [
    { "key": "basic", "name": "Basic", "entitlements": { "sync": false, "seats": 1 } },
    { "key": "pro", "name": "Pro", "entitlements": { "sync": true, "seats": 5 } }
  ]
}
```

The result is the new product with its `id`, its signing `public_key` and `"stripe_account": null`, because nothing is linked yet. The call counts against your plan’s product limit and fails with `plan_limit` when that is reached. The plan keys, `basic` and `pro`, are what everything else refers to, and they never change.

Next it reads your Stripe side with `list_stripe_accounts` and `list_stripe_catalog`. One account is connected, and its Stripe product Inkwell has two prices:

> **Claude:** Your Stripe account has two prices on Inkwell, “Basic monthly” and “Pro yearly”. Which one is Pro?
>
> **You:** Pro yearly.

Claude calls `link_stripe_price`:

```json
{
  "product_id": 75,
  "stripe_product_id": "prod_RtQ4mXk2Lw9nVb",
  "stripe_price_id": "price_1Qz8HfEx3kLm9PaR",
  "plan": "pro",
  "label": "Pro yearly"
}
```

From now on, a purchase of that price in Stripe issues a license on the Pro plan, with no further step. Two rules are worth knowing before you ask for this on a product that is already in use. The first link binds the product to that Stripe account. And a price that is already linked to another product of yours moves to this one, with its plan cleared unless you send one, so purchases of it stop issuing licenses for the other product. If the price might be in use, ask for `get_product_stripe` first.

Last, the test license, with `issue_license`:

```json
{
  "product_id": 75,
  "email": "ada@example.com",
  "name": "Ada Lovelace",
  "plan": "pro"
}
```

> **Claude:** Done. Inkwell (id 75) has Basic and Pro, “Pro yearly” is linked to Pro, and there is a test license for [ada@example.com](mailto:ada@example.com) on Pro: `7QX2M-9WZ2P-H5RB8-K4TEV-0A1CD`. No email was sent. Here is the order page link if you want to see what a buyer sees.

The license is issued with no email. You can hand over the key or the order page link, or ask for `resend_license_email`, which sends the standard email. That one needs your own email address to be confirmed in Clavem, and it sends again each time it is called.

## Check what happened

Open the activity feed in the dashboard. Each call that changed something is an entry with the actor API: `product.created`, `stripe.price_linked` and `license.issued`. You can also ask Claude for `list_activity`. The product’s page shows the two plans and the mapping, so you can compare it with what you asked for.

## A release, and the one thing that does not fit in a chat

Releases follow the same pattern with one difference. Claude can call `create_release` for a draft of version 1.4.0, but a build is far too big to send through a chat, so it cannot upload the file itself. Instead it calls `get_upload_instructions`:

```json
{
  "release_id": 31,
  "file_name": "Inkwell-1.4.0.dmg",
  "size_bytes": 52428800,
  "platform": "macos"
}
```

The result checks that the file fits in your plan’s storage, gives the part size (10 MiB) and the number of parts, and returns ready-to-run `curl` commands against the Admin API. They read your key from the `CLAVEM_API_KEY` environment variable, so the key is not in them and never goes into the chat. You export it in a terminal and run the script, or a client that can run shell commands, such as Claude Code, runs it after you approve. The file goes from your machine to Clavem in parts.

Uploading does not publish. When the file is there, ask for `update_release` with `published: true`. It refuses a release with no finished file, and buyers with a valid license see the release once it is published.

## What stays in the dashboard

Five things are left out on purpose.

- **Connecting and disconnecting a Stripe account.** Connecting needs a secret Stripe key, which should not pass through an AI chat. Disconnecting removes every link of every product on that account at once, and deletes Clavem’s webhook in Stripe using the stored secret key. Use the dashboard or the Clavem Stripe App.
- **Creating and revoking API keys.** A key that could make keys could hand out more access than you gave it.
- **Clavem billing.** Money moves there, so it is not something an assistant changes on a misread request.
- **Login, password and deleting the account.**
- **The Lemon Squeezy and Dodo Payments importers.** They need your secret key of that service. Export from there and use the CSV or JSON import instead, in the dashboard or with `import_licenses`.

## Keep your hand on the wheel

An assistant can misread a request. Nine of the tools are marked destructive, so a client can ask before it runs them: `set_product_plans`, `archive_product`, `disable_license`, `deactivate_device`, `end_trial`, `link_stripe_price`, `unlink_stripe_price`, `delete_release` and `delete_file`. Leave that confirmation on and read what is about to be sent. `set_product_plans` replaces the whole list of plans, so plans left out of it are removed. `link_stripe_price` can take a Stripe price away from another product, which then stops issuing licenses for it. `delete_release` removes a release together with its files, for good, and `delete_file` removes one file.

The key has the reach of the management API, so give Claude a key of its own, which you can revoke without breaking anything else. The longer reasoning is in [manage licenses with an AI assistant](https://clavem.io/blog/manage-licenses-with-ai-mcp).

## When a script is better

If you do the same thing on every release, a script is cheaper and more predictable than a conversation. The Admin API has the same operations: create the release, upload the parts, then publish. The [API reference](https://clavem.io/docs/api#management-releases) has the requests and responses, and what the MCP server will not do is listed under [limits and errors](https://clavem.io/docs/mcp#limits).

## Questions

Can Claude set up Clavem for me?

Most of it. Through the MCP server Claude can create products and plans, link Stripe prices to plans, issue licenses, create and publish releases and change the store name and support email. Connecting and disconnecting a Stripe account, API keys, Clavem billing and your login stay in the dashboard.

Does Claude need my Stripe key?

No, and it should not have it. Connect your Stripe account in the dashboard or with the Clavem Stripe App first. After that Claude can list the account's products and prices and link them, and Clavem reads them with the key it already holds. No tool ever returns that key.

How do I upload a build from Claude?

A file cannot go through a chat. Claude creates a draft release and calls get_upload_instructions, which returns curl commands that read your key from the CLAVEM_API_KEY environment variable and upload the file in 10 MiB parts. You run them, or a client that can run shell commands, such as Claude Code, runs them after you approve. Publishing is a separate step.

What if Claude links the wrong price?

Unlink it with unlink_stripe_price and link the right one. Purchases of a price that is not linked do not issue licenses, and licenses already issued are not touched. Every call is in the activity feed with the actor API, so you can see exactly what was linked and when.

## Sources

1. [Model Context Protocol, introduction (as of November 2026)](https://modelcontextprotocol.io/introduction)

Add licensing in an afternoon

Connect Stripe, Polar, Dodo Payments or Creem, create a product, call one endpoint from your app. The quickstart walks through every step.

[Read the quickstart](https://clavem.io/docs)
