Get or create an unnamed environment for a composed stack
Changed onGET-OR-CREATE an UNNAMED, content-addressed environment for a composed stack — a host plus an optional server group, model override, computer image and pinned skills.
Distinct from POST /environments, which mints a NAMED row that lands in the project's environment list forever. A composed stack is a throwaway: the caller wants to run this exact combination, not to add a permanent entry someone else has to reason about.
Deduplicated by a server-side fingerprint of the stack, so the same stack always returns the same environment. created says which happened — the status is 200 either way, because get-or-create cannot honestly answer 201 on the dedupe path.
A deployment that predates ad-hoc environments answers 400 with details.reason: "ADHOC_UNAVAILABLE".
Requires project membership (admin only when the stack pins plugin versions). Promote one to a named environment with POST /environments/{environmentId}/name.
Request
- Base URLhttps://app.mcpjam.com/api/v1
- URLhttps://app.mcpjam.com/api/v1/projects/{projectId}/environments/ensure-adhoc
- AuthHTTP bearer
Path parameters
ID of the hosted project that contains the server.
Request body
Response
The environment for this stack, created or reused.
Changes
- breaking
added to the
request propertyallOflist - warning
removed from the
request propertyallOflist - info
added the optional property
/to the response with the status - info
the response optional property
/became read-only for the status - info
added to the
/response propertyallOflist for the response status - info
removed from the
/response propertyallOflist for the response status
- breaking
- info
added the new optional request property
- info
added the optional property
/to the response with the status
- info