SAP HANA MCP License Server

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.

Category
Visit Server

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

  1. El cliente ejecuta npm run hwid y obtiene su hardware ID.
  2. Te envía el HWID.
  3. Tú generas la licencia llamando POST /admin/licenses con el HWID y los días.
  4. Le envías la clave alfanumérica generada.
  5. El cliente configura HANA_LICENSE_KEY=<clave> en el MCP.
  6. 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

  1. Crea un proyecto en Railway.
  2. Conecta este repositorio.
  3. Configura las variables de entorno (DATABASE_URL, ADMIN_API_KEY, etc.).
  4. Railway detectará el package.json y ejecutará npm start.

Deploy a Render (free tier)

  1. En Render, crea un New Web Service y conecta este repositorio.
  2. Configura:
    • Build Command: npm install
    • Start Command: npm start
    • Environment: agrega DATABASE_URL, ADMIN_API_KEY, DEFAULT_PRODUCT_CODE, etc.
  3. 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 → responde pong.
  • También puedes usar GET /health si 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured