---
title: "Snapshot servers into a server group"
method: POST
path: "/projects/{projectId}/server-groups"
tags: ["Environments"]
---

# Snapshot servers into a server group

`POST /projects/{projectId}/server-groups`

Creates a server group holding exactly the given servers and responds `201` with its detail. Groups are create-only — there is no update route, because an editable group would reintroduce the drift that pinning exists to prevent. Names are unique per project, so a clash responds `409`. Servers must belong to this project and must not be plugin-managed.

## Path parameters

- `projectId` string, required

## Request body

- ServerGroupCreateRequest
  - `name` string, required — Unique among the project's live server groups.
  - `description` string
  - `serverIds` string[], required

## Response `201`

The server group was created.

- ServerGroup — An immutable snapshot of a set of saved servers. Pin one on an environment so a run uses exactly these servers instead of following its host's live server list.
  - `id` string, required
  - `name` string, required
  - `description` string, nullable
  - `serverIds` string[], required — The snapshotted server ids. Authoritative.
  - `serverNames` string[], required — Display names resolved at read time; a deleted server is labelled rather than dropped.
  - `createdAt` number, nullable — Epoch milliseconds.
  - `updatedAt` number, nullable

## Other responses

- `400` — Malformed body or parameters.
- `401` — Missing, invalid, revoked, or orphaned key (`UNAUTHORIZED`) — or the **target MCP server** needs an OAuth grant (`OAUTH_REQUIRED`), which is a property of the server, not your key.
- `403` — Key is valid but not allowed to do this.
- `404` — Unknown project, server, or resource.
- `409` — The resource is not in a state that accepts this write — a stale `expectedRevision`, a duplicate name, or an environment that cannot currently be launched. The request was well-formed; re-read the resource and retry.
- `429` — Per-key rate limit exceeded (60 requests/minute sustained, bursts up to 10). Honor `Retry-After` and back off with jitter.
- `500` — Something failed on MCPJam's side.

## Changes

- **2026-08-31** `4c393eb80034` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mcpjam/apis/mcpjam-api/changes/projects/:projectId/server-groups/post.md)

---

[API](https://skmtc.dev/mcpjam/apis/mcpjam-api.md) · [All operations](https://skmtc.dev/mcpjam/apis/mcpjam-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/mcpjam/mcpjam-api/revisions/b7c1342bf59e/schema)
