Skip to main content
POST
/
servers
/
{id}
/
tokens
Create MCP Server Token
curl --request POST \
  --url https://api.example.com/servers/{id}/tokens \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "token": {
    "expiresAt": "2023-11-07T05:31:56Z",
    "name": "<string>"
  }
}
'
{
  "token": {
    "id": "kSuB9Gf6aD4",
    "serverID": "kSuB9Gf6aD4",
    "createdAt": "2023-11-07T05:31:56Z",
    "expiresAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "value": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Enter 'Bearer' followed by a space and your token (e.g., 'Bearer ${HASMCP_ACCESS_TOKEN}').

Path Parameters

id
string
required

MCP Server ID

Body

application/json
token
object

Response

201 - application/json

MCP Server Token created

token
object