Add an MCP connection.
POST
/admin/mcp
const url = 'https://example.com/api/v1/admin/mcp';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","transport":"stdio","command":["example"],"url":"example","secret":"example","secret_env":"example","tool_allowlist":["example"],"is_search":true,"search_tool":"example","hosts":["example"],"fetch_tool":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/admin/mcp \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "transport": "stdio", "command": [ "example" ], "url": "example", "secret": "example", "secret_env": "example", "tool_allowlist": [ "example" ], "is_search": true, "search_tool": "example", "hosts": [ "example" ], "fetch_tool": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
transport
required
string
command
For stdio, one argument per item.
Array<string>
url
For http.
string
secret
Write-only. An http server gets it as a bearer token; a stdio server as the variable in secret_env.
string
secret_env
string
tool_allowlist
required
Array<string>
is_search
required
boolean
search_tool
The allowlisted tool that searches, when is_search is true.
string
hosts
The hosts this connection can read, such as company.atlassian.net. An external link on one of them is read with this connection (DEC-021).
Array<string>
fetch_tool
The allowlisted read-only tool that reads one page or issue, needed when hosts is not empty.
string
Responses
Section titled “ Responses ”The connection.
Media typeapplication/json
object
id
required
string format: uuid
name
required
string
transport
required
string
command
Array<string>
url
string
secret_env
string
has_secret
required
boolean
secret_last4
required
string
tool_allowlist
required
Array<string>
is_search
required
boolean
search_tool
required
string
hosts
required
Array<string>
fetch_tool
required
string
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "transport": "example", "command": [ "example" ], "url": "example", "secret_env": "example", "has_secret": true, "secret_last4": "example", "tool_allowlist": [ "example" ], "is_search": true, "search_tool": "example", "hosts": [ "example" ], "fetch_tool": "example"}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}