IM

iamranawaqas100/mcp

API development
0 stars 0 forks Quality 55 Trend 4

MCP server + OAuth 2.1 connector for Leni property analytics (Cursor, Claude, MCP Inspector). Works with API gateway or standalone on Railway.

Overview

MCP server + OAuth 2.1 connector for Leni property analytics (Cursor, Claude, MCP Inspector). Works with API gateway or standalone on Railway. - Leni frontend login (APP_URL) + OAuth consent on the gateway (MCP_ISSUER). - Cube API only (all tools). - GET /users/me via gateway during OAuth (no direct Postgres). 1. Deploy this directory as a Railway service. 2. Set env; PORT is set by Railway. 3. Configure sr-services gateway MCP_CONNECTOR_HOST to the Railway internal/public host. 4. Cursor MCP URL = your /mcp (not raw connector port unless exposed). npm run mint-token — MCP Inspector / curl only (not Cursor OAuth). gateway.config.yml routes /mcp, /oauth, and /.well-known/* to connectorService (MCP_CONNECTOR_HOST:MCP_CONNECTOR_PORT). Default Docker: MCP_CONNECTOR_HOST=leni-mcp-connector. Host-run connector: MCP_CONNECTOR_HOST=host.docker.internal.

README

Leni MCP Connector

MCP server + OAuth 2.1 connector for Leni property analytics (Cursor, Claude, MCP Inspector). Works with sr-services API gateway or standalone on Railway.

  • User auth: Leni frontend login (APP_URL) + OAuth consent on the gateway (MCP_ISSUER).
  • Data: Cube API only (all tools).
  • Scope: GET /users/me via gateway during OAuth (no direct Postgres).

Quick start (local + sr-services)

# 1. Backend stack
cd sr-services
docker compose -f docker-compose.infra.yml -f docker-compose.services.yml -f docker-compose.gateway.yml up -d

# 2. Leni app on http://localhost:3000

# 3. Cursor ~/.cursor/mcp.json or repo .cursor/mcp.json
#    { "mcpServers": { "leni": { "url": "http://127.0.0.1:8088/mcp" } } }

# 4. Cursor → Settings → MCP → leni → Connect → login + Allow

Full flow: CONNECT.md

Endpoints

Path Purpose
POST/GET/DELETE /mcp Streamable HTTP MCP
/oauth/* OAuth 2.1 + PKCE
/.well-known/oauth-authorization-server Discovery
/.well-known/oauth-protected-resource/mcp RFC 9728 (resource = …/mcp)
GET /healthz Health check

Env (see .env.example)

Variable Local example Purpose
MCP_ISSUER http://127.0.0.1:8088 OAuth issuer (gateway)
MCP_RESOURCE_URL http://127.0.0.1:8088/mcp MCP resource URL for Cursor
APP_URL http://localhost:3000 Login redirect
API_GATEWAY http://localhost:8088 (host) or http://api-gateway:8080 (Docker) /users/me
MCP_JWT_SECRET shared secret MCP access tokens
JWT_ACCESS_SECRET same as auth-service sr_access cookie
CUBE_API_TOKEN / CUBE_API_BASE_ENDPOINT from Cube Cloud Analytics

Railway

  1. Deploy this directory as a Railway service.
  2. Set env; PORT is set by Railway.
  3. Configure sr-services gateway MCP_CONNECTOR_HOST to the Railway internal/public host.
  4. Cursor MCP URL = your gateway /mcp (not raw connector port unless exposed).

Dev

cp .env.example .env
npm install
npm run start:watch

npm run mint-token — MCP Inspector / curl only (not Cursor OAuth).

sr-services gateway

gateway.config.yml routes /mcp, /oauth, and /.well-known/* to connectorService (MCP_CONNECTOR_HOST:MCP_CONNECTOR_PORT).

Default Docker: MCP_CONNECTOR_HOST=leni-mcp-connector. Host-run connector: MCP_CONNECTOR_HOST=host.docker.internal.

mcp

mcp

mcp

View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

# 1. Backend stack cd sr-services docker compose -f docker-compose.infra.yml -f docker-compose.services.yml -f docker-compose.gateway.yml up -d # 2. Leni app on http://localhost:3000 # 3. Cursor ~/.cursor/mcp.json or repo .cursor/mcp.json # { "mcpServers": { "leni": { "url": "http://127.0.0.1:8088/mcp" } } } # 4. Cursor → Settings → MCP → leni → Connect → login + Allow