Update One MCP Configuration for One Project

PATCH /api/atlas/v2/groups/{groupId}/mcpConfigs/{mcpConfigId}

Updates the specified MCP configuration for the project. Supports partial updates: only provided fields are changed.

Role requirements
  • Project Owner

Path parameters

  • groupId string Required

    Unique 24-hexadecimal digit string that identifies your project. Use the /groups endpoint to retrieve all projects to which the authenticated user has access.

    NOTE: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

    Format should match the following pattern: ^([a-f0-9]{24})$.

  • mcpConfigId string Required

    Unique identifier of the MCP configuration to update.

    Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$.

Query parameters

  • pretty boolean

    Flag that indicates whether the response body should be in the prettyprint format.

    Default value is false.

    Prettyprint
application/vnd.atlas.2025-03-12+json

Body Required

MCP configuration fields to update.

  • ipAccessList array[object]

    List of IP access list entries that define allowed source addresses for this MCP configuration. If provided, replaces the existing IP access list.

    Not more than 200 elements.

    Hide ipAccessList attributes Show ipAccessList attributes object
    • cidrBlock string | null

      Range of network addresses in the access list for the Service Account. This parameter requires the range to be expressed in Classless Inter-Domain Routing (CIDR) notation of Internet Protocol version 4 or version 6 addresses. You can set a value for this parameter or ipAddress, but not for both in the same request.

      Format should match the following pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$.

    • ipAddress string | null

      Network address in the access list for the Service Account. This parameter requires the address to be expressed as one Internet Protocol version 4 or version 6 address. You can set a value for this parameter or cidrBlock, but not for both in the same request.

      Format should match the following pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$.

  • mcpConfigName string | null

    Updated human-readable name for this MCP configuration.

    Minimum length is 1, maximum length is 64. Format should match the following pattern: ^[\p{L}\p{N}\-_.,' ]*$.

  • roles array[string]

    List of project roles associated with this MCP configuration. If provided, replaces the existing list of roles.

    Not more than 100 elements.

Responses

  • 200 application/vnd.atlas.2025-03-12+json

    OK

    Hide headers attributes Show headers attributes
    • RateLimit-Limit

      The maximum number of requests that a user can make within a specific time window.

    • RateLimit-Remaining

      The number of requests remaining in the current rate limit window before the limit is reached.

    Hide response attributes Show response attributes object
    • clientId string

      Unique identifier for the Service Account client associated with this MCP configuration. Use this Service Account to connect to the Atlas Remote MCP.

      Format should match the following pattern: ^mdb_sa_id_[a-fA-F\d]{24}$.

    • egressClientId string

      Unique identifier for the egress Service Account client associated with this MCP configuration. This Service Account is managed by MongoDB Atlas.

      Format should match the following pattern: ^mdb_sa_id_[a-fA-F\d]{24}$.

    • ipAccessList array[object]

      List of IP access list entries that define allowed source addresses for this MCP configuration.

      Not more than 200 elements.

      Hide ipAccessList attributes Show ipAccessList attributes object
      • cidrBlock string | null

        Range of network addresses in the access list for the Service Account. This parameter requires the range to be expressed in Classless Inter-Domain Routing (CIDR) notation of Internet Protocol version 4 or version 6 addresses. You can set a value for this parameter or ipAddress, but not for both in the same request.

        Format should match the following pattern: ^((([0-9]{1,3}\.){3}[0-9]{1,3})|(:{0,2}([0-9a-f]{1,4}:){0,7}[0-9a-f]{1,4}[:]{0,2}))((%2[fF]|/)[0-9]{1,3})+$.

      • createdAt string(date-time)

        Date MongoDB Cloud added the entry was added to the Access List. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • ipAddress string | null

        Network address in the access list for the Service Account. This parameter requires the address to be expressed as one Internet Protocol version 4 or version 6 address. You can set a value for this parameter or cidrBlock, but not for both in the same request.

        Format should match the following pattern: ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)(\.(?!$)|$)){4}|([0-9a-f]{1,4}:){7}[0-9a-f]{1,4}$.

      • lastUsedAddress string | null

        Network address that issued the most recent request to the API. This parameter requires the address to be expressed as one Internet Protocol version 4 or version 6 address. The resource returns this parameter after this IP address makes at least one request.

      • lastUsedAt string(date-time) | null

        Date when MongoDB Cloud received the most recent request that originated from this Internet Protocol version 4 or version 6 address. The resource returns this parameter when at least one request originates from this IP address. MongoDB Cloud updates this parameter each time a client accesses the permitted resource, with a delay of up to 5 minutes. This parameter expresses its value in the ISO 8601 timestamp format in UTC.

      • requestCount integer(int32)

        The number of requests that has originated from this network address.

    • mcpConfigId string

      Unique identifier that identifies this MCP configuration.

      Format should match the following pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$.

    • mcpConfigName string | null

      Human-readable name that identifies this MCP configuration.

    • roles array[string]

      List of project roles associated with this MCP configuration.

      Not more than 100 elements.

  • 400 application/json

    Bad Request.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

  • 401 application/json

    Unauthorized.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

  • 403 application/json

    Forbidden.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

  • 404 application/json

    Not Found.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

  • 429 application/json

    Too Many Requests.

    Hide headers attributes Show headers attributes
    • RateLimit-Limit

      The maximum number of requests that a user can make within a specific time window.

    • RateLimit-Remaining

      The number of requests remaining in the current rate limit window before the limit is reached.

    • Retry-After

      The minimum time you should wait, in seconds, before retrying the API request. This header might be returned for 429 or 503 error responses.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

  • 500 application/json

    Internal Server Error.

    Hide response attributes Show response attributes object
    • badRequestDetail object | null

      Bad request detail.

      Hide badRequestDetail attribute Show badRequestDetail attribute object | null
      • fields array[object]

        Describes all violations in a client request.

        Hide fields attributes Show fields attributes object
        • description string Required

          A description of why the request element is bad.

        • field string Required

          A path that leads to a field in the request body.

    • detail string | null

      Describes the specific conditions or reasons that cause each type of error.

    • error integer(int32) Required

      HTTP status code returned with this error.

      External documentation
    • errorCode string Required

      Application error code returned with this error.

    • parameters array[object]

      Parameters used to give more information about the error.

    • reason string | null

      Application error message returned with this error.

