MCP Gateway
ApiMcp servers

Create a server credential

Create a new credential for an MCP server. The credential value is encrypted at rest using AES-256-GCM. The API response contains only a masked version of the value.

POST
/api/v1/servers/{server_id}/credentials

Path Parameters

server_id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://loading/api/v1/servers/497f6eca-6276-4993-bfeb-53cbbbba6f08/credentials" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "credential_type": "api_key",    "value": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "credential_type": "api_key",
  "masked_value": "string",
  "header_name": "string",
  "prefix": "string",
  "is_required": false,
  "description": "string",
  "created_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}