@genkey/keygen-mcp-server
v1.0.4
Published
MCP Server for Keygen License Management System
Readme
🔑 Keygen MCP Server
Official Model Context Protocol (MCP) Server for the Keygen License Management System.
Enables AI Agents (Claude Desktop, Cursor, Windsurf, Roo Code, etc.) to securely manage licenses, applications, analytics, and integrations.
⚡ Quick Start
Option A: Run directly with npx (Recommended)
No manual installation required:
npx -y @genkey/keygen-mcp-serverOption B: Local Installation
cd mcp-server
npm install
npm run build🔌 Connection Setup
1. Claude Desktop / Cursor (stdio transport)
Add the following to your claude_desktop_config.json or .cursor/mcp.json:
{
"mcpServers": {
"keygen": {
"command": "npx",
"args": ["-y", "@genkey/keygen-mcp-server"],
"env": {
"KEYGEN_BASE_URL": "https://your-domain.com",
"KEYGEN_API_KEY": "your-mcp-token-or-api-key"
}
}
}
}2. Direct HTTP / JSON-RPC 2.0 Integration
You can interact with the server directly over HTTP:
curl -X POST https://your-domain.com/mcp \
-H "Authorization: Bearer YOUR_MCP_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"id": 1,
"params": {
"name": "list_licenses",
"arguments": { "page": 1, "limit": 10 }
}
}'🛠️ Available Tools (44 Tools)
📦 Licenses
| Tool | Permission | Description |
|------|------------|-------------|
| list_licenses | READ | List licenses with pagination, search, status, and application filters |
| get_license | READ | Get single license details by ID or license key |
| search_licenses | READ | Advanced license search by key, email, or order ID |
| get_license_activations | READ | List all active device activations for a license |
| validate_license | READ | Validate a license for a specific app and device ID |
| get_transfer_status | READ | Check the status of a license transfer request |
| generate_license | READ_WRITE | Generate a new license key |
| bulk_generate_licenses | READ_WRITE | Bulk generate multiple license keys at once (up to 100) |
| update_license | READ_WRITE | Update license metadata, notes, or device limits |
| revoke_license | READ_WRITE | Permanently revoke a license key |
| deactivate_license | READ_WRITE | Temporarily deactivate an active license key |
| reactivate_license | READ_WRITE | Reactivate a deactivated license key |
| send_license_email | READ_WRITE | Email the license key directly to the customer |
| transfer_license | READ_WRITE | Initiate a license transfer between devices |
🏢 Applications
list_applications · get_application · create_application · update_application · delete_application · get_application_stats
⚙️ System Settings
get_settings · get_email_settings · get_branding · update_settings · update_email_settings
🔗 Webhooks
list_webhooks · get_webhook · create_webhook · update_webhook · delete_webhook
🔑 API Keys [ADMIN]
list_api_keys · create_api_key · revoke_api_key
📊 Analytics & Reporting
get_dashboard_stats · get_license_report · get_activation_report · get_expiring_licenses
💾 Backups [ADMIN]
list_backups · create_backup · get_backup_schedule · update_backup_schedule
🌐 Web & Documentation
fetch_web · fetch_docs
📚 Resources
| Resource URI | Description |
|--------------|-------------|
| keygen://docs/api-reference | Full API endpoints documentation with examples |
| keygen://docs/device-fingerprint | Technical guide on hardware fingerprinting |
| keygen://docs/security | Security best practices and license protection |
| keygen://docs/user-guide | Complete Keygen administrator and user guide |
| keygen://schemas/license | Full license schema and lifecycle definitions |
| keygen://schemas/application | Application schema and webhook bindings |
| keygen://config/endpoints | Complete endpoint configuration index |
💬 Workflow Prompts
generate_bulk_licenses— Batch generate licenses and optionally email customers.setup_new_store— End-to-end store setup: application + webhook + trial license.audit_expiring_licenses— Review expiring licenses and prepare reminders.migrate_licenses— Prepare and verify license migration between applications.system_health_check— Comprehensive system overview, stats, and audit.
🔐 Permission Hierarchy
| Level | Description |
|-------|-------------|
| READ | Read-only operations — safe for automated audits and reporting |
| READ_WRITE | Create and update licenses, apps, and webhooks — for operators |
| ADMIN | Full access including API keys, system settings, and backups |
Token management: Admin Dashboard → Settings → MCP Server
➕ Adding New Tools
1. Create tool logic in mcp-server/src/tools/<category>/
2. Export Zod schema and handler function
3. Register the tool in mcp-server/src/tools/index.ts
4. Assign its permission in mcp-server/src/auth/permissions.ts⚙️ Environment Variables
KEYGEN_BASE_URL=https://your-domain.com # Application base URL
KEYGEN_API_KEY=your-mcp-token # MCP Token or Admin API Key