-
-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathmcp-test-requests.http
More file actions
147 lines (121 loc) · 3.15 KB
/
Copy pathmcp-test-requests.http
File metadata and controls
147 lines (121 loc) · 3.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
### MCP Streamable HTTP Transport - Test Requests
### Use these requests in IntelliJ IDEA's HTTP Client to test the MCP endpoint
### Default port (change if using a different port)
@port = 8765
### ===========================================================================
### MCP JSON-RPC 2.0 Protocol Requests
### ===========================================================================
### Initialize - Start MCP session
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "http-client-test",
"version": "1.0"
}
}
}
### Initialized notification - Acknowledge initialization
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"method": "initialized"
}
### Ping - Check server responsiveness
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 2,
"method": "ping"
}
### Tools/List - Get available tools
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/list"
}
### ===========================================================================
### Tool Calls
### ===========================================================================
### list_diagrams - List all open diagrams
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "list_diagrams",
"arguments": {}
}
}
### get_diagram_by_id - Get diagram content (replace ID with actual diagram ID)
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "get_diagram_by_id",
"arguments": {
"id": "YOUR_DIAGRAM_ID_HERE"
}
}
}
### update_diagram - Update diagram content (replace ID and XML)
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "update_diagram",
"arguments": {
"id": "YOUR_DIAGRAM_ID_HERE",
"xml": "<mxGraphModel><root><mxCell id=\"0\"/><mxCell id=\"1\" parent=\"0\"/></root></mxGraphModel>"
}
}
}
### ===========================================================================
### Error Cases
### ===========================================================================
### Unknown method
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 99,
"method": "unknown/method"
}
### Missing method
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "2.0",
"id": 98
}
### Invalid JSON-RPC version
POST http://localhost:{{port}}/mcp
Content-Type: application/json
{
"jsonrpc": "1.0",
"id": 97,
"method": "initialize"
}
### ===========================================================================
### Health Check
### ===========================================================================
### Root endpoint (health check)
GET http://localhost:{{port}}/