convez.ai
MCP ServerSegurançaIntermediário
scalekit-inc

Scalekit SDK Python

scalekit-inc/scalekit-sdk-python

Stack de autenticação unificado para humanos e agentes de IA

Ver no GitHub
InicialPluginScore · de 0 a 100

SDK oficial Python para Scalekit, stack de autenticação para apps de IA. Oferece autenticação empresarial (SSO, SAML, OIDC, SCIM) e autorização de agentes (MCP, OAuth 2.1, credenciais efêmeras), com suporte a human-in-the-loop e auditoria imutável.

Instalação

$npx convez-ai scalekit-inc/scalekit-sdk-python

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
63
Forks
6
Acompanhando
2
Saúde
37%
Último commit
há 1 dia
Versão
v2.25.0
Issues abertas
26
Contribuidores
16

Casos de uso

  • Implementar SSO empresarial (SAML/OIDC) em apps B2B
  • Gerenciar autorização e credenciais de agentes IA via MCP
  • Provisionar/desprovicionar usuários automaticamente com SCIM
  • Construir workflows seguros com autenticação em múltiplos passos

Veredito

MCP server robusto e bem documentado para quem precisa de autenticação enterprise-grade combinada com suporte nativo a agentes IA. Excelente escolha para produtos B2B com requisitos de segurança e auditoria rigorosos.

README

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

Official Python SDK

PyPI version License: MIT Python versions

Scalekit is the auth stack for AI apps - from human authentication to agent authorization. Build secure AI products faster with authentication for humans (SSO, passwordless, full-stack auth) and agents (MCP/APIs, delegated actions), all unified on one platform. This Python SDK enables both traditional B2B authentication and cutting-edge agentic workflows.

🤖 Agent-First Features

  • 🔐 Agent Identity: Agents as first-class actors with human ownership and org context
  • 🎯 MCP-Native OAuth 2.1: Purpose-built for Model Context Protocol with DCR/PKCE support
  • ⏰ Ephemeral Credentials: Time-bound, task-based authorization (minutes, not days)
  • 🔒 Token Vault: Per-user, per-tool token storage with rotation and progressive consent
  • 👥 Human-in-the-Loop: Step-up authentication when risk crosses thresholds
  • 📊 Immutable Audit: Track which user initiated, which agent acted, what resource was accessed

👨‍💼 Human Authentication

  • 🔐 Enterprise SSO: Support for SAML and OIDC protocols
  • 👥 SCIM Provisioning: Automated user provisioning and deprovisioning
  • 🚀 Passwordless Authentication: Magic links, OTP, and modern auth flows
  • 🏢 Multi-tenant Architecture: Organization-level authentication policies
  • 📱 Social Logins: Support for popular social identity providers
  • 🛡️ Full-Stack Auth: Complete IdP-of-record solution for B2B SaaS
  • 🐍 Pythonic API: Clean, intuitive interface following Python conventions

Pre-requisites

  1. Sign up for a Scalekit account.
  2. Get your env_url, client_id and client_secret from the Scalekit dashboard.

Installation

Install Scalekit SDK using your preferred package manager.

pip install scalekit-sdk-python

Usage


from scalekit import ScalekitClient

sc = ScalekitClient(
  env_url, 
  client_id, 
  client_secret
)

# Use the sc object to interact with the Scalekit API
auth_url = sc.get_authorization_url(
  "https://acme-corp.com/redirect-uri",
  state="state",
  connection_id="con_123456789"
)

Minimum Requirements

To use the Scalekit Python SDK, you must have the following:

ComponentVersion
Python3.8+

Tip: Although Python 3.8 meets the minimum requirement, using a more recent version (such as Python 3.9 or later) is advisable.

Examples - SSO with FastAPI

Below is a simple code sample that showcases how to implement Single Sign-on using Scalekit SDK

from fastapi import FastAPI, Request, Response
from scalekit import ScalekitClient
import uvicorn

app = FastAPI()

sc = ScalekitClient(
  env_url, 
  client_id, 
  client_secret
)

redirect_uri = "http://localhost:8000/auth/callback"

@app.get("/auth/login")
async def auth_login(request: Request):
  auth_url = sc.get_authorization_url(
    redirect_uri,
    state="state",
    connection_id="con_123456789"
  )
  return Response(status_code=302, headers={"Location": auth_url})

@app.get("/auth/callback")
async def auth_callback(request: Request):
  code = request.query_params.get("code")
  token = sc.authenticate_with_code(
    code, 
    redirect_uri
  )
  response = JSONResponse(content=token)
  response.set_cookie("access_token", token["access_token"])

  return response

if __name__ == "__main__":
  uvicorn.run(app, port=8080)

📱 Example Apps

Explore fully functional sample applications built with popular Python frameworks and the Scalekit SDK:

FrameworkRepositoryDescription
FastAPIscalekit-fastapi-exampleModern async Python API framework

🔗 Helpful Links

📖 Quickstart Guides

📚 Documentation & Reference

🛠️ Additional Resources

License

This project is licensed under the MIT license. See the LICENSE file for more information.

Ver o original no GitHub

Bom para

Relacionados