MCP
MCP servers attached to an agent, their live state, and the daemon-wide registrations.
On this page
The agent's MCP servers: configured and live state
/agents/{id}/mcpPath parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Loaded agent: its id, handle or name. |
Responses
| Status | Description | Body | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Servers | AgentMcpDiagnostics | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
statesrequiredarray<McpServerState> | 7 fields of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
namerequired | string | ||||||||||
statusrequired | string | ||||||||||
error | string | ||||||||||
connectedAt | integer | ||||||||||
restartCountrequired | integer | ||||||||||
toolCountrequired | integer | ||||||||||
logsrequired | array<object> | ||||||||||
3 fields of | |||||||||||
timestamprequired | integer | |
streamrequired | string | |
messagerequired | string |
Errors 401 · 403 · 404
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/agents/agent-1/mcp" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"The agent's MCP servers (same as GET …/mcp)
/agents/{id}/runtime/mcpPath parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Loaded agent: its id, handle or name. |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Servers | AgentMcpDiagnostics |
Fields as in AgentMcpDiagnostics above. | ||
Errors 401 · 403 · 404
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/agents/agent-1/runtime/mcp" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Attach or update an MCP server config
/agents/{id}/mcp/serversSaved to the agent config; the server connects at the next start, or now with POST …/mcp/servers/{serverName}/restart.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Loaded agent: its id, handle or name. |
Request bodyapplication/json · McpAttachBody · required
server (alias serverConfig) with name and transport.
| Field | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
serverrequired | object | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 fields of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
namerequired | string | ||||||||||
transportrequired | string | ||||||||||
command | string | ||||||||||
args | array<string> | ||||||||||
url | string | ||||||||||
oauth | boolean | ||||||||||
headers | map<string, string> | ||||||||||
header_env | array<object> | ||||||||||
bearer_token_env_var | string | ||||||||||
env | map<string, string> | ||||||||||
env_keys | array<string> | ||||||||||
env_schema | array<object> | ||||||||||
npm_package | string | ||||||||||
pypi_package | string | ||||||||||
source | string | ||||||||||
available_tools | array<object> | ||||||||||
tool_call_timeout_ms | integer | ||||||||||
restricted | boolean | ||||||||||
run_location | string | ||||||||||
credential_files | array<object> | ||||||||||
3 fields of | |||||||||||
pathrequired | string | |
required | boolean | |
write_back | boolean |
serverConfigResponses
| Status | Description | Body | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Attached | McpAttachResponse | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
paramsarray<object> | 2 fields of | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyrequired | string | |
valuerequired | string |
provider_paramsinstructionsrequiredcontextrequiredcompact_threshold, max_request_media_files, max_request_media_mb, compaction_model, audit, dynamic_instructions
toolsrequiredTool declarations
5 fields of tools
namerequired | string | |
enabledrequired | boolean | |
visible | boolean | |
restricted | boolean | |
locked | boolean |
triggersrequiredon_startup, on_inbox, on_outbox, on_file_change, on_chat, on_timer, on_tool_call, on_task_create, on_task_complete, on_logs, on_llm_call
3 fields of triggers
enabledrequired | boolean | ||||||||||||||||||||||||||||||||||
targetsrequired | array<TriggerTarget> | ||||||||||||||||||||||||||||||||||
11 fields of | |||||||||||||||||||||||||||||||||||
scoperequired | string | |
lambda | string | System scope: |
command | string | System scope: shell command (alternative to lambda) |
warm | boolean | |
filter | object | |
debounce_ms | integer | |
interval_ms | integer | |
batch_ms | integer | |
batch_count | integer | |
locked | boolean | |
loop | string | Cognition loop this target wakes; absent = main |
lockedsecurityrequiredlimitsrequiredmessagingrequiredmode (proactive | respond_only | listen_only), receive, network, …
mcp2 fields of mcp
serversrequired | array<McpServerConfig> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
20 fields of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
namerequired | string | ||||||||||
transportrequired | string | ||||||||||
command | string | ||||||||||
args | array<string> | ||||||||||
url | string | ||||||||||
oauth | boolean | ||||||||||
headers | map<string, string> | ||||||||||
header_env | array<object> | ||||||||||
bearer_token_env_var | string | ||||||||||
env | map<string, string> | ||||||||||
env_keys | array<string> | ||||||||||
env_schema | array<object> | ||||||||||
npm_package | string | ||||||||||
pypi_package | string | ||||||||||
source | string | ||||||||||
available_tools | array<object> | ||||||||||
tool_call_timeout_ms | integer | ||||||||||
restricted | boolean | ||||||||||
run_location | string | ||||||||||
credential_files | array<object> | ||||||||||
3 fields of | |||||||||||
pathrequired | string | |
required | boolean | |
write_back | boolean |
new_tools_restrictedadaptersChannel adapters by type
4 fields of adapters
enabledrequired | boolean | ||||
config | object | Adapter-specific settings (no secrets: tokens are credentials) | |||
policy | object | ||||
limits | object | ||||
1 field of | |||||
max_attachment_size | integer | Bytes |
providers8 fields of providers
idrequired | string |
| ||||||
typerequired | string | |||||||
namerequired | string | |||||||
baseUrlrequired | string | |||||||
preset | string | |||||||
defaultModel | string | |||||||
params | array<object> | |||||||
2 fields of | ||||||||
keyrequired | string | |
valuerequired | string |
requestDelayMsloopsInner (side) loops; main is implicit
8 fields of loops
namerequired | string | |
goalrequired | string | Becomes the loop's instructions |
enabledrequired | boolean | |
autostart | boolean | |
autonomous | boolean | |
model | object | |
compact_threshold | integer | null | |
tools | array<string> | Absolute allow-list, intersected with the host's enabled tools |
ws_connectionsservinglocked_fieldsmetadatarequiredcreated_at, updated_at, author, tags, version
Errors 400 · 401 · 403 · 404 · 500
| 400 | Invalid request: missing or malformed field, query parameter or body. A body Fastify cannot parse gets Fastify's own shape (statusCode, code, error, message).bad_requestFST_ERR_CTP_EMPTY_JSON_BODY | |
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) | |
| 500 | Unexpected runtime failure |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/agents/agent-1/mcp/servers" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"server": {
"name": "filesystem",
"transport": "stdio",
"npm_package": "@modelcontextprotocol/server-filesystem"
}
}'Detach an MCP server and delete its credentials
/agents/{id}/mcp/servers/{serverName}Removes the server config and the matching mcp:* identity rows.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Loaded agent: its id, handle or name. |
serverNamerequired | string | MCP server name in the agent config |
Query parameters
| Name | Type | Description |
|---|---|---|
credentialNamespace | string | Credential namespace to delete (default: the server's package or name) |
Responses
| Status | Description | Body | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Detached | McpDetachResponse | |||||||||||||||
| |||||||||||||||||
Errors 401 · 403 · 404 · 500
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) | |
| 500 | Unexpected runtime failure |
Error bodies use the error format.
Example
curl -X DELETE "http://127.0.0.1:7385/agents/agent-1/mcp/servers/filesystem" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Connect one configured MCP server now
/agents/{id}/mcp/servers/{serverName}/restartThe same connect the agent's own mcp_restart tool does (host or container routing, the agent's sealed credentials, tool discovery). Use it after POST …/mcp/servers (attached servers connect at the next start otherwise) or to retry a failed server. 404 for an unknown server; 409 when the agent is not running here. No body.
Path parameters
| Name | Type | Description |
|---|---|---|
idrequired | string | Loaded agent: its id, handle or name. |
serverNamerequired | string | MCP server name in the agent config |
Responses
| Status | Description | Body | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Connect outcome | McpRestartResponse | ||||||||||||||||||||||||
| ||||||||||||||||||||||||||
Errors 401 · 403 · 404 · 409 · 500
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) | |
| 409 | The resource is in a state that does not allow this now | |
| 500 | Unexpected runtime failure |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/agents/agent-1/mcp/servers/filesystem/restart" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Daemon-wide MCP registrations (values redacted)
/runtime/mcpResponses
| Status | Description | Body | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | Registrations | McpRegistrationsDiagnostics | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
headersrequiredarray<object> | 2 fields of | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
keyrequired | string | |
hasValuerequired | boolean |
headerEnvrequired2 fields of headerEnv
headerrequired | string | |
envrequired | string |
bearerTokenEnvVarrequiredtoolCallTimeoutrequiredErrors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/runtime/mcp" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Probe an MCP server
/admin/mcp/probeTemporary connect and tool list; logs are kept for GET /admin/mcp/logs/{serverName}.
Request bodyapplication/json · McpProbeBody · required
| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
namerequired | string | |||||||
transport | string | |||||||
command | string | |||||||
args | array<string> | |||||||
url | string | |||||||
env | map<string, string> | |||||||
headers | map<string, string> | |||||||
headerEnv | array<object> | |||||||
2 fields of | ||||||||
key | string | |
value | string |
bearerTokenEnvVarResponses
| Status | Description | Body | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | OK | McpProbeResult | |||||||||
| |||||||||||
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/admin/mcp/probe" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"string"}'Connect test for an MCP registration
/admin/mcp/registration-testRuns the real pipeline for the draft. Interactive steps (an OAuth authorization URL, the auth preflight’s Continue) appear in GET /admin/mcp/interactions while the test runs. Runs as a job: answers 202 at once. Interactive steps of this run are listed by GET /admin/mcp/interactions?jobId=; POST /jobs/{jobId}/cancel stops it and disconnects the server it started.
Request bodyapplication/json · McpRegistrationTestBody · required
| Field | Type | Description | ||||||
|---|---|---|---|---|---|---|---|---|
registrationrequired | object | The MCP server registration draft (McpServerRegistration) | ||||||
credentialFiles | array<object> | |||||||
2 fields of | ||||||||
pathrequired | string | |
contentB64required | string |
Responses
| Status | Description | Body | ||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 202 | Started; poll GET /jobs/{jobId}. The finished job's result is a McpRegistrationTestResult. | object | ||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||
Errors 401 · 403 · 429
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 429 | Too many jobs run on this daemon at once (jobs.ts MAX_RUNNING, 128). |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/admin/mcp/registration-test" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"registration":{}}'Interactive steps of running MCP registration tests
/admin/mcp/interactionsQuery parameters
| Name | Type | Description |
|---|---|---|
jobId | string | Only the steps of this job |
Responses
| Status | Description | Body | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 200 | OK | McpInteractionsResponse | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/admin/mcp/interactions" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Answer an interactive step
/admin/mcp/interactions/{interactionId}/continueRemoves an open_url step; lets a waiting confirm step continue. A timed-out step cannot be answered (404).
Path parameters
| Name | Type | Description |
|---|---|---|
interactionIdrequired | string | Interaction id |
Responses
| Status | Description | Body | |||
|---|---|---|---|---|---|
| 200 | OK | SuccessResponse | |||
| |||||
Errors 401 · 403 · 404
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 404 | Unknown agent (or the named resource: loop, task, file, …) |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/admin/mcp/interactions/INTERACTION_ID/continue" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"{
"success": true
}MCP server logs
/admin/mcp/logs/{serverName}A loaded agent’s live logs (agentId), else the logs kept from probe, test and agent runs.
Path parameters
| Name | Type | Description |
|---|---|---|
serverNamerequired | string | Server name |
Query parameters
| Name | Type | Description |
|---|---|---|
agentId | string | Loaded agent id, handle or name |
Responses
| Status | Description | Body | |||
|---|---|---|---|---|---|
| 200 | OK | McpServerLogsResponse | |||
| |||||
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/admin/mcp/logs/SERVER_NAME" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"App-level MCP OAuth sign-in state
/admin/mcp/oauth/statusQuery parameters
| Name | Type | Description |
|---|---|---|
url | string | Remote server URL |
Responses
| Status | Description | Body | |||
|---|---|---|---|---|---|
| 200 | OK | McpOAuthStatus | |||
| |||||
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl "http://127.0.0.1:7385/admin/mcp/oauth/status" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"Sign out of an MCP OAuth remote
/admin/mcp/oauth/signoutRequest bodyapplication/json · McpOAuthUrlBody · required
| Field | Type | Description |
|---|---|---|
urlrequired | string | The remote server URL |
Responses
| Status | Description | Body | ||||||
|---|---|---|---|---|---|---|---|---|
| 200 | OK | SuccessErrorResponse | ||||||
| ||||||||
Errors 401 · 403
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/admin/mcp/oauth/signout" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"string"}'{
"success": false,
"error": "This approval is no longer pending — it was already resolved, timed out, or its agent stopped."
}Ensure uv and Python on the daemon host
/admin/mcp/python-runtimeDownloads uv and Python when missing. Runs as a job: answers 202 at once. Cancel stops waiting; a download already running finishes. While one runs, another request joins it (job.joined).
Responses
| Status | Description | Body | |||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 202 | Started; poll GET /jobs/{jobId}. The finished job's result is a PythonRuntimeResult. | object | |||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
Errors 401 · 403 · 429
| 401 | Missing or wrong bearer token (unauthorized) | |
| 403 | The request guard refused it: Host header not allowed (host_not_allowed, DNS-rebinding protection) or a browser cross-site request (cross_origin)host_not_allowedcross_origin | |
| 429 | Too many jobs run on this daemon at once (jobs.ts MAX_RUNNING, 128). |
Error bodies use the error format.
Example
curl -X POST "http://127.0.0.1:7385/admin/mcp/python-runtime" \
-H "Authorization: Bearer $ADF_DAEMON_TOKEN"