POST /mltk/mcp_connection/test
POST /mltk/mcp_connection/test
Test connectivity.
AGENT_CONNECTION_CAPABILITIES
Description. Test connectivity. Two modes:
- Saved mode — body has just
{"name": "..."}. The handler loads the saved record + token and probes. - Inline mode — body provides
url,token,typedirectly (used by the UI to test before saving).
Behavior. For SPLUNK it issues a JSON-RPC 2.0 tools/list call with MCP-Protocol-Version: 2025-03-26, 10s timeout. For ATLASSIAN it opens an aiohttp SSE channel and sends initialize, 15s timeout.
Response (200).
{
"success": true,
"status": "success",
"message": "MCP server is reachable and Bearer token is valid",
"data": {
"mcp_name": "splunk_mcp",
"mcp_type": "SPLUNK",
"mcp_server_url": "https://mcp.example.com/services/mcp",
"response_time_ms": 245,
"http_status": 200,
"authenticated": true,
"reachable": true
}
}
Example.
# Saved-connection test
curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST
-H "Content-Type: application/json"
--data '{"name":"splunk_mcp"}'
"$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/mcp_connection/test?output_mode=json"
# Inline test (before saving)
curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST
-H "Content-Type: application/json"
--data '{"type":"SPLUNK","url":"https://mcp.example.com/services/mcp","token":"bearer"}'
"$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/mcp_connection/test?output_mode=json"