You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tool-related tests that timeout are now treated as non-critical, allowing the testing process to continue and produce reports even when specific methods like `tools/list` hang.
145
+
132
146
### Troubleshooting Pip-Installed Servers
133
147
134
148
If you encounter issues when testing pip-installed servers:
135
149
136
150
-**"Failed to start transport" error**: Ensure the server is installed in the same environment as the testing framework
137
151
-**Module not found errors**: Verify the module is installed with `python -c "import module_name"`
138
152
-**Dependency issues**: Make sure all required dependencies are installed
153
+
-**Hanging/timeout issues**: Use the `--test-timeout` and `--tools-timeout` parameters to set appropriate timeouts
139
154
140
-
For more details, see the [Pip-Installed Servers Plan](plan_pip.md).
155
+
For more details, see the [Pip-Installed Servers Plan](plan_pip.md) and [Test Notes](test_notes.md) documents.
The Fetch server has a known issue with the `tools/list` method which causes it to hang indefinitely when this method is called. The server successfully initializes and can respond to the initialization request, but does not correctly implement the `tools/list` method.
128
+
129
+
To work around this issue, we've implemented two approaches:
130
+
131
+
1.**Use the Basic Interaction Script**: A simplified test that only verifies initialization
When testing the fetch server, you will still see a successful initialization but the tool list test will time out. The test framework has been updated to treat tool test timeouts as non-critical, so a report can still be generated showing the server's partial compliance with the protocol.
142
+
143
+
### Compliance Status for Fetch Server
144
+
145
+
The Fetch MCP Server demonstrates partial compliance with the 2024-11-05 protocol specification:
146
+
-**Total Tests**: 5 (in tools mode)
147
+
-**Passed**: 1 (Initialization)
148
+
-**Failed/Timed out**: 4 (Tool-related tests)
149
+
-**Status**: ⚠️ Partially Compliant (Initialization works, tools functionality times out)
150
+
151
+
A successful basic interaction test shows:
152
+
```
153
+
Starting server...
154
+
Initializing server...
155
+
Initialization result:
156
+
{
157
+
"jsonrpc": "2.0",
158
+
"id": "init",
159
+
"result": {
160
+
"protocolVersion": "2024-11-05",
161
+
"serverInfo": {
162
+
"name": "mcp-fetch",
163
+
"version": "1.6.0"
164
+
},
165
+
"capabilities": {
166
+
"tools": {
167
+
"listChanged": false
168
+
},
169
+
"experimental": {}
170
+
}
171
+
}
172
+
}
173
+
Sending initialized notification...
174
+
175
+
Listing available tools...
176
+
Error listing tools: Timeout waiting for response
177
+
```
178
+
179
+
This shows the server initializes correctly but has an issue with the tools/list method.
180
+
125
181
### Troubleshooting
126
182
127
183
When testing the Fetch server, you might encounter a "Failed to start transport" error. This could be due to:
128
184
129
185
1.**Dependencies not installed**: Make sure all dependencies are installed correctly.
130
186
```bash
131
-
cd /Users/scott/AI/MCP/servers/src/fetch
132
-
pip install -e .
187
+
pip install mcp-server-fetch sseclient-py==1.7.2
133
188
```
134
189
135
190
2.**Module Not Found**: The command might need to include the proper Python path.
@@ -148,16 +203,61 @@ When testing the Fetch server, you might encounter a "Failed to start transport"
The testing framework has been enhanced to better handle servers that may time out during specific test operations, particularly tool-related tests. New features include:
2.**Non-critical tool test failures**: Tool tests that time out are now marked as non-critical and don't prevent the generation of a compliance report. This allows testing servers that may have issues with specific methods but are otherwise functional.
218
+
219
+
3.**Timeout visibility in reports**: Reports now show which tests timed out, making it easier to diagnose server issues.
220
+
221
+
### Example Run with Timeout Handling
222
+
223
+
Running the minimal MCP server with timeout parameters demonstrates the improved functionality:
224
+
225
+
```
226
+
[2025-04-08 18:33:04] Running 3 non-tool tests with 30s timeout
227
+
[2025-04-08 18:33:04] Starting test suite with 3 tests
228
+
[2025-04-08 18:33:04] Running test 1/3: test_echo_tool
229
+
[2025-04-08 18:33:05] Test 1/3: test_echo_tool - PASSED (0.51s)
[2025-04-08 18:33:06] Test suite completed: 3 passed, 0 failed, total time: 1.55s
238
+
[2025-04-08 18:33:06] Running 2 tool tests with 15s timeout
239
+
```
240
+
241
+
### Test Output Interpretation
242
+
243
+
When a server has tool-related timeout issues, you'll see output like:
244
+
245
+
```
246
+
⚠️ WARNING: Test test_tools_list timed out after 15s (continuing)
247
+
```
248
+
249
+
And the generated report will indicate the timeout but still show initialization success:
250
+
251
+
```
252
+
## Status: Success
253
+
254
+
## Test Details
255
+
256
+
- ✅ Server Initialization: Successful
257
+
- ⚠️ Tools List: Timed out after 15s (non-critical)
258
+
```
159
259
160
-
The fetch server provides a single tool to fetch content from web URLs and convert them to a format suitable for consumption by an LLM.
260
+
This approach allows the testing framework to gracefully handle servers with partial compliance, providing useful feedback while still allowing the testing process to complete.
0 commit comments