| title | Set up environment & SDK | ||||||
|---|---|---|---|---|---|---|---|
| description | Create your account, install SDK, set up AI tools, and verify your setup to start building with Scalekit | ||||||
| tags |
|
||||||
| tableOfContents | true | ||||||
| head |
|
||||||
| sidebar |
|
||||||
| prev | false |
import { LinkButton, Aside, Steps, Tabs, TabItem, Badge } from '@astrojs/starlight/components' import { VideoPlayer } from 'starlight-videos/components' import InstallSDK from '@components/templates/_installsdk.mdx'
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. ## Get your API credentials
Scalekit uses the OAuth 2.0 client credentials flow for secure API authentication.
Navigate to Dashboard > Developers > Settings > API credentials and copy these values:
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_abcdef1234567890Your workspace includes two environment URLs:
https://{your-subdomain}.scalekit.dev (Development)
https://{your-subdomain}.scalekit.com (Production)View your environment URLs in Dashboard > Developers > Settings.
-
Choose your preferred language and install the Scalekit SDK:
After installation, initialize the SDK with your credentials:
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 );
from scalekit import ScalekitClient import os # Initialize the Scalekit client with your credentials scalekit_client = ScalekitClient( env_url=os.getenv('SCALEKIT_ENVIRONMENT_URL'), client_id=os.getenv('SCALEKIT_CLIENT_ID'), client_secret=os.getenv('SCALEKIT_CLIENT_SECRET') )
import ( "os" "github.com/scalekit-inc/scalekit-sdk-go" ) // Initialize the Scalekit client with your credentials scalekitClient := scalekit.NewScalekitClient( os.Getenv("SCALEKIT_ENVIRONMENT_URL"), os.Getenv("SCALEKIT_CLIENT_ID"), os.Getenv("SCALEKIT_CLIENT_SECRET"), )
All official SDKs include automatic retries, error handling, typed models, and auth helper methods to simplify your integration.import com.scalekit.ScalekitClient; // Initialize the Scalekit client with your credentials ScalekitClient scalekitClient = new ScalekitClient( System.getenv("SCALEKIT_ENVIRONMENT_URL"), System.getenv("SCALEKIT_CLIENT_ID"), System.getenv("SCALEKIT_CLIENT_SECRET") );
-
Test your configuration by listing organizations in your workspace. This confirms your credentials work correctly.
# 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
curl -L '<SCALEKIT_ENVIRONMENT_URL>/api/v1/organizations?page_size=5' \ -H 'Authorization: Bearer <ACCESS_TOKEN>'
Create a file
verify.jswith the following code:import { ScalekitClient } from '@scalekit-sdk/node'; const scalekit = new ScalekitClient( process.env.SCALEKIT_ENVIRONMENT_URL, process.env.SCALEKIT_CLIENT_ID, process.env.SCALEKIT_CLIENT_SECRET, ); const { organizations } = await scalekit.organization.listOrganization({ pageSize: 5, }); console.log(`Name of the first organization: ${organizations[0].display_name}`);
Run the verification script:
node verify.js
Create a file
verify.pywith the following code:from scalekit import ScalekitClient import os # Initialize the SDK client scalekit_client = ScalekitClient( os.getenv('SCALEKIT_ENVIRONMENT_URL'), os.getenv('SCALEKIT_CLIENT_ID'), os.getenv('SCALEKIT_CLIENT_SECRET') ) org_list = scalekit_client.organization.list_organizations(page_size=5) print(f'Name of the first organization: {org_list[0].display_name}')
Run the verification script:
python verify.py
Create a file
verify.gowith the following code:package main import ( "context" "fmt" "os" "github.com/scalekit-inc/scalekit-sdk-go" ) func main() { ctx := context.Background() scalekitClient := scalekit.NewScalekitClient( os.Getenv("SCALEKIT_ENVIRONMENT_URL"), os.Getenv("SCALEKIT_CLIENT_ID"), os.Getenv("SCALEKIT_CLIENT_SECRET"), ) organizations, err := scalekitClient.Organization.ListOrganizations(ctx, &scalekit.ListOrganizationsParams{ PageSize: 5, }) if err != nil { panic(err) } fmt.Printf("Name of the first organization: %s\n", organizations[0].DisplayName) }
Create a file
Verify.javawith the following code:import com.scalekit.ScalekitClient; import com.scalekit.models.ListOrganizationsResponse; public class Verify { public static void main(String[] args) { ScalekitClient scalekitClient = new ScalekitClient( System.getenv("SCALEKIT_ENVIRONMENT_URL"), System.getenv("SCALEKIT_CLIENT_ID"), System.getenv("SCALEKIT_CLIENT_SECRET") ); ListOrganizationsResponse organizations = scalekitClient.organizations().listOrganizations(5, ""); System.out.println("Name of the first organization: " + organizations.getOrganizations()[0].getDisplayName()); } }
If you see organization data, your setup is complete! You're now ready to implement authentication in your application.
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 your MCP client.
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.
If you're building your own MCP server and need to add OAuth-based authorization, check out our guide: [Add auth to your MCP server](/authenticate/mcp/quickstart/).Use the most common client configs below. For the full list of supported MCP hosts and editor setups, see the Scalekit MCP server guide.
Run this command in your terminal:
claude mcp add --transport http scalekit https://mcp.scalekit.com/Edit ~/.cursor/mcp.json, or open Cursor Settings → MCP → Add New Global MCP Server and paste the config:
{
"mcpServers": {
"scalekit": {
"url": "https://mcp.scalekit.com/"
}
}
}Run this command in your terminal:
codex mcp add scalekit --url https://mcp.scalekit.com/Edit opencode.json in your project root:
{
"mcp": {
"scalekit": {
"type": "remote",
"url": "https://mcp.scalekit.com/"
}
}
}After configuration, your MCP client will initiate an OAuth authorization workflow to securely connect to Scalekit's MCP server.
For Claude Desktop, VS Code, Windsurf, Gemini CLI, Kiro, Warp, Zed, and other hosts, use the full [Scalekit MCP server guide](/dev-kit/ai-assisted-development/scalekit-mcp-server/).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.
To enable Cursor to access up-to-date Scalekit documentation:
- Open Cursor settings (Cmd/Ctrl + ,)
- Navigate to Indexing & Docs section
- Click on Add
- Add
https://docs.scalekit.com/llms-full.txtto the indexable URLs - 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.
Assistants like Anthropic Claude, Ollama, Google Gemini, Vercel v0, OpenAI's ChatGPT, or your own models can help you with Scalekit projects.
Don't see instructions for your favorite AI assistant? We'd love to add support for more tools! Raise an issue on our GitHub repository and let us know which AI tool you'd like us to document.
