Troubleshooting¶
Common issues and solutions for using the LexSocket MCP servers.
Authentication Issues¶
"Invalid or expired authentication credentials" (401)¶
Your authentication token has expired or is invalid.
Solutions:
- If using OAuth (Claude Desktop/Code):
- Restart the MCP client
- The client will automatically refresh the OAuth token on next use
-
If the problem persists, log out and log back in through the OAuth prompt
-
If using API Key:
- Verify the key is correct:
echo $LEXSOCKET_API_KEY - Check that the key hasn't been revoked in the LexSocket Dashboard
- Generate a new key: LexSocket Dashboard → Dashboard → Create key
-
Verify the header is correctly formatted:
x-api-key: sk-...(no extra spaces) -
If using Le Chat or Cherry Studio:
- Verify the API key is included in headers
- Check that you're using the correct MCP endpoint:
https://mcp.lexsocket.ai/
"Connection refused" or "Failed to connect"¶
The MCP server is unreachable.
Solutions:
- Verify the endpoint URL:
- Should be:
https://mcp.lexsocket.ai/ -
NOT the old separate URLs (eurlex.lexsocket.ai, ted.lexsocket.ai, etc.)
-
Check internet connectivity:
Should return a 200 status. -
If running locally with
AUTH_ENABLED=false: - Verify server is running:
cd src/mcp && AUTH_ENABLED=false python -m src.main - Check the console for errors
-
Default local URL:
http://localhost:5000 -
Firewall/proxy issues:
- Ensure port 443 (HTTPS) is open
- If behind a corporate proxy, configure your MCP client to use it
Rate Limiting¶
"Rate limit exceeded: 60 requests per minute"¶
You've exceeded the rate limit for your tier.
Solutions:
- Check remaining quota:
- Response headers include:
X-RateLimit-Remaining: 42 -
Wait for the window to reset (typically 1 minute)
-
Implement backoff retry logic:
-
Batch requests efficiently:
- Reduce frequency of requests
- Cache results locally
-
Use
limitparameter to get more results per request (up to 100) -
Contact support for higher limits:
- Email: support@lexsocket.ai
- Include your use case and required request rate
Search Issues¶
"No results found" for a query that should return results¶
Your search query didn't match any tenders.
Debugging steps:
- Check your country code:
- TED supports all EU/EEA countries (use ISO 3166-1 alpha-3 codes:
FRA,DEU,POL) - National Tenders only covers: FR, GB, DE, ES, IT, NL, IE, PT, DK, PL, AT
-
Example: Use
FRAnotFRfor TED -
Try a simpler query:
If this returns results but your specific query doesn't, your keywords may not match any tenders. -
Try semantic search instead of FTS:
-
Check date filters:
- Verify
published_after/deadline_afteraren't too restrictive -
Try removing date filters to see if results exist
-
Verify the CPV code:
- Use a broader code:
72instead of72101000 -
Check the European Commission CPV database
-
Search without filters:
- Remove country, CPV, value range filters
- Gradually add filters back to isolate the issue
Query returns different results each time¶
Slight ranking variations are normal due to the hybrid search algorithm.
Expected behavior: - Hybrid search uses Reciprocal Rank Fusion (RRF) to combine FTS and vector results - Small changes in ranking between queries are normal - Top results should be consistent
To reduce variance:
- Use mode: "fts" for exact keyword matching (deterministic)
- Avoid overly broad queries
"No results found" for a valid CPV or NUTS code¶
The code may be valid but no tenders match your filters.
Solutions:
- Verify the code exists:
- CPV codes: Check SIMAP CPV database
-
NUTS codes: Check Eurostat NUTS
-
Try without other filters:
-
Use broader CPV codes:
-
Instead of
72101000, try72100000or72000000 -
Check data freshness:
- TED data updates twice daily
- National tenders update daily
- Recent tenders may not be indexed yet
Local Development Issues¶
"ModuleNotFoundError: No module named 'tantivy'"¶
The Tantivy library (full-text search) is not installed.
Solution:
If using a virtual environment:
"Error: GCS authentication failed"¶
Running index pipelines locally without GCS credentials.
Solution:
-
Set up GCS credentials:
-
Or disable GCS sync for local dev:
-
For National Tenders local embedding:
Server fails to start: "Address already in use"¶
Port is occupied by another process.
Solutions:
-
Find and kill the process:
-
Or use a different port:
-
Or restart your system to free all ports.
Data & Freshness Issues¶
"Why is the tender I just published not in the database?"¶
TED and National Tenders update on schedules, not in real-time.
Update schedule:
| Source | Frequency | Latency |
|---|---|---|
| TED | Twice daily (06:00, 18:00 UTC) | 2-4 hours from publication |
| National Tenders | Daily per country (01:00-04:45 UTC) | Same-day to next-day |
Solutions: - Wait for the next scheduled update - Check directly on the source website (TED.europa.eu, BOAMP, Contracts Finder, etc.)
"The statistics show different numbers than the platform says"¶
Data may be partially processed or a sync is in progress.
Explanations: - Index rebuild is weekly (Sunday 03:00 UTC for TED, 06:00 UTC for National Tenders) - During rebuilds, statistics may temporarily differ - De-duplicated records may differ from raw platform counts
Solution: Check back after the weekly rebuild completes.
Tenders showing as "active" but deadline has passed¶
Status data may lag behind the actual deadline.
Explanation: - Status is updated daily during collection - Platform status may be ahead of LexSocket - "Active" status reflects the last known state
Solution: Always verify deadline directly on the source platform before submitting a bid.
Error Codes Reference¶
Common HTTP Status Codes¶
| Code | Meaning | Action |
|---|---|---|
| 200 | Success | None, check response body |
| 400 | Bad parameter | Review your parameters (country code, CPV, dates) |
| 401 | Auth failed | Re-authenticate or check API key |
| 429 | Rate limited | Implement backoff retry; wait 1-2 minutes |
| 500 | Server error | Retry after 5-30 seconds |
Still Stuck?¶
Contact Support¶
- Email: support@lexsocket.ai
- GitHub Issues: github.com/lexsocket/issues
- Documentation: lexsocket.ai/doc/
When reporting issues, include:¶
- What you were trying to do (the query, the tool)
- The exact error message (with status code if applicable)
- Your steps to reproduce the issue
- What you expected to happen
- Country/region you're searching (if relevant)
- Client and version (Claude Desktop 0.x, Le Chat, etc.)
Next Steps¶
- API Reference: Parameter validation and error codes
- TED Search Guide: Improve search effectiveness
- Quick Start: Back to basics