Skip to content

MCP Connector Object Classes

This document describes the API for managing associations between an MCP Connector and Object Classes.

An MCP Connector is a registered external client of the MCP server. Object Classes can be associated with a connector so that they are available for permission configuration for the connector.

ℹ️ In the scope of this story, associating or disassociating Object Classes with a connector does not affect user access through MCP. That behaviour is a separate, future story.

All endpoints are nested under a connector (nested routers) and use the standard limit/offset pagination, sorting and filtering mechanisms.

Permissions

EndpointPermission
POST /api/mcp/connectors/{connector_id}/object-classes/Super Admin only
OPTIONS /api/mcp/connectors/{connector_id}/object-classes/Any authenticated user
GET /api/mcp/connectors/{connector_id}/object-classes/Super Admin only
DELETE /api/mcp/connectors/{connector_id}/object-classes/Super Admin only

These permissions are not manageable via Roles.

POST /api/mcp/connectors/connector_id/object-classes/

Associates one or more Object Classes with the MCP Connector. Batch operation - accepts a list of Object Class IDs.

Permissions

Requires authentication and the User must be a Super Admin.

URL parameters

KeyTypeNotes
connector_idintMCP Connector ID

Request example

  • Headers
Request Method: POST
Content-Type: application/json
Authorization: JWT access_token

Body

The request body is a JSON array of Object Class IDs.

json
[<object_class_id>, <object_class_id>, ...]

Behaviour

  • Up to 100 Object Class IDs can be sent in a single request. The limit can be obtained via OPTIONS /api/mcp/connectors/{connector_id}/object-classes/.
  • Object Classes already associated with the connector are silently accepted without an error or a warning.
  • Duplicate IDs in the payload are de-duplicated - each Object Class appears at most once in the response.
  • The operation is idempotent.

Validations

  • Body must be a non-empty JSON list.
  • Each item must be an integer.
  • Each item must be the ID of an existing Object Class.
  • Maximum number of items: 100.

Sample request body

POST /api/mcp/connectors/connector_id/object-classes/

json
[12, 7, 30]

Response

The response is a flat (non-paginated) array containing both the newly associated and the already associated Object Classes from the request payload. Object Classes previously associated with the connector but not present in the payload are not returned.

The array is sorted by id ascending.

KeyTypeNotes
idintObject Class ID
namestringObject Class name
  • Successful status 201 Created
  • Response body:
json
[
    {
        "id": 7,
        "name": "Contract"
    },
    {
        "id": 12,
        "name": "Invoice"
    }
]

Errors

ErrorResponse codeMessage
List of IDs is empty400 Bad Request"detail": ["This list may not be empty."]
List of IDs is not provided400 Bad Request"detail": ["This field is required."]
Request body is not a list400 Bad Request"detail": ["Expected a list of items but got type "{type}"."]
List contains values other than integers400 Bad Request"detail": ["Incorrect type. Expected pk value, received {type}."]
Object Class with the given ID does not exist400 Bad Request"detail": ["Invalid pk "{object_class_id}" - object does not exist."]
More than 100 items sent in the request body400 Bad Request"detail": ["Up to 100 items allowed."]
Not authenticated401 Unauthorized"detail": "Authentication credentials were not provided."
Caller is not a Super Admin403 Forbidden"detail": "You do not have permission to perform this action."
connector_id does not exist404 Not Found

OPTIONS /api/mcp/connectors/connector_id/object-classes/

Returns machine-readable metadata for the batch association endpoint.

Permissions

Requires authentication only.

URL parameters

KeyTypeNotes
connector_idintMCP Connector ID

Request example

  • Headers
Request Method: OPTIONS
Content-Type: application/json
Authorization: JWT access_token

Response

  • Successful status 200 OK
  • Response body:
json
{
    "batch": {
        "type": "set",
        "required": true,
        "autocomplete": "/api/object-classes/autocomplete/?text__icontains="
    },
    "restrictions": {
        "limit_items_in_batch": 100
    }
}

GET /api/mcp/connectors/connector_id/object-classes/

Returns the list of Object Classes associated with the MCP Connector.

Permissions

Requires authentication and the User must be a Super Admin.

URL parameters

