Skip to content

Set up environment & SDK

Create your account, install the SDK, set up AI tools, and verify your setup to start building with Scalekit

This guide shows you how to set up Scalekit in your development environment. You’ll configure your workspace, get API credentials, install the SDK, verify everything works correctly, and optionally set up AI-powered development tools.

Before you begin, create a Scalekit account if you haven’t already. After creating your account, a Scalekit workspace is automatically set up for you with dedicated development and production environments.

Create a Scalekit account
  1. Scalekit uses the OAuth 2.0 client credentials flow for secure API authentication.

    Navigate to Dashboard > Developers > Settings > API credentials and copy these values:

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url> # Example: https://acme.scalekit.dev or https://auth.acme.com (if custom domain is set)
    SCALEKIT_CLIENT_ID=<app-client-id> # Example: skc_1234567890abcdef
    SCALEKIT_CLIENT_SECRET=<app-client-secret> # Example: test_abcdef1234567890

    Your workspace includes two environment URLs:

    Environment URLs
    https://{your-subdomain}.scalekit.dev (Development)
    https://{your-subdomain}.scalekit.com (Production)

    View your environment URLs in Dashboard > Developers > Settings.

  2. Choose your preferred language and install the Scalekit SDK:

    npm install @scalekit-sdk/node

    After installation, initialize the SDK with your credentials:

    Initialize SDK
    import { Scalekit } from '@scalekit-sdk/node';
    // Initialize the Scalekit client with your credentials
    const scalekit = new Scalekit(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET
    );
  3. Test your configuration by listing organizations in your workspace. This confirms your credentials work correctly.

    Authenticate with client credentials
    # Get an access token
    curl https://<SCALEKIT_ENVIRONMENT_URL>/oauth/token \
    -X POST \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'client_id=<SCALEKIT_CLIENT_ID>' \
    -d 'client_secret=<SCALEKIT_CLIENT_SECRET>' \
    -d 'grant_type=client_credentials'

    This returns an access token:

    {
    "access_token": "eyJhbGciOiJSUzI1NiIsImInR5cCI6IkpXVCJ9...",
    "token_type": "Bearer",
    "expires_in": 86399,
    "scope": "openid"
    }

    Use the token to access the Scalekit API

    List organizations
    curl -L '<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations?page_size=5' \
    -H 'Authorization: Bearer <ACCESS_TOKEN>'

    If you see organization data, your setup is complete! You’re now ready to implement authentication in your application.

  4. Set up Scalekit MCP Server Optional

    Section titled “Set up Scalekit MCP Server ”

    Scalekit’s Model Context Protocol (MCP) server connects your AI coding assistants to Scalekit. Manage environments, organizations, users, and authentication through natural language queries in Claude, Cursor, Windsurf, and other MCP-compatible tools.

    The MCP server provides AI assistants with tools for environment management, organization and user management, authentication connection setup, role administration, and admin portal access. It uses OAuth 2.1 authentication to securely connect your AI tools to your Scalekit workspace.

    Based on your MCP client, follow the configuration instructions below:

    1. Open the Claude Desktop app, go to Settings, then Developer
    2. Click Edit Config
    3. Open the claude_desktop_config.json file
    4. Copy and paste the server config to your existing file, then save
    5. Restart Claude
    {
    "mcpServers": {
    "scalekit": {
    "command": "npx",
    "args": ["-y", "mcp-remote", "https://mcp.scalekit.com/"]
    }
    }
    }

    After configuration, your MCP client will initiate an OAuth authorization workflow to securely connect to Scalekit’s MCP server.

  5. Configure code editors for Scalekit documentation

    Section titled “Configure code editors for Scalekit documentation”

    In-code editor chat features are powered by models that understand your codebase and project context. These models search the web for relevant information to help you. However, they may not always have the latest information. Follow the instructions below to configure your code editors to explicitly index for up-to-date information.

    Play

    To enable Cursor to access up-to-date Scalekit documentation:

    1. Open Cursor settings (Cmd/Ctrl + ,)
    2. Navigate to Indexing & Docs section
    3. Click on Add
    4. Add https://docs.scalekit.com/llms-full.txt to the indexable URLs
    5. Click on Save

    Once configured, use @Scalekit Docs in your chat to ask questions about Scalekit features, APIs, and integration guides. Cursor will search the latest documentation to provide accurate, up-to-date answers.

    Windsurf enables @docs mentions within the Cascade chat to search for the best answers to your questions.

    @docs:https://docs.scalekit.com/llms-full.txt
    <your question here>

    Costs more tokens.

    Assistants like Anthropic Claude, Ollama, Google Gemini, Vercel v0, OpenAI’s ChatGPT, or your own models can help you with Scalekit projects.

    Play