Skip to content

AI assistants (MCP) ​

sunlicense mcp lets the AI coding assistant you already use manage SunLicense for you: list and issue licenses, block a leaked key's machine, create an API key for your app, write the SDK code and check that it works. It's a Model Context Protocol server that runs on your computer through the CLI, so it works with Claude Code, Codex, Cursor, Antigravity and any other assistant that speaks MCP.

The assistant acts as you: it can do exactly what your role allows (and, with a token, what the token's scopes allow). MCP is included in the Lite and Standard plans.

Set it up ​

  1. Install the CLI (version 0.2.0 or later).
  2. Create a personal access token in the dashboard under Settings → Personal access tokens, with only the permissions the assistant needs (for example products.read, licenses.read, licenses.write, api_keys.write). Signing in with sunlicense login also works, but that session expires after 12 hours.
  3. Add the server to your assistant:
bash
claude mcp add sunlicense --env SUNLICENSE_TOKEN=slp_... -- sunlicense mcp
bash
codex mcp add sunlicense --env SUNLICENSE_TOKEN=slp_... -- sunlicense mcp
json
{
  "mcpServers": {
    "sunlicense": {
      "command": "sunlicense",
      "args": ["mcp"],
      "env": { "SUNLICENSE_TOKEN": "slp_..." }
    }
  }
}
json
{
  "mcpServers": {
    "sunlicense": {
      "command": "sunlicense",
      "args": ["mcp"],
      "env": { "SUNLICENSE_TOKEN": "slp_..." }
    }
  }
}

Then ask, for example: "Issue a Pro license of Acme Editor to [email protected]", "Which licenses were checked from more than two machines?", or "Add SunLicense to this Paper plugin and test it with my license".

To use a local stack instead of production, add --env SUNLICENSE_SERVER=http://localhost. Add SUNLICENSE_API_KEY=slk_... (an API key) to let the assistant run test license checks.

Tools ​

ToolWhat it does
list_products, list_policiesYour products and their policies (machine limits, durations)
list_licenses, get_licenseLicenses by product, status or search, one license with its machines and recent checks. Keys are masked
reveal_license_keyOne license's full key, when you ask for it
list_customersYour customers, searchable
issue_licenseA new license from a policy, for a customer's email
revoke_license, suspend_license, reinstate_licenseChange a license's status. Revoking and suspending are marked destructive, so assistants ask you first
create_api_keyAn slk_ key for your app, shown once
list_access_rules, add_access_rule, delete_access_ruleBlacklists and exclusions, with hit counts
sdk_snippetValidation code for an official SDK, for your server
test_validateChecks a key the way your app does (needs SUNLICENSE_API_KEY; a new machine id takes a slot)
integration_statusWhat's set up, what's missing and today's MCP calls
search_docsSearches this documentation

Limits ​

FreeLiteStandard
MCP✓✓
Tool calls per day3003,000

Every tool call counts, and the count resets at 00:00 UTC. When the day's calls are used up, tools answer with a short message instead and the dashboard, CLI and API keep working as usual. Writes still follow your plan's other limits (licenses, API keys, access rules); a limit shows up as a message with a link to upgrade. On Free, sunlicense mcp stops with the upgrade link instead of starting.

Good to know ​

  • Keys stay masked. Answers show keys as AX8P-XXXX-XXXX-XXXX; only reveal_license_key returns a full key, and the assistant only needs it when you ask.
  • Give the token only what it needs. A read-only token (*.read scopes) can look but not change anything. Revoking the token in Settings stops the assistant within 30 seconds.
  • It runs on your machine. The server is the CLI calling the SunLicense API with your token: SunLicense receives those API calls, never your prompts or code.

Send feedback

Found something broken, or have an idea? It goes straight to our board.

The first line becomes the title.
Images (optional, up to 5: paste, drop or capture)
Check each image before sending, and remove any that show something private.

We also receive this page's address and your browser version.

Ctrl Enter to send