SAP HANA MCP License Server
Backend server that issues and validates alphanumeric software licenses tied to hardware IDs for SAP MCP servers (hana-b1, sap-btp, sap-cpi), storing products, licenses, and telemetry in PostgreSQL with online validation of expiry, revocation, and hardware matching.
README
SAP HANA MCP License Server
Backend independiente para emitir y validar licencias de MCP servers SAP.
Soporta múltiples productos: hana-b1, sap-btp, sap-cpi.
Qué hace
- Emite claves de licencia cortas y alfanuméricas (
ABCD-EFGH-IJKL-MNOP) vinculadas a un hardware ID. - Valida online que la clave exista, no esté vencida, no esté revocada y corresponda al HWID.
- Almacena productos, licencias y telemetría en PostgreSQL.
- Diseñado para correr gratis en Railway + Neon.
Flujo de uso
- El cliente ejecuta
npm run hwidy obtiene su hardware ID. - Te envía el HWID.
- Tú generas la licencia llamando
POST /admin/licensescon el HWID y los días. - Le envías la clave alfanumérica generada.
- El cliente configura
HANA_LICENSE_KEY=<clave>en el MCP. - El MCP valida la clave contra este servidor en cada arranque.
Requisitos
- Node.js >= 18
- PostgreSQL (recomendado Neon gratis)
Instalación local
cd sap-hana-mcp-license-server
cp .env.example .env
# Edita .env con tu DATABASE_URL y ADMIN_API_KEY
npm install
npm run db:init
npm run dev
Variables de entorno
| Variable | Descripción | Default |
|---|---|---|
PORT |
Puerto del servidor | 3000 |
DATABASE_URL |
URL de PostgreSQL | — |
ADMIN_API_KEY |
API key para endpoints de administración | — |
DEFAULT_PRODUCT_CODE |
Código de producto por defecto | hana-b1 |
DEFAULT_PLAN |
Plan por defecto | professional |
DEFAULT_LICENSE_DAYS |
Días por defecto | 30 |
NODE_ENV |
Entorno | production |
Endpoints
Públicos
POST /api/license/validate
Valida una licencia.
Body:
{
"license_key": "ABCD-EFGH-IJKL-MNOP",
"hwid": "a1b2c3...",
"product_code": "hana-b1"
}
Respuesta válida:
{
"active": true,
"license_key": "ABCD-EFGH-IJKL-MNOP",
"hwid": "a1b2c3...",
"product_code": "hana-b1",
"plan": "professional",
"features": ["hana", "knowledge-base"],
"expires_at": "2026-08-28T12:00:00.000Z",
"message": "License valid"
}
Administración (requiere header X-API-Key)
POST /admin/licenses
Crea una licencia.
Body:
{
"hwid": "a1b2c3...",
"days": 30,
"product_code": "hana-b1",
"plan": "professional"
}
GET /admin/licenses
Lista todas las licencias.
POST /admin/licenses/:license_key/revoke
Revoca una licencia.
POST /admin/licenses/:license_key/activate
Reactiva una licencia revocada.
Deploy a Railway
- Crea un proyecto en Railway.
- Conecta este repositorio.
- Configura las variables de entorno (
DATABASE_URL,ADMIN_API_KEY, etc.). - Railway detectará el
package.jsony ejecutaránpm start.
Deploy a Render (free tier)
- En Render, crea un New Web Service y conecta este repositorio.
- Configura:
- Build Command:
npm install - Start Command:
npm start - Environment: agrega
DATABASE_URL,ADMIN_API_KEY,DEFAULT_PRODUCT_CODE, etc.
- Build Command:
- Render te dará una URL como
https://licencias-mcp.onrender.com.
Mantener el servicio despierto en Render
El tier gratuito de Render duerme el servicio tras 15 minutos de inactividad. Para evitarlo, configura un monitor de uptime que haga ping cada 10-14 minutos:
- Endpoint ligero:
GET /ping→ respondepong. - También puedes usar
GET /healthsi prefieres JSON.
UptimeRobot: crea un monitor tipo HTTP(s) apuntando a https://tu-app.onrender.com/ping con intervalo de 14 minutos.
Generar una licencia (ejemplo con curl)
HWID=$(node scripts/get-hwid.js)
curl -X POST https://tu-app.railway.app/admin/licenses \
-H "Content-Type: application/json" \
-H "X-API-Key: $ADMIN_API_KEY" \
-d "{\"hwid\":\"$HWID\",\"days\":30}"
Administración de licencias
Para operaciones de administrador (listar, revocar, transferir licencias entre máquinas, etc.), consulta la guía de administración.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.