Bind a secret to an MCP server
SDK platic.tools.mcp.bindSecret()
Bind an existing secret to a server slot. Use this when a slot in secrets[] is missing or needs_authorization. Send only the secret's id, not its value.
Example
curl -X POST https://api.platic.ai/v1/tools/mcp/$MCP_ID/secrets \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "slot": "auth.token", "secretId": "'"$SECRET_ID"'" }' await platic.tools.mcp.bindSecret("mcp_123", { slot: "auth.token", secretId: "secret_123" }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
mcpId | string | Id of the MCP server | ✓ |
Request body
| Field | Type | Description | Required |
|---|---|---|---|
slot | string | The slot, as it appears in secrets[].slot: auth.token, header:<name> (for example header:x-api-key), or auth.clientSecret | ✓ |
secretId | string | Id of the secret, from list secrets or create a secret | ✓ |
{
"slot": "auth.token",
"secretId": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
} Response
data has the full server, with the fields in get an MCP server. The slot ends up authorized.
{
"status": "success",
"message": "Secret bound successfully",
"data": {
"id": "QZPHpckDPC58JIVLQA3Z",
"name": "Linear",
"description": "Support team issues",
"url": "https://mcp.linear.app/mcp",
"transport": "streamable-http",
"slug": "a1b2c3",
"authType": "bearer",
"auth": { "type": "bearer" },
"status": "pending_config",
"lastError": null,
"serverInfo": null,
"customHeaderNames": [],
"discoveredToolsCount": 0,
"installedToolsCount": 0,
"lastSyncAt": null,
"createdAt": "2026-10-28T12:02:11.410Z",
"updatedAt": "2026-10-28T12:04:30.000Z",
"version": 1,
"verified": false,
"secrets": [
{
"slot": "auth.token",
"state": "authorized",
"secretId": "5d0c7a1e9b3f4a6c8e2d1f0b7a9c3e5d6f8a0b2c4d6e8f1a3b5c7d9e0f2a4b6c"
}
],
"discoveredTools": [],
"installedTools": [],
"nextStep": "Test the connection with POST /v1/tools/mcp/QZPHpckDPC58JIVLQA3Z/test: that is when the server lists the tools it offers."
}
} Errors
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | slot or secretId is missing. details.issues has the list of problems |
400 | SECRET_SLOT_INVALID | That slot does not exist in the server's current connection |
400 | SECRET_DESTINATION_INVALID | The server URL is not https or is not valid |
403 | FORBIDDEN | The person behind the token cannot use secrets or does not have access to Integrations |
404 | SECRET_NOT_FOUND | The secret does not exist in this workspace |
404 | NOT_FOUND | The server does not exist in this workspace |
409 | SECRET_USE_REVOKED | The secret is revoked or expired |
409 | SECRET_CHANGED | The secret changed while it was being bound. Repeat the call |
409 | RESOURCE_CHANGED | The server changed while it was being bound. Repeat the call |
409 | SECRET_BINDING_LIMIT | The server already has the maximum number of bound secrets |
Notes
- After binding, use test an MCP server.
- The secret is authorized for that slot and for the server's current destination. If you later update the connection, the slot goes to
needs_authorizationand you have to repeat this call. - Binding another secret to a slot that already had one replaces it, and the previous test stops counting.
- An OAuth server is not authorized with a bound token: use start OAuth.
- To bind at the same time as you save, send
"secrets": { "<slot>": "<secretId>" }in connect an MCP server or in update an MCP server.