Skip to main content
The @kontext-dev/js-sdk package is the developer entry point to the Kontext identity control plane. Use it to build agents with runtime identity, connect to external systems with short-lived scoped credentials, and keep policy and audit control centralized in Kontext.
@kontext-dev/[email protected] includes hard-cutover runtime integration semantics, including connectType: "user_token" for per-user API key flows and kontext.require(..., { userId }) for confidential server-side exchanges keyed by an external end-user ID.

Choose a path

Server SDK

Build MCP servers with middleware, scoped credentials, and production controls.

Client SDK

Build app-facing clients with auth, tool execution, and token storage.

Frameworks

Integrate with Vercel AI SDK, Cloudflare Agents, and React.

Management SDK

Automate applications, integrations, service accounts, sessions, and traces.
Type signatures and interfaces are in the API Reference.

Install

Subpath exports

The package supports both root exports and subpath exports. Subpath imports are recommended when you want the narrowest surface area.

Peer dependencies

Install peer dependencies based on which entry points you use. Your package manager will warn about missing peer dependencies when you import an entry point that needs them.

Environment variables

The server SDK reads KONTEXT_CLIENT_SECRET automatically. You do not need to pass it in the constructor if the environment variable is set.