Skip to main content
POST
Get or create an unnamed environment for a composed stack

Authorizations

Authorization
string
header
required

MCPJam API key (sk_…). Create one at Settings → API keys. Guest sessions cannot use the API, and API keys cannot manage other API keys.

Path Parameters

projectId
string
required

ID of the hosted project that contains the server.

Body

application/json

A composed stack: the same execution axes a named environment carries, minus the name.

hostId
string
required

The host the stack runs as.

serverAttachmentId
string

Standalone server group to pin. Omit to use the host's own servers.

modelId
string

Model to run instead of the host's pinned one. Stored verbatim.

skillSelection
object

An explicit pinned skill selection. Cannot be empty — clear the field instead (send null on update) to mean "no pinned skills".

pluginVersionIds
string[]

Pinning plugin versions requires project ADMIN; the rest of a stack needs only membership.

Minimum array length: 1
sandboxImageId
string

Project-shared sandbox image to pin, so runs boot a fresh computer from it.

Response

The environment for this stack, created or reused.

environment
object
required

An UNNAMED, content-addressed environment: a composed client/model/computer/skills stack rather than a saved entry in the project's environment list. Its own shape rather than ProjectEnvironment with a nullable name, because that schema's name is required and every environment listing filters ad-hoc rows out precisely so that promise holds.

created
boolean
required

false when the same stack had already been composed. The only way to tell a first compose from a repeat — the status line cannot, because get-or-create answers 200 either way.