MCP server for coding agents
The MCP server (sdks/mcp) lets a coding agent, such as Claude Code, Cursor, Codex or Copilot, add a license check to your app. It sets up a product in the test environment, writes the SDK code, creates a test license and checks that the activation went through. Then it answers questions about your licenses, devices and events, in test and live, without the dashboard. Deutsche Fassung.
Pre-release. Version
0.1.0-alpha.1, not published yet. The package namelicense-mcpis provisional until the product name is settled. It runs in two ways: as a hosted connector with sign-in (below), or locally over stdio with API keys.
Add it as a connector
In Claude, ChatGPT or another client that supports remote MCP servers, add a custom connector with the URL of the MCP endpoint, for example https://mcp.example.com/mcp. You need no API key and no local install.
- The client opens a sign-in page. Sign in to the dashboard with your passkey.
- Pick the team, and choose what the client may do: in test, read, or read and change; in live, nothing, read, or read and ask for changes. A connector never changes live by itself (see below).
- The client gets a token for this connection. It acts for you and never beyond your role in the team. If your role changes or you leave the team, the connection follows.
Changes in live need your confirmation. If you allowed a connection to ask for changes in live, its write tools take environment: "live". Such a call changes nothing: it becomes an approval, and the tool answers waiting_for_approval with the approval's ID, the operation, path and body. The dashboard shows a hint on every page while changes wait. A member of the team reviews each one under Agent approvals in live and confirms or rejects it there, or with POST /v1/agent-approvals/{id}/approve or /reject (signed in with a passkey, not with an API key). Only then does the change run, with the connection as the actor. An approval is open for 24 hours. Each tool call is its own approval. Without that permission, a write tool with environment: "live" refuses before sending anything.
In the dashboard, Team > Connected clients lists your team's connections and disconnects them. Through the API, GET /v1/connections lists them, with the client's name and when it was last used. DELETE /v1/connections/{id} ends one at once. Its tokens stop working and the client has to sign in again. In the audit log, changes made through a connection show it as the actor (oauth:oag_...).
Run it locally with API keys
The local server uses only the public Management API, with your API keys. It can do nothing that the keys cannot do.
In the dashboard, or with
POST /v1/api-keys, create two API keys for the server:- Test, named for example "MCP (test)", with the scopes
products:write,entitlements:write,plans:write,licenses:write,activations:writeandevents:read. - Live, optional, named for example "MCP (read only)", with only read scopes:
products:read,entitlements:read,plans:read,licenses:read,activations:read,events:read.
Give the live key no write scopes. The server never sends a change with the live key, and the scopes make sure the API refuses one as well.
- Test, named for example "MCP (test)", with the scopes
Build the server once (Node 20.19 or later):
cd sdks/node && pnpm install cd ../mcp && pnpm install && pnpm buildAdd it to your agent. In Claude Code:
claude mcp add license \ --env MANAGEMENT_URL=https://... \ --env MANAGEMENT_TEST_KEY=mk_test_... \ --env MANAGEMENT_LIVE_KEY=mk_live_... \ --env CLIENT_API_URL=https://... \ -- node /path/to/sdks/mcp/dist/cli.jsIn Cursor, in
.cursor/mcp.json:{ "mcpServers": { "license": { "command": "node", "args": ["/path/to/sdks/mcp/dist/cli.js"], "env": { "MANAGEMENT_URL": "https://...", "MANAGEMENT_TEST_KEY": "mk_test_...", "MANAGEMENT_LIVE_KEY": "mk_live_...", "CLIENT_API_URL": "https://..." } } } }
| Variable | Required | Meaning |
|---|---|---|
MANAGEMENT_URL |
yes | Management API base URL |
MANAGEMENT_TEST_KEY |
for setup | mk_test_..., test environment |
MANAGEMENT_LIVE_KEY |
no | mk_live_..., read scopes only. Without it, the server answers only about test |
CLIENT_API_URL |
no | Client API base URL, filled into the integration guides |
The API keys stay on your machine and are never sent to the agent's model. Keep them out of the repository, as you would any other secret.
Integrate an app
Ask your agent, for example: "Add a license check to this app with a pro feature." Or start the prompt integrate of the server. The agent goes through these steps:
create_product,create_entitlementandcreate_planset up the product in the test environment.create_test_licensecreates a license and returns its key.get_integration_guidereturns the complete code for Rust or Node, filled in with the product ID and the test public key. The same guides are resources (license-mcp://guides/rust,license-mcp://guides/node).- The agent adds the code and runs the app with the test license key.
check_test_activationshows the device and the events of the activation, so the agent can confirm that the integration works.
reset_test_activations frees the devices of a test license, so the app can activate again.
Ask about your data
| Tool | Answers |
|---|---|
count_licenses |
How many licenses match: by product, plan, state, customer, tag, creation time and end time. In total and by state |
count_devices |
How many devices are bound to the matching licenses (default: active licenses) |
find_licenses |
The matching licenses, without their keys |
list_activations |
The devices of one license, with limit and reset quota |
list_events |
Events of the audit log, by type, object and time |
list_products, list_plans, list_entitlements, get_product_setup |
The setup of a product, and what goes into the app |
Every query tool takes environment: test (default) or live. For example: "How many active licenses does plan Pro have in live?" or "Which licenses end this month?"
Counts read the list endpoints page by page, up to 10,000 licenses; count_devices reads the devices of up to 500 licenses. When a limit is reached, the answer says "complete": false.
What the server can and cannot do
- Changes only in test. Every tool that changes something uses the test key; none of them has an
environmentparameter. With the live key the server sends onlyGETrequests, and refuses any other request before it leaves your machine. - Audit. Every call goes through the Management API and its events name the API key as the actor (
api_key:key_...). Name the keys "MCP" and you can tell the agent's changes apart in the audit log. - Data is data. Names, notes, metadata and tags come from other people, such as your customers. The server tells the agent to treat them as data, not as instructions. Because the agent cannot change live by itself, injected text cannot change anything there: every change in live waits for a member, who sees what it does first.
- Privacy. Answers contain only what the Management API returns, and the server leaves out the client IP addresses of events. Device features are feature IDs, never measured values.
- Changes in live only through a connector with confirmation (above), and only for the write tools of this server. The local server with API keys only reads in live.