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

await platic.tools.mcp.bindSecret("mcp_123", { slot: "auth.token", secretId: "secret_123" });

Path parameters

ParameterTypeDescriptionRequired
mcpIdstringId of the MCP server✓

Request body

FieldTypeDescriptionRequired
slotstringThe slot, as it appears in secrets[].slot: auth.token, header:<name> (for example header:x-api-key), or auth.clientSecret✓
secretIdstringId 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

Statusdetails.codeWhen it happens
400INVALID_REQUESTslot or secretId is missing. details.issues has the list of problems
400SECRET_SLOT_INVALIDThat slot does not exist in the server's current connection
400SECRET_DESTINATION_INVALIDThe server URL is not https or is not valid
403FORBIDDENThe person behind the token cannot use secrets or does not have access to Integrations
404SECRET_NOT_FOUNDThe secret does not exist in this workspace
404NOT_FOUNDThe server does not exist in this workspace
409SECRET_USE_REVOKEDThe secret is revoked or expired
409SECRET_CHANGEDThe secret changed while it was being bound. Repeat the call
409RESOURCE_CHANGEDThe server changed while it was being bound. Repeat the call
409SECRET_BINDING_LIMITThe 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_authorization and 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.