KeyTypeNotes
connector_idintMCP Connector ID

Request example

  • Headers
Request Method: GET
Content-Type: application/json
Authorization: JWT access_token

Response

KeyTypeNotes
limitint
offsetint
total_countintTotal number of Object Classes associated with the connector.
filtered_countintNumber of associated Object Classes with filters applied.
nextURL / nullNext page URL (null if there is no next page)
previousURL / nullPrevious page URL (null if there is no previous page)
resultsArrayDescribed in the next table.

Response results array

KeyTypeNotes
idintObject Class ID
namestringObject Class name

Results are sorted by id ascending by default.

Response example

  • Status 200 OK
  • Body
json
{
    "limit": 100,
    "offset": 0,
    "filtered_count": 2,
    "total_count": 2,
    "next": null,
    "previous": null,
    "results": [
        {
            "id": 7,
            "name": "Contract"
        },
        {
            "id": 12,
            "name": "Invoice"
        }
    ]
}

Sorting

ParameterExampleNotes
id{build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=idAscending
id{build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=-idDescending (-)
name{build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=nameAscending
name{build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=-nameDescending (-)

Filtering

ParameterPredicatesExample
idstandard numeric{build}/api/mcp/connectors/{connector_id}/object-classes/?id__gt=10
namestandard string{build}/api/mcp/connectors/{connector_id}/object-classes/?name__icontains=foo

Standard numeric predicates for id: =, gt, gte, lt, lte, range (e.g. id, id__gt, id__lt, id__range). Standard string predicates for name: =, iexact, contains, icontains, startswith, istartswith, endswith, iendswith (e.g. name, name__icontains, name__istartswith).

Errors

ErrorResponse codeMessage
Not authenticated401 Unauthorized"detail": "Authentication credentials were not provided."
Caller is not a Super Admin403 Forbidden"detail": "You do not have permission to perform this action."
connector_id does not exist404 Not Found

DELETE /api/mcp/connectors/connector_id/object-classes/

Disassociates one or more Object Classes from the MCP Connector. Batch operation - accepts a list of Object Class IDs.

Permissions

Requires authentication and the User must be a Super Admin.

URL parameters

KeyTypeNotes
connector_idintMCP Connector ID

Request example

  • Headers
Request Method: DELETE
Content-Type: application/json
Authorization: JWT access_token

Body

The request body is a JSON array of Object Class IDs.

json
[<object_class_id>, <object_class_id>, ...]

Behaviour

  • Up to 100 Object Class IDs can be sent in a single request.
  • Object Classes not currently associated with the connector are silently accepted without an error or a warning.
  • The operation is idempotent.

Validations

  • Body must be a non-empty JSON list.
  • Each item must be an integer.
  • Each item must be the ID of an existing Object Class.
  • Maximum number of items: 100.

Sample request body

DELETE /api/mcp/connectors/connector_id/object-classes/

json
[12, 34, 56]

Response

  • Successful status 204 No Content
  • The response has no body.

Errors

ErrorResponse codeMessage
List of IDs is empty400 Bad Request"detail": ["This list may not be empty."]
List of IDs is not provided400 Bad Request"detail": ["This field is required."]
Request body is not a list400 Bad Request"detail": ["Expected a list of items but got type "{type}"."]
List contains values other than integers400 Bad Request"detail": ["Incorrect type. Expected pk value, received {type}."]
Object Class with the given ID does not exist400 Bad Request"detail": ["Invalid pk "{object_class_id}" - object does not exist."]
More than 100 items sent in the request body400 Bad Request"detail": ["Up to 100 items allowed."]
Not authenticated401 Unauthorized"detail": "Authentication credentials were not provided."
Caller is not a Super Admin403 Forbidden"detail": "You do not have permission to perform this action."
connector_id does not exist404 Not Found

DELETE /api/mcp/connectors/connector_id/object-classes/object_class_id/

This method is not supported. Disassociation is performed exclusively via the batch DELETE /api/mcp/connectors/{connector_id}/object-classes/ endpoint described above.

Calling DELETE on a single Object Class detail route returns 405 Method Not Allowed.

ErrorResponse codeMessage
Method not allowed405 Method Not Allowed"detail": "Method "DELETE" not allowed."