Skip to content

Use SunLicense with your AI assistant ​

Your coding assistant can add SunLicense to your project and test it for you. There are three levels; the first two work on every plan.

What the assistant getsPlans
Docs for assistantsEvery docs page as plain MarkdownAll
A prompt to pasteWhat to build and the rules to follow, for your languageAll
MCP serverTools to create products, issue a test license, create an API key and test a keyLite, Standard

Docs for assistants ​

These docs are published in the llms.txt format, which assistants read better than web pages:

URLHolds
docs.sunlicense.com/llms.txtThe table of contents, with a link to each page
docs.sunlicense.com/llms-full.txtEvery page in one file
docs.sunlicense.com/<page>.mdOne page as Markdown, e.g. /guide/sdks.md

Tell your assistant to read them ("use https://docs.sunlicense.com/llms.txt"), or add the URL to its docs settings (Cursor: @Docs → Add new doc).

A prompt to paste ​

Copy the prompt for your language into your assistant, in your project. It holds no keys: the assistant reads the docs and your API key stays in an environment variable. The dashboard has the same prompt on SDKs (and in the Get set up checklist, matched to your answers).

text
Add SunLicense license checks to my software (Java).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: implementation 'com.sunlicense:sunlicense:0.0.1' (source and README: https://github.com/sunlicense-com/sunlicense-java).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my software (JavaScript).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: npm install sunlicense (source and README: https://github.com/sunlicense-com/sunlicense-js).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my software (Python).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: pip install sunlicense (source and README: https://github.com/sunlicense-com/sunlicense-py).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my software (.NET).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: dotnet add package SunLicense (source and README: https://github.com/sunlicense-com/sunlicense-dotnet).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my software (PHP).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: composer require sunlicense/sunlicense (source and README: https://github.com/sunlicense-com/sunlicense-php).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my FiveM resource (Lua).

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Use the official SDK: luarocks install sunlicense (source and README: https://github.com/sunlicense-com/sunlicense-lua).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).
text
Add SunLicense license checks to my software.

- Docs written for AI assistants: https://docs.sunlicense.com/llms.txt (all pages in one file: https://docs.sunlicense.com/llms-full.txt). Read https://docs.sunlicense.com/guide/sdks.md first.
- Base URL: https://api.sunlicense.com
- Read the API key from configuration or an environment variable named SUNLICENSE_API_KEY; never hard-code it.
- Read the customer's license key from the app's config file (ask me where). Never print or log the full key.
- Call POST /api/v2/license/validate with JSON {"license": "<key>", "host": "<stable machine id>"} and the API key as a Bearer token. HTTP 200 means valid, 400 means rejected (the body's code says why).
- Send a stable machine id as host so each machine counts as one activation.
- Check once on startup. If the license is rejected, show the reason and stop the paid features; if SunLicense can't be reached, keep working (fail open).

Selling a Minecraft plugin or mod, a FiveM resource or a Discord bot? Start from a template instead: each one has the check built in and an AGENTS.md that tells assistants how to work in it.

Let it manage your account (MCP) ​

With the SunLicense CLI installed, sunlicense mcp gives the assistant tools to create a product and policy, issue a test license, create an API key for your app, block a machine and check a key the way your app does, so it can test what it built. It's included in Lite (300 tool calls a day) and Standard (3,000 a day).

  1. Create a personal access token under Settings → Personal access tokens with only the scopes the assistant needs (or sign in with sunlicense login; that session lasts 12 hours).
  2. Add the server:
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_..." }
    }
  }
}

AI assistants (MCP) lists every tool, the daily limits and what stays private.

Claude Code plugin ​

The SunLicense plugin bundles a skill that knows how to add a license check the right way (official SDK, API key outside source control, stable machine id, fail open, masked keys, no bypasses) with the MCP server above:

text
/plugin marketplace add sunlicense-com/claude-plugin
/plugin install sunlicense@sunlicense

Sign in with sunlicense login or export SUNLICENSE_TOKEN before starting Claude Code so the MCP server can reach your account. The skill works on every plan; on Free the MCP server stops with an upgrade link. Source: github.com/sunlicense-com/claude-plugin.

Good to know ​

  • Never give your app a personal access token. Apps use an API key (slk_…); tokens (slp_…) are for the CLI and assistants, and can do everything their scopes allow.
  • Review the check. Ask the assistant to show you where it reads the API key and what happens when SunLicense says no or can't be reached. The SDKs page has the recommended behaviour.
  • Your code stays yours. SunLicense receives the API calls the CLI makes, 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