|
| 1 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 2 | +Content-Type: application/json |
| 3 | +``` |
| 4 | +{ |
| 5 | + "jsonrpc": "2.0", |
| 6 | + "id": 1, |
| 7 | + "method": "initialize", |
| 8 | + "params": { |
| 9 | + "protocolVersion": "2025-11-25", |
| 10 | + "capabilities": {}, |
| 11 | + "clientInfo": { "name": "hurl", "version": "1.0.0" } |
| 12 | + } |
| 13 | +} |
| 14 | +``` |
| 15 | +HTTP 200 |
| 16 | +Content-Type: application/json |
| 17 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 18 | +Link: </v1/catalog/self/v1/schemas/mcp/response>; rel="describedby" |
| 19 | +[Captures] |
| 20 | +last_response: body |
| 21 | +schema_path: header "Link" regex "</v1/catalog([^>]+)>" |
| 22 | +[Asserts] |
| 23 | +jsonpath "$.jsonrpc" == "2.0" |
| 24 | +jsonpath "$.id" == 1 |
| 25 | +jsonpath "$.result.protocolVersion" == "2025-11-25" |
| 26 | +jsonpath "$.result.capabilities" isObject |
| 27 | +jsonpath "$.result.capabilities" isEmpty |
| 28 | +jsonpath "$.result.serverInfo.name" == "sourcemeta-one-enterprise" |
| 29 | +jsonpath "$.result.serverInfo.title" == "Sourcemeta One Enterprise" |
| 30 | +jsonpath "$.result.serverInfo.version" matches "^.+$" |
| 31 | + |
| 32 | +POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} |
| 33 | +``` |
| 34 | +{{last_response}} |
| 35 | +``` |
| 36 | +HTTP 200 |
| 37 | +[Asserts] |
| 38 | +jsonpath "$.valid" == true |
| 39 | + |
| 40 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 41 | +Content-Type: application/json |
| 42 | +``` |
| 43 | +{ "jsonrpc": "2.0", "id": "abc", "method": "ping" } |
| 44 | +``` |
| 45 | +HTTP 200 |
| 46 | +Content-Type: application/json |
| 47 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 48 | +Link: </v1/catalog/self/v1/schemas/mcp/response>; rel="describedby" |
| 49 | +[Captures] |
| 50 | +last_response: body |
| 51 | +schema_path: header "Link" regex "</v1/catalog([^>]+)>" |
| 52 | +[Asserts] |
| 53 | +jsonpath "$.jsonrpc" == "2.0" |
| 54 | +jsonpath "$.id" == "abc" |
| 55 | +jsonpath "$.result" isObject |
| 56 | +jsonpath "$.result" isEmpty |
| 57 | + |
| 58 | +POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} |
| 59 | +``` |
| 60 | +{{last_response}} |
| 61 | +``` |
| 62 | +HTTP 200 |
| 63 | +[Asserts] |
| 64 | +jsonpath "$.valid" == true |
| 65 | + |
| 66 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 67 | +Content-Type: application/json |
| 68 | +``` |
| 69 | +{ "jsonrpc": "2.0", "method": "notifications/initialized" } |
| 70 | +``` |
| 71 | +HTTP 202 |
| 72 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 73 | +[Asserts] |
| 74 | +bytes count == 0 |
| 75 | +header "Link" not exists |
| 76 | + |
| 77 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 78 | +Content-Type: application/json |
| 79 | +``` |
| 80 | +{ |
| 81 | + "jsonrpc": "2.0", |
| 82 | + "method": "notifications/cancelled", |
| 83 | + "params": { "requestId": 99, "reason": "test" } |
| 84 | +} |
| 85 | +``` |
| 86 | +HTTP 202 |
| 87 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 88 | +[Asserts] |
| 89 | +bytes count == 0 |
| 90 | +header "Link" not exists |
| 91 | + |
| 92 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 93 | +Content-Type: application/json |
| 94 | +``` |
| 95 | +{ |
| 96 | + "jsonrpc": "2.0", |
| 97 | + "method": "notifications/cancelled", |
| 98 | + "params": { "requestId": "never-issued" } |
| 99 | +} |
| 100 | +``` |
| 101 | +HTTP 202 |
| 102 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 103 | +[Asserts] |
| 104 | +bytes count == 0 |
| 105 | +header "Link" not exists |
| 106 | + |
| 107 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 108 | +Content-Type: application/json |
| 109 | +``` |
| 110 | +{ "jsonrpc": "2.0", "id": 5, "method": "tools/list" } |
| 111 | +``` |
| 112 | +HTTP 200 |
| 113 | +Content-Type: application/json |
| 114 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 115 | +Link: </v1/catalog/self/v1/schemas/mcp/response>; rel="describedby" |
| 116 | +[Captures] |
| 117 | +last_response: body |
| 118 | +schema_path: header "Link" regex "</v1/catalog([^>]+)>" |
| 119 | +[Asserts] |
| 120 | +jsonpath "$.jsonrpc" == "2.0" |
| 121 | +jsonpath "$.id" == 5 |
| 122 | +jsonpath "$.error.code" == -32601 |
| 123 | +jsonpath "$.error.message" == "Method not found" |
| 124 | + |
| 125 | +POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} |
| 126 | +``` |
| 127 | +{{last_response}} |
| 128 | +``` |
| 129 | +HTTP 200 |
| 130 | +[Asserts] |
| 131 | +jsonpath "$.valid" == true |
| 132 | + |
| 133 | +POST {{base}}/v1/catalog/self/v1/mcp |
| 134 | +Content-Type: application/json |
| 135 | +``` |
| 136 | +{ "jsonrpc": "2.0", "id": 7, "method": "notifications/initialized" } |
| 137 | +``` |
| 138 | +HTTP 200 |
| 139 | +Content-Type: application/json |
| 140 | +Access-Control-Allow-Origin: http://localhost:8000 |
| 141 | +Link: </v1/catalog/self/v1/schemas/mcp/response>; rel="describedby" |
| 142 | +[Captures] |
| 143 | +last_response: body |
| 144 | +schema_path: header "Link" regex "</v1/catalog([^>]+)>" |
| 145 | +[Asserts] |
| 146 | +jsonpath "$.jsonrpc" == "2.0" |
| 147 | +jsonpath "$.id" == 7 |
| 148 | +jsonpath "$.error.code" == -32601 |
| 149 | +jsonpath "$.error.message" == "Method not found" |
| 150 | + |
| 151 | +POST {{base}}/v1/catalog/self/v1/api/schemas/evaluate{{schema_path}} |
| 152 | +``` |
| 153 | +{{last_response}} |
| 154 | +``` |
| 155 | +HTTP 200 |
| 156 | +[Asserts] |
| 157 | +jsonpath "$.valid" == true |
| 158 | + |
| 159 | +# The MCP route is mounted under /v1/catalog. Requests without the base path |
| 160 | +# must not match. |
| 161 | + |
| 162 | +GET {{base}}/self/v1/mcp |
| 163 | +HTTP 404 |
| 164 | +Content-Type: application/problem+json |
| 165 | +Access-Control-Allow-Origin: * |
| 166 | +[Asserts] |
| 167 | +jsonpath "$.status" == 404 |
| 168 | +jsonpath "$.title" == "sourcemeta:one/not-found" |
| 169 | + |
| 170 | +POST {{base}}/self/v1/mcp |
| 171 | +Content-Type: application/json |
| 172 | +``` |
| 173 | +{ "jsonrpc": "2.0", "id": 1, "method": "ping" } |
| 174 | +``` |
| 175 | +HTTP 404 |
| 176 | + |
| 177 | +OPTIONS {{base}}/self/v1/mcp |
| 178 | +HTTP 404 |
0 commit comments