convez.ai
MCP Server
MukundaKatta

descope-mcp

MukundaKatta/descope-mcp

Ver no GitHub
InicialPluginScore · de 0 a 100

MCP server for Descope auth: validate JWTs, check roles, get users, send magic links. No SDK dep — pure WebCrypto.

Instalação

$npx convez-ai MukundaKatta/descope-mcp

1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.

Métricas

Estrelas
0
Forks
0
Acompanhando
0
Saúde
28%
Último commit
há 2 meses
Versão
—
Issues abertas
3
Contribuidores
1

README

A tradução para o português deste README ainda está na fila.

descope-mcp

An MCP server for Descope authentication. Lets any LLM agent verify session tokens, check user roles, look up user records, and trigger magic-link flows — without baking auth logic into the agent's prompt.

Built for the Global MCP Hackathon 2026 sponsored by Descope.

Tools

ToolWhat it does
validate_sessionVerify a Descope JWT via JWKS. Returns claims (sub, email, roles, tenants) and expiry info.
check_rolesGiven claims from validate_session, check if required roles are granted (global or per-tenant). Returns allowed + missing[].
get_userFetch a user record by login ID (needs management key).
send_magic_linkTrigger a magic-link email. Returns pendingRef for polling + masked email for display.

Quick start

npx -y @mukundakatta/descope-mcp

Claude Desktop / Cursor / Cline

{
  "mcpServers": {
    "descope": {
      "command": "npx",
      "args": ["-y", "@mukundakatta/descope-mcp"],
      "env": {
        "DESCOPE_PROJECT_ID": "P...",
        "DESCOPE_MANAGEMENT_KEY": "K..."
      }
    }
  }
}

Get your Project ID at app.descope.com. Management key is optional — only needed for get_user.

Environment variables

VariableRequiredDescription
DESCOPE_PROJECT_IDYesYour Descope project ID (starts with P).
DESCOPE_MANAGEMENT_KEYNoManagement key for admin operations.
DESCOPE_BASE_URLNoOverride for self-hosted Descope.

Example agent flow

User: "Can Alice access the billing dashboard?"

Agent calls:
1. validate_session(session_token=alice_jwt)
   → { valid: true, claims: { sub: "u_abc", roles: ["viewer"], ... } }

2. check_roles(claims_json=..., required_roles=["billing"])
   → { allowed: false, missing: ["billing"] }

Agent replies: "Alice doesn't have the billing role. She has: viewer."

How it works

  • No Descope SDK dependency — JWKS fetch + RS256 verification via WebCrypto (crypto.subtle), so the server stays small and auditable.
  • Offline-safe — pass a custom fetchFn in tests; all 15 unit tests run without any network calls.
  • Tenant-aware — check_roles supports multi-tenant role checks (pass tenant_id).

Tests

npm test   # 15 tests, all offline

Related

  • mcp-stack — 14 utility MCP servers for workflow automation agents
Ver o original no GitHub

Bom para

Relacionados