PATCH /api/atlas/v2/groups/{groupId}/mcpConfigs/{mcpConfigId}
atlas api remoteMcpConfigurations updateGroupMcpConfig --help
import (
	"os"
	"context"
	"log"
	sdk "go.mongodb.org/atlas-sdk/v20250312001/admin"
)

func main() {
	ctx := context.Background()
	clientID := os.Getenv("MONGODB_ATLAS_CLIENT_ID")
	clientSecret := os.Getenv("MONGODB_ATLAS_CLIENT_SECRET")

	// See https://dochub.mongodb.org/core/atlas-go-sdk-oauth
	client, err := sdk.NewClient(sdk.UseOAuthAuth(clientID, clientSecret))

	if err != nil {
		log.Fatalf("Error: %v", err)
	}

	params = &sdk.UpdateGroupMcpConfigApiParams{}
	sdkResp, httpResp, err := client.RemoteMCPConfigurationsApi.
		UpdateGroupMcpConfigWithParams(ctx, params).
		Execute()
}
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/mcpConfigs/{mcpConfigId}" \
  -d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
  --digest --include \
  --header "Accept: application/vnd.atlas.2025-03-12+json" \
  --header "Content-Type: application/json" \
  -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/mcpConfigs/{mcpConfigId}" \
  -d '{ <Payload> }'
Request examples
{
  "ipAccessList": [
    {
      "cidrBlock": "203.0.113.0/24",
      "ipAddress": "203.0.113.10"
    }
  ],
  "mcpConfigName": "string",
  "roles": [
    "string"
  ]
}
Response examples (200)
# Headers

# Payload
{
  "clientId": "mdb_sa_id_1234567890abcdef12345678",
  "egressClientId": "mdb_sa_id_1234567890abcdef12345678",
  "ipAccessList": [
    {
      "cidrBlock": "203.0.113.0/24",
      "createdAt": "2026-05-04T09:42:00Z",
      "ipAddress": "203.0.113.10",
      "lastUsedAddress": "203.0.113.10",
      "lastUsedAt": "2026-05-04T09:42:00Z",
      "requestCount": 42
    }
  ],
  "mcpConfigId": "b9254bc4-d6cc-4325-abf4-fb9d2a9de00a",
  "mcpConfigName": "string",
  "roles": [
    "string"
  ]
}
Response examples (400)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
  "error": 400,
  "errorCode": "VALIDATION_ERROR",
  "reason": "Bad Request"
}
Response examples (401)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 401,
  "errorCode": "NOT_ORG_GROUP_CREATOR",
  "reason": "Unauthorized"
}
Response examples (403)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 403,
  "errorCode": "CANNOT_CHANGE_GROUP_NAME",
  "reason": "Forbidden"
}
Response examples (404)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
  "error": 404,
  "errorCode": "RESOURCE_NOT_FOUND",
  "reason": "Not Found"
}
Response examples (429)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 429,
  "errorCode": "RATE_LIMITED",
  "reason": "Too Many Requests"
}
Response examples (500)
{
  "detail": "(This is just an example, the exception may not be related to this endpoint)",
  "error": 500,
  "errorCode": "UNEXPECTED_ERROR",
  "reason": "Internal Server Error"
}