Skip to content

Commit df821b3

Browse files
EPMRPP-109455 || MCP Server Documentation. Add description for the HTTP API Endpoints
1 parent 7791511 commit df821b3

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

README.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,69 @@ export MCP_SERVER_PORT=8080
294294
# Tokens are passed per-request via HTTP Authorization header
295295
```
296296

297+
### HTTP API Endpoints
298+
299+
When running in HTTP mode (`MCP_MODE=http`), the server exposes the following endpoints:
300+
301+
#### MCP Endpoints (for tool calls and MCP protocol)
302+
303+
- **`POST /mcp`** - Main MCP endpoint for JSON-RPC requests
304+
- **`POST /api/mcp`** - Alternative MCP endpoint (same functionality)
305+
- **`GET /mcp`** - SSE (Server-Sent Events) stream endpoint for MCP protocol
306+
- **`GET /api/mcp`** - Alternative SSE stream endpoint
307+
308+
**Important:** POST requests must be sent to `/mcp` or `/api/mcp`, not to the root endpoint `/`.
309+
310+
**Request Format:**
311+
312+
All MCP requests must follow the JSON-RPC 2.0 specification:
313+
314+
```json
315+
{
316+
"jsonrpc": "2.0",
317+
"method": "tools/call",
318+
"id": 1,
319+
"params": {
320+
"name": "get_launches",
321+
"arguments": {
322+
"filter-cnt-name": "test",
323+
"page": 1,
324+
"page-size": 10
325+
}
326+
}
327+
}
328+
```
329+
330+
**Example Request:**
331+
332+
```bash
333+
curl -X POST http://localhost:8080/mcp \
334+
-H "Content-Type: application/json" \
335+
-H "Authorization: Bearer your-reportportal-token" \
336+
-d '{
337+
"jsonrpc": "2.0",
338+
"method": "tools/call",
339+
"id": 1,
340+
"params": {
341+
"name": "get_launches",
342+
"arguments": {
343+
"page": 1,
344+
"page-size": 10
345+
}
346+
}
347+
}'
348+
```
349+
350+
#### Information Endpoints (GET only)
351+
352+
- **`GET /`** - Root endpoint, returns server information and available endpoints
353+
- **`GET /health`** - Health check endpoint
354+
- **`GET /info`** - Server information and configuration
355+
- **`GET /api/status`** - Server status (same as `/info`)
356+
- **`GET /metrics`** - Analytics metrics (if analytics enabled)
357+
358+
**Note:** The root endpoint `/` only accepts GET requests. POST requests to `/` will return a 404 error. Use `/mcp` or `/api/mcp` for MCP protocol requests.
359+
297360
### Starting the Server
298361

299362
The server will start in the mode specified by `MCP_MODE` environment variable (default: stdio).

0 commit comments

Comments
 (0)