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
Copy file name to clipboardExpand all lines: README.md
+86Lines changed: 86 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,59 @@ For example, if `pwd` outputs `/Users/user/subgraph-mcp`, the full command path
110
110
111
111
After adding the configuration, restart Claude Desktop.
112
112
113
+
#### Request Timeout Configuration (for Local Execution)
114
+
115
+
The server includes configurable timeout settings for HTTP requests to The Graph's Gateway. This helps handle complex GraphQL queries that may take longer to execute.
116
+
117
+
**Default Behavior**
118
+
119
+
By default, the server uses a **120-second timeout** for all HTTP requests to The Graph's Gateway. This provides a good balance between allowing complex queries to complete while preventing indefinite hangs.
120
+
121
+
**Custom Timeout Configuration**
122
+
123
+
You can customize the timeout in several ways:
124
+
125
+
Option 1: Environment Variable (Recommended)
126
+
127
+
Set the `SUBGRAPH_REQUEST_TIMEOUT_SECONDS` environment variable:
**Note**: Very long timeouts (>5 minutes) should be used cautiously as they may impact overall application responsiveness.
165
+
113
166
**Important**: Claude Desktop may not automatically utilize server resources. To ensure proper functionality, manually add `Subgraph Server Instructions` resource to your chat context by clicking on the context menu and adding the resource.
114
167
115
168
## Available Tools
@@ -263,6 +316,39 @@ The following application-specific metrics are exposed:
263
316
264
317
Additionally, the `axum-prometheus` library provides standard HTTP request metrics for the metrics server itself (prefixed with `http_`).
265
318
319
+
## Troubleshooting
320
+
321
+
### Request Timeout Errors
322
+
323
+
If you encounter "Request timed out" or "MCP error -32001" errors, this typically indicates that GraphQL queries are taking longer than the configured timeout to complete.
324
+
325
+
**Solutions:**
326
+
327
+
**If you're running your own local server instance:**
328
+
329
+
1.**Increase the timeout** using the `SUBGRAPH_REQUEST_TIMEOUT_SECONDS` environment variable:
1.**Contact support** - Timeout settings are managed by the hosted service and cannot be customized by end users.
337
+
338
+
**For all users:**
339
+
340
+
2.**Check query complexity** - Very complex queries with large result sets may need longer timeouts or query optimization.
341
+
342
+
3.**Verify The Graph Gateway status** - Occasional timeout issues may be due to temporary Gateway performance issues.
343
+
344
+
**Default Timeout**: Local server instances use a 120-second timeout by default (increased from 30 seconds in earlier versions). Remote hosted service timeout settings may differ.
345
+
346
+
### Common Issues
347
+
348
+
-**"API key not found"**: Ensure your `GATEWAY_API_KEY` environment variable is set correctly
349
+
-**"Configuration error"**: Check that your Gateway API key is valid and has appropriate permissions
350
+
-**Connection refused**: Verify the server is running and accessible on the configured port
351
+
266
352
## Contributing
267
353
268
354
Contributions are welcome! Please feel free to submit a Pull Request.
0 commit comments