Clavem

Documentation

MCP server

Look up, issue, extend and disable licenses by asking Claude, Cursor or another MCP client, with the API key you already use for the management API.

What it is

Clavem runs a remote Model Context Protocol (MCP) server. An MCP client such as Claude Code or Cursor connects to it and gets a set of tools for your own licenses: find a customer's license, see which devices use it, issue a new one, change a limit or an expiry, disable it, free a seat. You describe what you want in plain words, the assistant picks the tool, and Clavem does the same thing themanagement API or the dashboard would do.

  • Server URL: https://clavem.io/mcp
  • Transport: Streamable HTTP, stateless. Every request is a POST of JSON-RPC 2.0 answered with application/json. There is no session and no event stream, so GET and DELETE answer 405.
  • Protocol versions: 2025-06-18 and 2025-03-26.
  • Authentication: your management API key as a bearer token. The server has no OAuth sign-in.

The tools act on the one account that owns the key, and on nothing else.

Create an API key

  1. Sign in and open Developers in the dashboard.
  2. Under API keys, choose New API key and name it after where it will be used, for example Claude Code on my laptop.
  3. Copy the key. It starts with sk_clavem_ and is shown once.

It is the same kind of key the management API takes, with the same rules: it can be revoked at any time, and it shares the management API's limit of 300 requests per minute per key. Make one key per tool or machine so you can revoke one without breaking the rest.

Connect a client

Every client needs two things: the server URL https://clavem.io/mcp and the header Authorization: Bearer sk_clavem_…. Clients that can only sign in with OAuth cannot connect.

Claude Code

Terminal
claude mcp add --transport http clavem https://clavem.io/mcp \
  --header "Authorization: Bearer sk_clavem_…"

By default the server is saved for the current project only, on your machine. Add --scope user after mcp add to have it in every project. Run claude mcp list to see it, or /mcp inside Claude Code.

Terminal: available in every project
claude mcp add --transport http --scope user clavem https://clavem.io/mcp \
  --header "Authorization: Bearer sk_clavem_…"

To share the setup with a team through the project's .mcp.json, never write the key into that file. Claude Code expands environment variables in headers, so each person keeps the key in their ownCLAVEM_API_KEY.

.mcp.json
{
  "mcpServers": {
    "clavem": {
      "type": "http",
      "url": "https://clavem.io/mcp",
      "headers": { "Authorization": "Bearer ${CLAVEM_API_KEY}" }
    }
  }
}

Claude on the web, Claude Desktop and mobile

These add servers as custom connectors: Customize → Connectors → Add → Add custom connector. Enter Clavem as the name and https://clavem.io/mcp as the URL, choose No sign-in, then openRequest headers (under Advanced in the one-screen layout), add the header authorization and enter the value Bearer sk_clavem_…, including the word Bearer and the space. On Team and Enterprise plans an Owner adds the connector for the organization under Organization settings → Connectors.

Request headers for custom connectors are in beta and available to a limited set of organizations. If your dialog has no Request headers section, your account does not have it yet, and claude.ai and the mobile apps cannot reach Clavem until it does, because they otherwise need an OAuth sign-in that Clavem does not offer. Anthropic's page is Add a connector that isn't in the directory. Authentication settings cannot be edited after you add a connector, so to rotate the key, remove the connector and add it again. On a Team or Enterprise plan the key is shared by everyone who uses the connector.

Claude Desktop can also run a local proxy that adds the header for you. Open Settings → Developer → Edit Config, add this to claude_desktop_config.json and restart the app. It needsNode.js and uses the open source mcp-remote package, which is not made by Clavem or Anthropic.

claude_desktop_config.json
{
  "mcpServers": {
    "clavem": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://clavem.io/mcp", "--header", "Authorization:${CLAVEM_AUTH}"],
      "env": { "CLAVEM_AUTH": "Bearer sk_clavem_…" }
    }
  }
}

Cursor

Add the server to .cursor/mcp.json in a project, or to ~/.cursor/mcp.json for every project. Cursor reads ${env:NAME} in headers, so the key can stay in your environment.

.cursor/mcp.json
{
  "mcpServers": {
    "clavem": {
      "url": "https://clavem.io/mcp",
      "headers": { "Authorization": "Bearer ${env:CLAVEM_API_KEY}" }
    }
  }
}

Restart Cursor, then open its MCP settings: Clavem should be listed with its ten tools.

VS Code

Add the server to .vscode/mcp.json (or run MCP: Open User Configuration for all workspaces). VS Code asks for the key the first time the server starts and stores it securely, so it never lands in the file.

