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
| Endpoint | Permission |
|---|---|
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
| Key | Type | Notes |
|---|---|---|
| connector_id | int | MCP Connector ID |
Request example
- Headers
Request Method: POST
Content-Type: application/json
Authorization: JWT access_tokenBody
The request body is a JSON array of Object Class IDs.
[<object_class_id>, <object_class_id>, ...]Behaviour
- Up to
100Object Class IDs can be sent in a single request. The limit can be obtained viaOPTIONS /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/
[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.
| Key | Type | Notes |
|---|---|---|
| id | int | Object Class ID |
| name | string | Object Class name |
- Successful status
201 Created - Response body:
[
{
"id": 7,
"name": "Contract"
},
{
"id": 12,
"name": "Invoice"
}
]Errors
| Error | Response code | Message |
|---|---|---|
| List of IDs is empty | 400 Bad Request | "detail": ["This list may not be empty."] |
| List of IDs is not provided | 400 Bad Request | "detail": ["This field is required."] |
| Request body is not a list | 400 Bad Request | "detail": ["Expected a list of items but got type "{type}"."] |
| List contains values other than integers | 400 Bad Request | "detail": ["Incorrect type. Expected pk value, received {type}."] |
| Object Class with the given ID does not exist | 400 Bad Request | "detail": ["Invalid pk "{object_class_id}" - object does not exist."] |
| More than 100 items sent in the request body | 400 Bad Request | "detail": ["Up to 100 items allowed."] |
| Not authenticated | 401 Unauthorized | "detail": "Authentication credentials were not provided." |
| Caller is not a Super Admin | 403 Forbidden | "detail": "You do not have permission to perform this action." |
connector_id does not exist | 404 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
| Key | Type | Notes |
|---|---|---|
| connector_id | int | MCP Connector ID |
Request example
- Headers
Request Method: OPTIONS
Content-Type: application/json
Authorization: JWT access_tokenResponse
- Successful status
200 OK - Response body:
{
"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
| Key | Type | Notes |
|---|---|---|
| connector_id | int | MCP Connector ID |
Request example
- Headers
Request Method: GET
Content-Type: application/json
Authorization: JWT access_tokenResponse
| Key | Type | Notes |
|---|---|---|
| limit | int | |
| offset | int | |
| total_count | int | Total number of Object Classes associated with the connector. |
| filtered_count | int | Number of associated Object Classes with filters applied. |
| next | URL / null | Next page URL (null if there is no next page) |
| previous | URL / null | Previous page URL (null if there is no previous page) |
| results | Array | Described in the next table. |
Response results array
| Key | Type | Notes |
|---|---|---|
| id | int | Object Class ID |
| name | string | Object Class name |
Results are sorted by id ascending by default.
Response example
- Status
200 OK - Body
{
"limit": 100,
"offset": 0,
"filtered_count": 2,
"total_count": 2,
"next": null,
"previous": null,
"results": [
{
"id": 7,
"name": "Contract"
},
{
"id": 12,
"name": "Invoice"
}
]
}Sorting
| Parameter | Example | Notes |
|---|---|---|
| id | {build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=id | Ascending |
| id | {build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=-id | Descending (-) |
| name | {build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=name | Ascending |
| name | {build}/api/mcp/connectors/{connector_id}/object-classes/?ordering=-name | Descending (-) |
Filtering
| Parameter | Predicates | Example |
|---|---|---|
| id | standard numeric | {build}/api/mcp/connectors/{connector_id}/object-classes/?id__gt=10 |
| name | standard 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
| Error | Response code | Message |
|---|---|---|
| Not authenticated | 401 Unauthorized | "detail": "Authentication credentials were not provided." |
| Caller is not a Super Admin | 403 Forbidden | "detail": "You do not have permission to perform this action." |
connector_id does not exist | 404 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
| Key | Type | Notes |
|---|---|---|
| connector_id | int | MCP Connector ID |
Request example
- Headers
Request Method: DELETE
Content-Type: application/json
Authorization: JWT access_tokenBody
The request body is a JSON array of Object Class IDs.
[<object_class_id>, <object_class_id>, ...]Behaviour
- Up to
100Object 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/
[12, 34, 56]Response
- Successful status
204 No Content - The response has no body.
Errors
| Error | Response code | Message |
|---|---|---|
| List of IDs is empty | 400 Bad Request | "detail": ["This list may not be empty."] |
| List of IDs is not provided | 400 Bad Request | "detail": ["This field is required."] |
| Request body is not a list | 400 Bad Request | "detail": ["Expected a list of items but got type "{type}"."] |
| List contains values other than integers | 400 Bad Request | "detail": ["Incorrect type. Expected pk value, received {type}."] |
| Object Class with the given ID does not exist | 400 Bad Request | "detail": ["Invalid pk "{object_class_id}" - object does not exist."] |
| More than 100 items sent in the request body | 400 Bad Request | "detail": ["Up to 100 items allowed."] |
| Not authenticated | 401 Unauthorized | "detail": "Authentication credentials were not provided." |
| Caller is not a Super Admin | 403 Forbidden | "detail": "You do not have permission to perform this action." |
connector_id does not exist | 404 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.
| Error | Response code | Message |
|---|---|---|
| Method not allowed | 405 Method Not Allowed | "detail": "Method "DELETE" not allowed." |