npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@meetkai/mka1

v0.54.62

Published

Official TypeScript SDK for the MKA1 API.

Readme

MKA1 TypeScript SDK

Official TypeScript SDK for the MKA1 API.

Use @meetkai/mka1 to call MKA1 from Node.js, browsers, React apps, and agent tooling. The SDK includes typed clients for responses, agents, files, vector stores, evals, usage, model registry operations, guardrails, sandbox APIs, and more.

Full product and API documentation lives at docs.mka1.com.

Install

npm add @meetkai/mka1
pnpm add @meetkai/mka1
bun add @meetkai/mka1
yarn add @meetkai/mka1

The package ships both ESM and CommonJS builds. For supported runtimes, see RUNTIMES.md.

Quick Start

import { SDK } from "@meetkai/mka1";

const mka1 = new SDK({
  bearerAuth: process.env.MKA1_API_KEY,
});

const models = await mka1.llm.models.list({});

console.log(models.data.map((model) => model.id));

Most write APIs use the same client:

import { SDK } from "@meetkai/mka1";

const mka1 = new SDK({
  bearerAuth: process.env.MKA1_API_KEY,
});

const response = await mka1.llm.responses.create({
  responsesCreateRequest: {
    model: "<MODEL_ID>",
    input: "Summarize the latest MKA1 eval run.",
  },
});

console.log(response);

Authentication

Pass an MKA1 API key or bearer token when constructing the client:

const mka1 = new SDK({
  bearerAuth: process.env.MKA1_API_KEY,
});

You can also provide an async token resolver:

const mka1 = new SDK({
  bearerAuth: async () => refreshMka1Token(),
});

For account setup, API keys, and endpoint-specific examples, see docs.mka1.com.

Common Entry Points

mka1.llm.responses
mka1.llm.conversations
mka1.llm.files
mka1.llm.vectorStores
mka1.llm.evals
mka1.llm.models
mka1.llm.usage
mka1.agents
mka1.agentRuns
mka1.sandbox
mka1.permissions

The generated method reference below lists every resource and operation included in this SDK.

React Query

React hooks are available from @meetkai/mka1/react-query. Install the optional peer dependencies only if you plan to use those hooks:

npm add @tanstack/react-query react react-dom

See REACT_QUERY.md for provider setup, suspense hooks, invalidation helpers, and mutation examples.

MCP Server

This package also exposes the MKA1 API as an installable Model Context Protocol server.

Node.js v20 or newer is required for the MCP server.

{
  "mcpServers": {
    "mka1": {
      "command": "npx",
      "args": [
        "-y",
        "--package",
        "@meetkai/mka1",
        "--",
        "mcp",
        "start",
        "--bearer-auth",
        "..."
      ]
    }
  }
}

For available server flags:

npx -y --package @meetkai/mka1 -- mcp start --help

Summary

MKA1 API: The MKA1 API is a RESTful API that provides access to the MKA1 platform. Learn how to get started with the API and the TypeScript SDK here.

Table of Contents

SDK Installation

[!TIP] To finish publishing your SDK to npm and others you must run your first generation action.

The SDK can be installed with either npm, pnpm, bun or yarn package managers.

NPM

npm add git+https://github.com/MeetKai/mk1-sdks.git?subdir=typescript
# Install optional peer dependencies if you plan to use React hooks
npm add @tanstack/react-query react react-dom

PNPM

pnpm add https://github.com/MeetKai/mk1-sdks#path:typescript
# Install optional peer dependencies if you plan to use React hooks
pnpm add @tanstack/react-query react react-dom

Bun

bun add https://github.com/MeetKai/mk1-sdks
# Install optional peer dependencies if you plan to use React hooks
bun add @tanstack/react-query react react-dom

Yarn

yarn add https://github.com/MeetKai/mk1-sdks
# Install optional peer dependencies if you plan to use React hooks
yarn add @tanstack/react-query react react-dom

[!NOTE] This package is published with CommonJS and ES Modules (ESM) support.

Model Context Protocol (MCP) Server

This SDK is also an installable MCP server where the various SDK methods are exposed as tools that can be invoked by AI applications.

Node.js v20 or greater is required to run the MCP server from npm.

Add the following server definition to your claude_desktop_config.json file:

{
  "mcpServers": {
    "SDK": {
      "command": "npx",
      "args": [
        "-y", "--package", "@meetkai/mka1",
        "--",
        "mcp", "start",
        "--bearer-auth", "..."
      ]
    }
  }
}

Create a .cursor/mcp.json file in your project root with the following content:

{
  "mcpServers": {
    "SDK": {
      "command": "npx",
      "args": [
        "-y", "--package", "@meetkai/mka1",
        "--",
        "mcp", "start",
        "--bearer-auth", "..."
      ]
    }
  }
}

You can also run MCP servers as a standalone binary with no additional dependencies. You must pull these binaries from available Github releases:

curl -L -o mcp-server \
    https://github.com/{org}/{repo}/releases/download/{tag}/mcp-server-bun-darwin-arm64 && \
chmod +x mcp-server

If the repo is a private repo you must add your Github PAT to download a release -H "Authorization: Bearer {GITHUB_PAT}".

{
  "mcpServers": {
    "Todos": {
      "command": "./DOWNLOAD/PATH/mcp-server",
      "args": [
        "start"
      ]
    }
  }
}

For a full list of server arguments, run:

npx -y --package @meetkai/mka1 -- mcp start --help

Requirements