.vscode/mcp.json
{
  "inputs": [
    { "type": "promptString", "id": "clavem-key", "description": "Clavem API key", "password": true }
  ],
  "servers": {
    "clavem": {
      "type": "http",
      "url": "https://clavem.io/mcp",
      "headers": { "Authorization": "Bearer ${input:clavem-key}" }
    }
  }
}

Anything else

Any client that speaks Streamable HTTP and can send a custom Authorization header works. To check the connection by hand:

curl
curl https://clavem.io/mcp \
  -H "Authorization: Bearer sk_clavem_…" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"curl","version":"1"}}}'

Tools

Ten tools, named in snake_case. The assistant sees the descriptions and the input schema of each, so you rarely need to name a tool yourself. The first four read; the rest change data and are marked as such, which lets clients ask you before they run. Inputs marked one of take either the numeric license_id or the license_key.

Read

ToolWhat it doesInputs
list_productsYour products with their ids, default device limit, validity policy and whether they are archived. Use it to find a product_id.None.
find_licensesSearches licenses, newest first, one page at a time. Filters combine. Each result has its status, device limit and count, expiry, product and customer. The result's next_before is the cursor for the next page.email, license_key, product_id, limit (1 to 100, default 25), before. All optional.
get_licenseOne license with the devices using it (instance id, name, last seen) and the customer's order page link.One of license_id, license_key.
get_account_statsYour plan and its limits, how many licenses are valid and how many exist, your product count, and validations, activations and downloads for the last days, in total and per day.days (1 to 90, default 30), optional.

Change

ToolWhat it doesInputs
issue_licenseCreates a license and returns its key and order page link. Creates the customer if the email is new. Sends no email. Counts against your plan like any license.product_id, email; optional name, activation_limit (-1 unlimited, omitted for the product's), expires_at (null never, omitted for the product's policy).
extend_licenseReplaces a license's expiry. A future date also brings an expired license back. The date must be in the future, or null for never; to cut a license off, disable it.One of license_id, license_key; expires_at as 2027-03-31 (end of that day, UTC) or an ISO 8601 timestamp.
set_license_limitChanges how many devices may use a license at once. Devices already activated stay, even above a lower limit.One of license_id, license_key; activation_limit (1 to 10000, -1 unlimited, null the product's).
disable_licenseDisables a license at once: apps that validate it are told it is not valid, and no device can activate. Reversible.One of license_id, license_key.
enable_licenseUndoes disable_license. Fails for a license that is not disabled, and when your plan has no room for it.One of license_id, license_key.
deactivate_deviceRemoves one device from a license and frees its seat.One of license_id, license_key; instance_id from get_license.

disable_license and deactivate_device are marked destructive. The tools that read are marked read-only, and none of them reaches outside Clavem.

Failures such as a license that does not exist or a plan limit come back as a tool result with isError: true and a sentence the assistant can act on, not as a protocol error. A call with malformed arguments is a JSON-RPC error -32602.

A tool error200 OK
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "content": [{ "type": "text", "text": "License not found." }],
    "isError": true
  }
}

Security

  • A key has the same reach as the management API. It can read every license key and customer email in the account, and it can issue, change and disable licenses. There are no read-only or per-tool keys. Treat it like a password and do not paste it into chats, issues or committed files.
  • Rotate by revoking. Create a new key under Developers, put it into the client, then revoke the old one. A revoked key stops working on the next request.
  • Every change is logged. Issuing, changing, disabling, enabling and removing a device each add an entry to the activity feed in your dashboard, recorded with the actor API, exactly as if your own backend had made the call. The dashboard also shows when each key was last used.
  • Your account only. Every query is limited to the account that owns the key. Another account's licenses are answered with not found, the same as ones that do not exist.
  • Not for web pages. The server refuses any request that carries an Origin header other than https://clavem.io with 403. Desktop and command-line clients send none. This keeps a web page from driving the server through your browser.
  • Keep a person in the loop. An assistant can misread a request or be steered by text it read elsewhere, such as an email or a web page. Let your client ask before it runs a tool that changes something, and read the key and email in the confirmation.

Limits and errors

  • Up to 20 messages per request when a client sends a JSON-RPC batch. Request bodies are limited to 32 KB.
  • 401 with WWW-Authenticate: Bearer: the key is missing, malformed, unknown or revoked. 403: the request had a foreign Origin. 405: not a POST.429 with Retry-After: 60: over the key's limit, shared with the management API.
  • The tools cover what the management API covers. They cannot create products, delete licenses, refund an order or email a buyer, and find_licenses has no filter by status; every result carries its status, so ask for a customer or a product and read it there.
  • Licenses tied to a Stripe subscription take their expiry from the subscription, which overwrites a date set here at the next renewal.