# MKA1: English API Reference Tools and sandbox ## Tools and sandbox ### MCP Vault - [Create MCP server](https://docs.mka1.com/api-reference/mcp-vault/create-mcp-server.md): Creates a user-owned MCP server configuration, optionally shared with the end users the owner calls on behalf of and with the OAuth client they connect through. Secret credentials are stored separately; the OAuth client secret is write-only. - [List MCP servers](https://docs.mka1.com/api-reference/mcp-vault/list-mcp-servers.md): Lists MCP server configurations owned by the authenticated user context. - [Retrieve MCP server](https://docs.mka1.com/api-reference/mcp-vault/retrieve-mcp-server.md): Returns a user-owned MCP server configuration. - [Update MCP server](https://docs.mka1.com/api-reference/mcp-vault/update-mcp-server.md): Partially updates a user-owned MCP server configuration. An oauth object replaces the OAuth client configuration (omit client_secret to keep the stored secret); null removes it. Setting shared_with_end_users to false revokes every end user's credential on the server. - [Delete MCP server](https://docs.mka1.com/api-reference/mcp-vault/delete-mcp-server.md): Soft-deletes a user-owned MCP server and revokes every credential stored on it, including its end users' credentials. - [Create MCP credential](https://docs.mka1.com/api-reference/mcp-vault/create-mcp-credential.md): Stores the caller's own encrypted credentials for an MCP server they own or, for an end user, their developer's server shared with end users. Secret values are never returned. - [List MCP credentials](https://docs.mka1.com/api-reference/mcp-vault/list-mcp-credentials.md): Lists the caller's own encrypted credential metadata for an MCP server they own or, for an end user, their developer's server shared with end users. - [Delete MCP credential](https://docs.mka1.com/api-reference/mcp-vault/delete-mcp-credential.md): Revokes a user-owned MCP credential. - [Test MCP server](https://docs.mka1.com/api-reference/mcp-vault/test-mcp-server.md): Connects to an MCP server using the authenticated user's stored credential and returns discovered tool names. Failed connections return a 502 error; connection details are retained in redacted server logs. - [Start MCP server OAuth authorization](https://docs.mka1.com/api-reference/mcp-vault/start-mcp-server-oauth-authorization.md): Starts connecting an MCP server with OAuth as the caller: an end user on their developer's server shared with end users, or the server's owner. Returns the provider authorization URL to open in the end user's browser; its state is single-use and expires after 10 minutes. redirect_uri must equal one… - [Complete MCP server OAuth authorization](https://docs.mka1.com/api-reference/mcp-vault/complete-mcp-server-oauth-authorization.md): Completes an OAuth authorization with the state and code the provider sent to redirect_uri. Must be called by the same caller that started it. The gateway exchanges the code and stores the tokens as the caller's oauth credential, replacing their previous oauth credential on the server. Tokens are ne… ### Skills - [Create skill](https://docs.mka1.com/api-reference/skills/create-skill.md): Create a new skill by uploading files. The uploaded files must include a SKILL.md manifest. Accepts multipart form data with individual files or a single zip archive. - [List skills](https://docs.mka1.com/api-reference/skills/list-skills.md): Returns a paginated list of skills. - [Retrieve skill](https://docs.mka1.com/api-reference/skills/retrieve-skill.md): Returns information about a specific skill. - [Update skill](https://docs.mka1.com/api-reference/skills/update-skill.md): Update the default version pointer for a skill. - [Delete skill](https://docs.mka1.com/api-reference/skills/delete-skill.md): Delete a skill and all its versions. - [Download skill content](https://docs.mka1.com/api-reference/skills/download-skill-content.md): Download the zip bundle for a skill's default version. - [Create skill version](https://docs.mka1.com/api-reference/skills/create-skill-version.md): Create a new immutable version of a skill by uploading files. The uploaded files must include a SKILL.md manifest. - [List skill versions](https://docs.mka1.com/api-reference/skills/list-skill-versions.md): Returns a paginated list of versions for a skill. - [Retrieve skill version](https://docs.mka1.com/api-reference/skills/retrieve-skill-version.md): Returns information about a specific skill version. - [Delete skill version](https://docs.mka1.com/api-reference/skills/delete-skill-version.md): Delete a specific version of a skill. - [Download skill version content](https://docs.mka1.com/api-reference/skills/download-skill-version-content.md): Download the zip bundle for a specific skill version. - [List preconfigured skills](https://docs.mka1.com/api-reference/skills/list-preconfigured-skills.md): Returns the list of preconfigured skills that ship with the gateway. These can be referenced in shell tool definitions as { type: 'preconfigured', name: '...' }. ### Sessions - [Get Effective Network Policy](https://docs.mka1.com/api-reference/sessions/get-effective-network-policy.md): Intersect the authenticated tenant's organization and team hostname allowlists. - [Get Tenant Network Policy](https://docs.mka1.com/api-reference/sessions/get-tenant-network-policy.md): Read the authenticated tenant policy; optional expected IDs reject workspace changes, never select tenancy. - [Set Tenant Network Policy](https://docs.mka1.com/api-reference/sessions/set-tenant-network-policy.md): Administrator-only update with optimistic revision checking. An enabled empty list denies all outbound hosts. - [Get Tenant Resource Policy](https://docs.mka1.com/api-reference/sessions/get-tenant-resource-policy.md): Read organization or team resource limits for standard sandbox sessions. - [Set Tenant Resource Policy](https://docs.mka1.com/api-reference/sessions/set-tenant-resource-policy.md): Update organization or team resource limits for standard sandbox sessions. The expected revision rejects stale writes. - [Create Session](https://docs.mka1.com/api-reference/sessions/create-session.md): Create a sandbox session and return its public session metadata, session token, and provider. Set `session_kind` to `browser` to start a browser-backed session instead of a standard command/code sandbox. Set `queue_if_full` to `true` to queue the request instead of failing when runner capacity is te… - [List Sessions](https://docs.mka1.com/api-reference/sessions/list-sessions.md): List sandbox sessions visible to the authenticated caller. - [Get Session](https://docs.mka1.com/api-reference/sessions/get-session.md): Return the current state, configuration, and resource allocation for a sandbox session. - [Terminate Session](https://docs.mka1.com/api-reference/sessions/terminate-session.md): Stop a sandbox session and release the backing sandbox resources. ### Execution - [Run Command](https://docs.mka1.com/api-reference/execution/run-command.md): Run a command in the session workspace and return stdout, stderr, exit code, and changed files. - [Run Code](https://docs.mka1.com/api-reference/execution/run-code.md): Execute source code in the session workspace using a supported runtime and return the execution result. ### Workspace - [Get Workspace Manifest](https://docs.mka1.com/api-reference/workspace/get-workspace-manifest.md): List files currently stored in the session workspace, including paths, sizes, and etags. - [Download Workspace File](https://docs.mka1.com/api-reference/workspace/download-workspace-file.md): Download raw bytes from a file in the session workspace. - [Upload Workspace File](https://docs.mka1.com/api-reference/workspace/upload-workspace-file.md): Upload raw bytes into the session workspace at the given path. - [Download Workspace Archive](https://docs.mka1.com/api-reference/workspace/download-workspace-archive.md): Download a zip archive containing the selected workspace paths. - [Upload Workspace Archive](https://docs.mka1.com/api-reference/workspace/upload-workspace-archive.md): Upload a zip archive and extract its files into the session workspace. ### Sandbox Usage - [Get Sandbox Usage](https://docs.mka1.com/api-reference/sandbox-usage/get-sandbox-usage.md): Aggregate sandbox usage (session lifecycle, execution, and workspace operations) over a time range, bucketed and optionally grouped. Buckets are calendar-aligned in UTC: `start_time` is snapped down and `end_time` snapped up to the nearest bucket-width boundary, so the first and last buckets may ext… ### Sandbox Pricing - [Get Sandbox Pricing](https://docs.mka1.com/api-reference/sandbox-pricing/get-sandbox-pricing.md): Current sandbox pricing rate card, keyed by SKU (`standard`, `browser`, `eval-python`). Metered sandbox usage is billed `hours × (per_hour + reserved_memory_GiB × per_gib_hour)`; SKUs without a configured rate accrue no spend. Cluster admins only. - [Set Sandbox Pricing](https://docs.mka1.com/api-reference/sandbox-pricing/set-sandbox-pricing.md): Replace the sandbox pricing rate card. Full-replace semantics. Omitting a SKU that currently has a price is refused with 422 unless `allow_unpriced` is true: an unpriced SKU accrues no spend and its usage cannot be billed. A `currency` that differs from the stored one is saved only after the budgeti… ### Browser - [Get Browser Session URL](https://docs.mka1.com/api-reference/browser/get-browser-session-url.md): Return the public gateway URL for a browser session's Chrome DevTools Protocol endpoint. Playwright can use this HTTP endpoint directly. For clients that require a WebSocket endpoint, request `json/version` and use its rewritten `webSocketDebuggerUrl`. Insert subpaths before the query string; for ex… - [Get Browser Session URL (Deprecated)](https://docs.mka1.com/api-reference/browser/get-browser-session-url-deprecated.md): Deprecated compatibility alias for `getBrowserUrl`. Return the public gateway URL for a browser session's Chrome DevTools Protocol endpoint. Standard sessions do not expose a public URL; use the command, code, and workspace operations instead. - [Proxy Browser Port Request](https://docs.mka1.com/api-reference/browser/proxy-browser-port-request.md): Proxy an HTTP request to an exposed browser-session port through the gateway. Use the URL returned by `GET /sessions/{session_id}/browser-url` as the base. Insert CDP subpaths such as `json/version` or `json/list` before its query string, preserving the `session_token` parameter. This low-level prox… ### Sandbox GitHub - [Start GitHub Authorization](https://docs.mka1.com/api-reference/sandbox-github/start-github-authorization.md): Start connecting the caller's GitHub account. Send the user to the returned `authorize_url`. GitHub redirects back with a `code` and the same `state`; pass both to `POST /github/oauth/connections` before `expires_in_seconds` elapses. Each `state` works once. - [Connect GitHub Account](https://docs.mka1.com/api-reference/sandbox-github/connect-github-account.md): Finish GitHub authorization by exchanging the `code` and `state` from GitHub's redirect for a stored connection. The sandbox service keeps the access token encrypted and never returns it. The response lists the repositories the connection can reach. - [Get GitHub Connection](https://docs.mka1.com/api-reference/sandbox-github/get-github-connection.md): Return the caller's GitHub connection, or `null` when there is none. `token_invalid_at` is set once GitHub has rejected the stored token; reconnect to fix it. Set `verify` to `true` to check the token with GitHub now instead of at its next use. - [Disconnect GitHub Account](https://docs.mka1.com/api-reference/sandbox-github/disconnect-github-account.md): Delete the caller's GitHub connection and revoke its token at GitHub. The connection is deleted even if GitHub does not confirm the revocation. - [List GitHub Repositories](https://docs.mka1.com/api-reference/sandbox-github/list-github-repositories.md): List the repositories recorded for the caller's GitHub connection, or an empty list when there is no connection. The list is captured when you connect; call `POST /github/repositories/refresh` to update it. - [Refresh GitHub Repositories](https://docs.mka1.com/api-reference/sandbox-github/refresh-github-repositories.md): Re-read the repositories the caller's GitHub connection can reach, save them as the connection's repository list, and return it. - [Resolve GitHub Reference](https://docs.mka1.com/api-reference/sandbox-github/resolve-github-reference.md): Resolve a Git reference in a connected repository to a commit SHA. Omit `ref` to resolve the repository's default branch. - [Clone GitHub Repository into Session](https://docs.mka1.com/api-reference/sandbox-github/clone-github-repository-into-session.md): Clone a connected repository at `base_sha` into the session workspace using the caller's GitHub connection. The sandbox host runs the clone, so the token never enters the session. - [List Session Repositories](https://docs.mka1.com/api-reference/sandbox-github/list-session-repositories.md): Return the repositories added to the session with each one's ref, checkout path, clone status, last push, and pull request, plus the per-session repository limit. - [Add Session Repository](https://docs.mka1.com/api-reference/sandbox-github/add-session-repository.md): Add a connected repository to the session and clone it at `ref`, or at the default branch when `ref` is omitted. Repeating the same request is safe. After a successful clone the repository's ref cannot change. - [Dismiss Failed Session Repository](https://docs.mka1.com/api-reference/sandbox-github/dismiss-failed-session-repository.md): Remove a repository whose clone failed from the session. A repository that cloned successfully, or whose clone is still in progress, cannot be removed. - [Push Session to GitHub](https://docs.mka1.com/api-reference/sandbox-github/push-session-to-github.md): Push the session's checkout to `branch` in the repository it was cloned from, using the caller's GitHub connection. The repository always comes from the session, never from the request. Set `checkout_path` when the repository is not at the workspace root. - [Create or Update Pull Request](https://docs.mka1.com/api-reference/sandbox-github/create-or-update-pull-request.md): Open a pull request from `branch` in the session's repository, or update the one already recorded for that branch, reopening it if it was closed. The base defaults to the repository's default branch. A merged pull request is never reopened; a later call for the same branch opens a new one. The sessi… ### Sandbox Environments - [List Environments](https://docs.mka1.com/api-reference/sandbox-environments/list-environments.md): List the caller's saved environments, plus the per-environment repository limit. - [Create Environment](https://docs.mka1.com/api-reference/sandbox-environments/create-environment.md): Save a named environment: repositories to clone, environment variables, network access, and an optional bash setup script. Sessions created from it copy these settings. Do not put secrets in `environment_variables`. - [Get Environment](https://docs.mka1.com/api-reference/sandbox-environments/get-environment.md): Return one of the caller's saved environments. - [Update Environment](https://docs.mka1.com/api-reference/sandbox-environments/update-environment.md): Replace a saved environment's settings. Omit `network_access` to keep the stored value. Sessions already created from the environment keep the settings they started with. - [Delete Environment](https://docs.mka1.com/api-reference/sandbox-environments/delete-environment.md): Delete a saved environment. Sessions already created from it are not affected. - [Run Environment Setup](https://docs.mka1.com/api-reference/sandbox-environments/run-environment-setup.md): Run the setup script of the environment the session was created from. Call it once the session's repositories have cloned. A `running` status means setup has not finished yet and calling again is safe; once setup has succeeded, later calls return `succeeded` without running it again. ## OpenAPI Specs - [speakeasy](https://apigw.mka1.com/speakeasy.json)