For supported JavaScript runtimes, please consult RUNTIMES.md.

SDK Example Usage

Example

import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  await sdk.permissions.llm.grant({
    grantPermissionRequest: {
      resourceType: "completion",
      resourceId: "my-completion-123",
      userId: "user-abc456",
      role: "writer",
    },
  });
}

run();

Authentication

Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name | Type | Scheme | | ------------ | ---- | ----------- | | bearerAuth | http | HTTP Bearer |

To authenticate with the API the bearerAuth parameter must be set when initializing the SDK client instance. For example:

import { SDK } from "@meetkai/mka1";

const sdk = new SDK({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  await sdk.permissions.llm.grant({
    grantPermissionRequest: {
      resourceType: "completion",
      resourceId: "my-completion-123",
      userId: "user-abc456",
      role: "writer",
    },
  });
}

run();

Per-Operation Security Schemes

Some operations in this SDK require the security scheme to be specified at the request level. For example:

import { SDK } from "@meetkai/mka1";

const sdk = new SDK();

async function run() {
  const result = await sdk.auth.orgs.getById({}, {
    orgId: "<id>",
  });

  console.log(result);
}

run();

Available Resources and Operations

AgentConnectors

AgentRuns

AgentSchedules

AgentVersions

Agents

Analytics

  • capture - Durably accept a batch of events
  • query - Query event counts or unique visitors

Analytics.Events

  • search - Search events in a time range

Analytics.Keys

  • create - Create a capture key and return its secret once
  • list - List capture key metadata
  • revoke - Revoke a capture key

Analytics.Projects

  • create - Create an analytics project
  • list - List accessible analytics projects
  • get - Get an analytics project
  • update - Rename an active analytics project
  • archive - Archive an analytics project

Analytics.Visitors

  • search - Search visitors in a time range

~~Auth.ApiKey~~

Auth.ApiKeys

Auth.Cluster

Auth.Orgs

Auth.ServiceAccounts

Auth.Teams

Budgets

ComputeCatalog

ComputeJobs

ComputePricing

  • getPricing - Get the latest committed storage price
  • putPricing - Create an immutable storage-price version

ComputeSecrets

ComputeServices

ComputeTenants

ComputeUsage

ComputeVolumes

Datasets

Flags

  • list - List flags
  • create - Create a flag
  • delete - Delete a flag and its settings in every environment
  • get - Get a flag
  • update - Update a flag's name, description, default value, or project
  • archive - Archive a flag
  • setEnvironmentState - Replace a flag's settings in one environment
  • unarchive - Restore an archived flag

Flags.Audit

  • list - List audit entries, newest first

Flags.Environments

Flags.Projects

Guardrails

Llm.Batches

~~Llm.Chat~~

  • ~~createChat~~ - [Deprecated] Chat completions for OpenAI SDK/client usage :warning: Deprecated
  • ~~stream~~ - [Deprecated] Streaming chat completions for generated SDK usage :warning: Deprecated

Llm.Classify

  • classify - Classify text into predefined categories

Llm.Conversations

Llm.Embeddings

Llm.Evals

Llm.Extract

Llm.Feedback

Llm.Files

~~Llm.FineTuning~~

  • ~~create~~ - [Deprecated] Create a fine-tuning job :warning: Deprecated
  • ~~list~~ - [Deprecated] List fine-tuning jobs :warning: Deprecated
  • ~~retrieve~~ - [Deprecated] Retrieve a fine-tuning job :warning: Deprecated
  • ~~cancel~~ - [Deprecated] Cancel a fine-tuning job :warning: Deprecated
  • ~~pause~~ - [Deprecated] Pause a fine-tuning job :warning: Deprecated
  • ~~resume~~ - [Deprecated] Resume a fine-tuning job :warning: Deprecated
  • ~~listEvents~~ - [Deprecated] List fine-tuning events :warning: Deprecated
  • ~~listCheckpoints~~ - [Deprecated] List fine-tuning checkpoints :warning: Deprecated

Llm.Images

  • create - Generate images from text descriptions

Llm.McpVault

Llm.MemoryStores

Llm.Models

Llm.Prompts

Llm.Responses

  • create - Create an agent-powered response with tool support
  • list - List all responses with pagination
  • get - Retrieve response by ID with status and results
  • update - Update a response
  • delete - Permanently delete a response and its data
  • cancel - Cancel an in-progress background response
  • wake - Wake a sleeping background response
  • listInputItems - List paginated input items for a response
  • compact - Compact a conversation

Llm.Skills

Llm.Speech

Llm.Usage

Llm.VectorStores

Permissions.Llm

  • grant - Grant permission to a user or make public
  • revoke - Revoke permission from a user or remove public access
  • check - Check user permission

Repos

  • list - List the caller's org's repositories
  • create - Create a repository
  • delete - Delete a repository
  • get - Get a repository
  • update - Update a repository's labels

Repos.Tags

  • list - List an image repository's tags
  • delete - Delete an image tag

Sandbox

Sandbox.Environments

Sandbox.Github

Session

Tracking.Experiments

Tracking.Runs

Usage

  • sandbox - Get Sandbox Usage
  • costs - Aggregate cost by dimension

Standalone functions

All the methods listed above are available as standalone functions. These functions are ideal for use in applications running in the browser, serverless runtimes or other environments where application bundle size is a primary concern. When using a bundler to build your application, all unused functionality will be either excluded from the final bundle or tree-shaken away.

To read more about standalone functions, check FUNCTIONS.md.