diff --git a/docs/running.md b/docs/running.md index 1ba8d963..b47d14d4 100644 --- a/docs/running.md +++ b/docs/running.md @@ -313,30 +313,51 @@ MCP clients (like Claude Desktop, LLM IDEs) can connect to your server: ### Check Server Health +The server exposes two Kubernetes-style probe endpoints: + ```bash -# Test if server is responding -curl http://localhost:8000/health +# Liveness — server process is up (always 200 if running) +curl http://localhost:8000/health/live -# Expected response: HTTP 200 OK +# Readiness — server can reach Nextcloud and (if enabled) Qdrant +curl http://localhost:8000/health/ready ``` -### Check OAuth Configuration +`/health/live` returns `200 OK` as long as the process is running. `/health/ready` +returns `200 OK` with a JSON body describing each dependency check, or `503` with +the same JSON body listing which checks failed — use the readiness probe when +troubleshooting connectivity to Nextcloud or Qdrant. -Look for these log messages on startup: +### Check Deployment Mode -**OAuth mode:** +The server logs the detected deployment mode on startup. Look for these +messages in the container logs: + +**At server boot (all modes):** +``` +INFO ✅ Configuration validated successfully for mode +INFO Configuring MCP server for mode +INFO Health check endpoints enabled: /health/live, /health/ready +``` + +`` is one of `single_user_basic`, `multi_user_basic`, or +`oauth_single_audience`, matching the `MCP_DEPLOYMENT_MODE` setting. + +**Additional OAuth-mode messages (at server boot):** ``` -INFO OAuth mode detected (NEXTCLOUD_USERNAME/PASSWORD not set) -INFO Configuring MCP server for OAuth mode -INFO OIDC discovery successful INFO OAuth client ready: ... -INFO OAuth initialization complete +INFO OAuth configuration complete ``` -**BasicAuth mode:** +**Additional single-user BasicAuth messages (per MCP session):** + +These fire when the first MCP client connects, not at server boot — if you +have just started the container and no client has connected yet, you will not +see them in the logs: ``` -INFO BasicAuth mode detected (NEXTCLOUD_USERNAME/PASSWORD set) -INFO Initializing Nextcloud client with BasicAuth +INFO Starting MCP session in single-user BasicAuth mode +INFO Creating shared Nextcloud client with BasicAuth +INFO Client initialization complete ``` --- @@ -416,7 +437,7 @@ Common issues: ### Can't connect to server -1. Verify server is running: `curl http://localhost:8000/health` +1. Verify server is running: `curl http://localhost:8000/health/live` 2. Check firewall settings 3. Verify host binding (use `0.0.0.0` to allow network access) 4. Check OAuth authentication if enabled diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md index 39a18a6e..fd8e683a 100644 --- a/docs/troubleshooting.md +++ b/docs/troubleshooting.md @@ -290,10 +290,10 @@ kill 2. **Test connectivity:** ```bash # Test from same machine - curl http://localhost:8000/health + curl http://localhost:8000/health/live # Test from network (if using --host 0.0.0.0) - curl http://:8000/health + curl http://:8000/health/live ``` 3. **Check firewall:**