import requests
url = "https://platform.ankra.app/api/v1/org/mcp-servers"
payload = {
"name": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/mcp-servers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/mcp-servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"transport": "stdio",
"url": "<string>",
"env_keys": [
"<string>"
],
"allowed_tools": [
"<string>"
],
"enabled": true,
"permission_tier": "read_only",
"adapter_key": "<string>",
"cluster_allow_list": [
"<string>"
],
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_connected_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Register an MCP server
import requests
url = "https://platform.ankra.app/api/v1/org/mcp-servers"
payload = {
"name": "<string>",
"url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', url: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/mcp-servers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/mcp-servers \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"url": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"transport": "stdio",
"url": "<string>",
"env_keys": [
"<string>"
],
"allowed_tools": [
"<string>"
],
"enabled": true,
"permission_tier": "read_only",
"adapter_key": "<string>",
"cluster_allow_list": [
"<string>"
],
"created_by_user_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_connected_at": "2023-11-07T05:31:56Z",
"last_error": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": "Cluster not found"
}{
"detail": "permission_denied",
"permission": "<string>",
"scope_type": "<string>"
}{
"detail": "Cluster not found"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Unique in the organisation, at most 120 characters, with no '/' or whitespace.
1 - 120stdio, http, sse A public http(s) URL for http and sse servers.
12048Env entries for the server. A key that looks like a credential (token, secret, password, api_key, ...) must hold a ${VAULT:} or ${SECRET_SLOT:<slot_id>} marker.
The tools agents may call. Leave it out to allow every tool.
read_only, read_write A curated adapter key from the catalog.
Cluster ids to limit the server to. Leave it out for every cluster.
Response
The registered server
stdio, http, sse The env key names, sorted. Values are never returned.
The tools agents may call, or null for every tool the server offers.
read_only, read_write The curated adapter the server was registered from, or null.
The cluster ids the server is limited to, or null for every cluster.
When Ankra last connected to the server.
The error from the last failed connection, or null.