scalekit-sdk-node

mcp
Security Audit
Warn
Health Warn
  • License — License: MIT
  • Description — Repository has a description
  • Active repo — Last push 0 days ago
  • Low visibility — Only 5 GitHub stars
Code Warn
  • network request — Outbound network request in lib/actions.d.ts
  • network request — Outbound network request in lib/actions.js
Permissions Pass
  • Permissions — No dangerous permissions requested
Purpose
This is the official Node.js SDK for Scalekit, an authentication and authorization platform designed for AI agents and B2B applications. It provides an MCP server to handle identity management, enterprise SSO, and OAuth 2.1 specifically tailored for Model Context Protocol environments.

Security Assessment
Overall Risk: Low. The package requires your own credentials (`client_id`, `client_secret`) to function, meaning there are no hardcoded secrets in the codebase. It does not request dangerous system permissions or execute arbitrary shell commands. As expected for an authentication SDK, it makes outbound network requests to communicate with the Scalekit API. While the overall risk is low, you should always be aware that passing credentials through a third-party auth library means it inherently handles highly sensitive data.

Quality Assessment
The project is actively maintained, with its most recent code push occurring just today. It uses the highly permissive and standard MIT license. However, the community visibility and trust level is currently very low. The repository only has 5 GitHub stars, indicating a small user base. Despite this, it is published on npm as an official SDK, and the documentation and TypeScript support are highly professional.

Verdict
Safe to use, assuming you are comfortable trusting Scalekit as your centralized third-party authentication provider.
SUMMARY

Node.js SDK for Scalekit — auth stack for agents. SAML, OIDC, SCIM, MCP Auth, agent auth, tool-calling.

README.md


Official Node.js SDK

npm version
License: MIT
npm downloads

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 Node.js 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
  • 🔷 TypeScript Support: Full TypeScript definitions included
📚 Documentation • 🚀 SSO Quickstart • 💻 API Reference

Pre-requisites

  1. Sign up for a Scalekit account.
  2. Get your env_url, client_id and client_secret from the Scalekit dashboard.
Note: Our Node.js SDK requires Node.js 18.14.1 or later .

Installation

Install Scalekit SDK using your preferred package manager.

npm install @scalekit-sdk/node
#or
yarn add @scalekit-sdk/node
#or
pnpm add @scalekit-sdk/node

Minimum Requirements

The Scalekit Node.js SDK has been tested with and requires the following:

Component Version
Node.js 18.14.1+

Note: Node.js 18.14.1 or later is required (see engines.node in package.json). We recommend using the current LTS release for best support.

Usage

Initialize the Scalekit client using the appropriate credentials. Refer code sample below.

import { ScalekitClient } from "@scalekit-sdk/node";

const scalekitClient = new ScalekitClient(
  process.env.SCALEKIT_ENV_URL!,
  process.env.SCALEKIT_CLIENT_ID!,
  process.env.SCALEKIT_CLIENT_SECRET!
);

// Use the sc object to interact with the Scalekit API
const authUrl = scalekitClient.getAuthorizationUrl("https://acme-corp.com/redirect-uri", {
  state: "state",
  connectionId: "connection_id",
});

Examples - SSO with Express.js

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

import express from "express";
import { ScalekitClient } from "@scalekit-sdk/node";

const app = express();

const sc = new ScalekitClient(
  process.env.SCALEKIT_ENV_URL!,
  process.env.SCALEKIT_CLIENT_ID!,
  process.env.SCALEKIT_CLIENT_SECRET!
);

const redirectUri = `${process.env.HOST}/auth/callback`;

// Get the authorization URL and redirect the user to the IdP login page
app.get("/auth/login", (req, res) => {
  const authUrl = scalekitClient.getAuthorizationUrl(
    redirectUri,
    {
      state: "state",
      connectionId: "connection_id",
    }
  );

  res.redirect(authUrl);
});

// Handle the callback from Scalekit
app.get("/auth/callback", async (req, res) => {
  const { code, error, error_description, idp_initiated_login } = req.query;
  // Handle error
  if (error) {
    return res.status(400).json({ error, error_description });
  }
  // Handle IdP initiated login
  if (idp_initiated_login) {
    // Get the claims from the IdP initiated login
    const {
      connection_id,
      organization_id,
      login_hint,
      relay_state
    } = await scalekitClient.getIdpInitiatedLoginClaims(idp_initiated_login as string);
    // Get the authorization URL and redirect the user to the IdP login page
    const url = scalekitClient.getAuthorizationUrl(
      redirectUri,
      {
        connectionId: connection_id,
        organizationId: organization_id,
        loginHint: login_hint,
        ...(relay_state && { state: relay_state }),
      }
    )

   return res.redirect(url);
  }
  const authResp = await scalekitClient.authenticateWithCode(code, redirectUri);
  res.cookie("access_token", authResp.accessToken);
  return res.json(authResp.accessToken);
});

app.listen(3000, () => {
  console.log("Server is running on port 3000");
});

📱 Example Apps

Explore fully functional sample applications built with popular Node.js frameworks and the Scalekit SDK:

Framework Repository Description
Express.js scalekit-express-example Basic Express.js server implementation
Next.js scalekit-nextjs-demo Modern React/Next.js application

🔗 Helpful Links

📖 Quickstart Guides

📚 Documentation & Reference

🛠️ Additional Resources

License

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

Reviews (0)

No results found