Troubleshooting
MCP Server Won’t Connect
Section titled “MCP Server Won’t Connect”Symptom: POST /api/connections returns 201 but scanning shows errors for that app.
Causes & Fixes:
-
Wrong command path — Ensure the binary exists and is on
$PATHinside the Docker container.Terminal window docker exec wcp which npx # should return /usr/local/bin/npx -
Missing environment variables — Some MCP servers need API keys. Pass them in the
envfield:{"name": "notion","command": "npx","args": ["-y", "@anthropic/mcp-server-notion"],"env": { "NOTION_API_KEY": "ntn_..." }} -
Server crashes on startup — Run the MCP command manually to see its stderr:
Terminal window npx -y @anthropic/mcp-server-notion 2>&1 -
npm cache issues — If
npx -ydownloads fail inside Docker, try pulling the image fresh or clearing the npm cache:Terminal window docker exec wcp npm cache clean --force
Capabilities Scan Returns Empty
Section titled “Capabilities Scan Returns Empty”Symptom: POST /api/capabilities/scan returns {"scanned": [], "bindings_detected": 0}.
- No connections registered — call
GET /api/connectionsfirst. - If connections exist but scan is empty, the MCP servers may not expose any tools. Check the server documentation.
Sync Produces No Logs
Section titled “Sync Produces No Logs”Symptom: POST /api/sync/run/await returns {"synced": 0, "errors": 0, "conflicts": 0}.
- No SyncLinks exist yet. You need at least two apps with matching capabilities. Check
GET /api/capabilities/syncable-pairsfor valid pairs, then run a sync. - If pairs exist but sync count is zero, the entities may already be in sync (same
content_hash).
Conflicts Not Resolving
Section titled “Conflicts Not Resolving”Symptom: POST /api/conflicts/{id}/resolve returns 409.
- The conflict was already resolved or dismissed. Query it with
GET /api/conflicts?status=allto check its current status. - Ensure the
winning_appvalue matches one of the app names in the conflict’ssides[]array.
WebSocket Disconnects
Section titled “WebSocket Disconnects”Symptom: Dashboard loses real-time updates or WebSocket connections drop.
- Behind a reverse proxy (Traefik, Nginx), ensure WebSocket upgrade headers are forwarded:
# Traefik docker label- "traefik.http.middlewares.wcp-headers.headers.customrequestheaders.Connection=Upgrade"
- WCP sends
pingframes every 20 seconds. If your proxy has a shorter idle timeout, increase it to ≥ 30s. - If using Cloudflare, enable WebSockets in the Network tab of your domain settings.
Docker Container Won’t Start
Section titled “Docker Container Won’t Start”Symptom: Container exits immediately or restarts in a loop.
-
Check logs:
Terminal window docker logs wcp --tail 50 -
Port conflict — Another service is using port 8000:
Terminal window docker run -d -p 9000:8000 ... # map to a different host port -
Volume permissions — On some hosts the
/datadirectory isn’t writable:Terminal window docker exec wcp ls -la /data -
ARM64 image on x86 — If you pulled an ARM64 image on an x86 host (or vice versa), rebuild:
Terminal window docker build --platform linux/amd64 -t wcp .
Database Locked Errors
Section titled “Database Locked Errors”Symptom: sqlite3.OperationalError: database is locked
- Only one WCP instance should write to the same SQLite file. Don’t mount the same volume into two containers.
- If the process crashed mid-write, the lock file may be stale. Restart the container:
Terminal window docker restart wcp
CORS Errors in Dashboard
Section titled “CORS Errors in Dashboard”Symptom: Browser console shows Access-Control-Allow-Origin errors.
- Set the
WCP_CORS_ORIGINSenvironment variable to your dashboard URL:Terminal window -e WCP_CORS_ORIGINS=https://dashboard.example.com - For local development, use
*(wildcard). Never use*in production.
Common HTTP Error Codes
Section titled “Common HTTP Error Codes”| Code | Meaning | What to do |
|---|---|---|
| 404 | Resource not found | Check the connection name, conflict ID, or wcp_id |
| 409 | Conflict / duplicate | Resource already exists or conflict already resolved |
| 422 | Validation error | Check request body — missing or invalid fields |
| 500 | Internal server error | Check docker logs wcp for the traceback |
Getting Help
Section titled “Getting Help”- GitHub Issues: github.com/lucasmella-stack/WCP/issues
- Logs: Always include output from
docker logs wcp --tail 100andGET /api/sync/status