MCP Gateway
ApiUser connections

Create an HTTP Basic auth connection

Create an HTTP Basic auth connection to an MCP server. The password is encrypted at rest; the username is stored in plaintext for display. Credential fields in connection_data are rejected with 422.

POST
/api/v1/connections/basic

Authorization

User API Key
AuthorizationBearer <token>

User API key (mgw_usr_live_* or mgw_usr_test_*)

In: header

access_token?|

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/connections/basic" \  -H "Content-Type: application/json" \  -d '{    "server_id": "820efca4-4a15-4ab7-82fc-9e76f6d61325",    "username": "string",    "password": "string"  }'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "server_id": "820efca4-4a15-4ab7-82fc-9e76f6d61325",
  "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
  "username": "string",
  "auth_method": "basic",
  "connection_data": {},
  "is_valid": true,
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}