{
  "file": "F19-mcp.md",
  "bullet": "Remote server behind a bearer token (`F19.test-remote-bearer`).",
  "ids": [
    "F19.test-remote-bearer"
  ],
  "line": 444,
  "script": "control-agent-server api POST /api/mcp/test --expect 200 --save F19.test-remote-bearer/auth-bearer \\\n  --json \"{\\\"name\\\":\\\"qa-http\\\",\\\"server\\\":{\\\"type\\\":\\\"http\\\",\\\"url\\\":\\\"http://127.0.0.1:$BEARER_PORT/mcp\\\",\\\"auth\\\":{\\\"strategy\\\":\\\"bearer\\\",\\\"value\\\":\\\"qa-f19-bearer\\\"}},\\\"timeout\\\":20,\\\"tool_call\\\":{\\\"name\\\":\\\"read_subject\\\",\\\"arguments\\\":{\\\"subject\\\":\\\"hi\\\"}}}\" \\\n  --check ok eq true --check tools contains read_subject --check tool_result.text eq QA_HTTP_SUBJECT:hi\ncontrol-agent-server api POST /api/mcp/test --expect 200 \\\n  --json \"{\\\"server\\\":{\\\"type\\\":\\\"shttp\\\",\\\"url\\\":\\\"http://127.0.0.1:$BEARER_PORT/mcp\\\",\\\"headers\\\":{\\\"Authorization\\\":\\\"Bearer qa-f19-bearer\\\"}},\\\"timeout\\\":20}\" \\\n  --check ok eq true --check tools contains read_subject\ncontrol-agent-server api POST /api/mcp/test --expect 200 \\\n  --json \"{\\\"server\\\":{\\\"transport\\\":\\\"http\\\",\\\"url\\\":\\\"http://127.0.0.1:$BEARER_PORT/mcp\\\",\\\"auth\\\":{\\\"strategy\\\":\\\"header\\\",\\\"headers\\\":{\\\"Authorization\\\":\\\"Bearer qa-f19-bearer\\\"}}},\\\"timeout\\\":20}\" \\\n  --check ok eq true --check tools contains read_subject\ncontrol-agent-server api POST /api/mcp/test --expect 200 --save F19.test-remote-bearer/wrong-token \\\n  --json \"{\\\"server\\\":{\\\"transport\\\":\\\"http\\\",\\\"url\\\":\\\"http://127.0.0.1:$BEARER_PORT/mcp\\\",\\\"auth\\\":{\\\"strategy\\\":\\\"bearer\\\",\\\"value\\\":\\\"qa-f19-wrong\\\"}},\\\"timeout\\\":20}\" \\\n  --check ok eq false --check error contains 401\n",
  "exit_code": 0,
  "elapsed_ms": 11508,
  "failed_line": null,
  "failed_command": null,
  "stdout": "{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"POST\",\n    \"path\": \"/api/mcp/test\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"name\": \"qa-http\",\n      \"server\": {\n        \"type\": \"http\",\n        \"url\": \"http://127.0.0.1:54269/mcp\",\n        \"auth\": {\n          \"strategy\": \"bearer\",\n          \"value\": \"qa-f19-bearer\"\n        }\n      },\n      \"timeout\": 20,\n      \"tool_call\": {\n        \"name\": \"read_subject\",\n        \"arguments\": {\n          \"subject\": \"hi\"\n        }\n      }\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"97\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"ok\": true,\n      \"tools\": [\n        \"read_subject\"\n      ],\n      \"tool_result\": {\n        \"is_error\": false,\n        \"text\": \"QA_HTTP_SUBJECT:hi\"\n      }\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 430,\n  \"checks\": [\n    {\n      \"check\": \"ok eq true\",\n      \"ok\": true,\n      \"actual\": \"true\"\n    },\n    {\n      \"check\": \"tools contains read_subject\",\n      \"ok\": true,\n      \"actual\": \"[\\\"read_subject\\\"]\"\n    },\n    {\n      \"check\": \"tool_result.text eq QA_HTTP_SUBJECT:hi\",\n      \"ok\": true,\n      \"actual\": \"QA_HTTP_SUBJECT:hi\"\n    }\n  ],\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021940-8441-map-f19/evidence/F19.test-remote-bearer/auth-bearer.json\"\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"POST\",\n    \"path\": \"/api/mcp/test\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"server\": {\n        \"type\": \"shttp\",\n        \"url\": \"http://127.0.0.1:54269/mcp\",\n        \"headers\": {\n          \"Authorization\": \"Bearer qa-f19-bearer\"\n        }\n      },\n      \"timeout\": 20\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"36\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"ok\": true,\n      \"tools\": [\n        \"read_subject\"\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 716,\n  \"checks\": [\n    {\n      \"check\": \"ok eq true\",\n      \"ok\": true,\n      \"actual\": \"true\"\n    },\n    {\n      \"check\": \"tools contains read_subject\",\n      \"ok\": true,\n      \"actual\": \"[\\\"read_subject\\\"]\"\n    }\n  ]\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"POST\",\n    \"path\": \"/api/mcp/test\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"server\": {\n        \"transport\": \"http\",\n        \"url\": \"http://127.0.0.1:54269/mcp\",\n        \"auth\": {\n          \"strategy\": \"header\",\n          \"headers\": {\n            \"Authorization\": \"Bearer qa-f19-bearer\"\n          }\n        }\n      },\n      \"timeout\": 20\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"36\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"ok\": true,\n      \"tools\": [\n        \"read_subject\"\n      ]\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 552,\n  \"checks\": [\n    {\n      \"check\": \"ok eq true\",\n      \"ok\": true,\n      \"actual\": \"true\"\n    },\n    {\n      \"check\": \"tools contains read_subject\",\n      \"ok\": true,\n      \"actual\": \"[\\\"read_subject\\\"]\"\n    }\n  ]\n}\n{\n  \"ok\": true,\n  \"status\": 200,\n  \"request\": {\n    \"method\": \"POST\",\n    \"path\": \"/api/mcp/test\",\n    \"query\": [],\n    \"auth\": \"header\",\n    \"body\": {\n      \"server\": {\n        \"transport\": \"http\",\n        \"url\": \"http://127.0.0.1:54269/mcp\",\n        \"auth\": {\n          \"strategy\": \"bearer\",\n          \"value\": \"qa-f19-wrong\"\n        }\n      },\n      \"timeout\": 20\n    },\n    \"files\": []\n  },\n  \"response\": {\n    \"status\": 200,\n    \"headers\": {\n      \"content-length\": \"221\",\n      \"content-type\": \"application/json\"\n    },\n    \"body\": {\n      \"ok\": false,\n      \"error\": \"HTTPStatusError: Client error '401 Unauthorized' for url 'http://127.0.0.1:54269/mcp'\\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401\",\n      \"error_kind\": \"unknown\"\n    },\n    \"truncated\": false\n  },\n  \"elapsed_ms\": 2994,\n  \"checks\": [\n    {\n      \"check\": \"ok eq false\",\n      \"ok\": true,\n      \"actual\": \"false\"\n    },\n    {\n      \"check\": \"error contains 401\",\n      \"ok\": true,\n      \"actual\": \"HTTPStatusError: Client error '401 Unauthorized' for url 'http://127.0.0.1:54269/mcp'\\nFor more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401\"\n    }\n  ],\n  \"saved\": \"/workspace/verification-artifacts/runs/20261013-021940-8441-map-f19/evidence/F19.test-remote-bearer/wrong-token.json\"\n}\n",
  "stderr": ""
}
