# π§ MCP Server Troubleshooting Guide
## Current Issue: "no available server"
The MCP server is running but responding with "no available server". Here's how to fix it:
## π§ͺ Quick Diagnostic Tests
### 1. Test Health Endpoint
```bash
curl https://mcp-nocodb.v1su4.com/
# Should return MCP server response
```
### 2. Test MCP Connection
```bash
curl -X POST https://mcp-nocodb.v1su4.com/ \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"health_check","arguments":{}},"id":1}'
```
### 3. Test NocoDB Connection Tool
```bash
curl -X POST https://mcp-nocodb.v1su4.com/ \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","method":"tools/call","params":{"name":"nocodb_test_connection","arguments":{}},"id":1}'
```
## π¨ Common Issues & Solutions
### Issue 1: Environment Variables Not Set
**Symptoms:** Server starts but returns "no available server"
**Solution:**
1. Go to your Coolify dashboard
2. Find your MCP server service
3. Add environment variables:
```
NOCODB_API_TOKEN=your_actual_token_here
NOCODB_URL=https://nocodb.v1su4.com
PORT=3001
PYTHONUNBUFFERED=1
```
4. Restart the service
### Issue 2: NocoDB Authentication Errors (401 Unauthorized)
**Symptoms:** Server returns "401 Unauthorized" or "Invalid API token" from NocoDB
**Solution:**
1. **Check NOCODB_API_TOKEN environment variable:**
```bash
# In Coolify, ensure you have:
NOCODB_API_TOKEN=your_nocodb_api_token_here
```
2. **Verify token format:**
- Should be a JWT-like string (starts with `eyJ`)
- Generated from NocoDB: Account Settings β Tokens
- Use `xc-token` header (not `xc-auth` or `Authorization`)
3. **Test token directly:**
```bash
curl -H "xc-token: your_token" https://nocodb.v1su4.com/api/v1/db/meta/projects
```
4. **Check MCP server logs in Coolify** for authentication errors
### Issue 3: SSL Certificate Problems
**Symptoms:** curl fails with SSL errors
**Current Fix:** MCP config uses `-k` flag to skip SSL verification
**Permanent Fix:** Wait for SSL certificate to be issued (usually 5-10 minutes)
### Issue 3: Port Configuration
**Symptoms:** Server responds but on wrong port
**Check:**
```bash
# Default port is 3001
curl https://mcp-nocodb.v1su4.com/
# Or test with explicit port if configured differently
```
### Issue 4: Service Not Running
**Symptoms:** Connection timeout
**Check:**
1. Coolify dashboard β Service status
2. View service logs in Coolify
3. Check if Docker container is running
## π§ Quick Fix Commands
### If Environment Variables Are Missing:
```bash
# SSH into your server and check environment
docker exec -it <container_name> env
# Or check Coolify service configuration
```
### If Service Needs Restart:
```bash
# In Coolify: Force rebuild
# Or trigger new deployment
```
### If Logs Show Python Errors:
```bash
# Check Coolify logs for:
# - Import errors
# - Missing dependencies
# - Port binding issues
```
## π Expected Server Response
### Health Check (Success):
The server uses MCP protocol over HTTP/SSE. A successful health check via MCP tool call should return:
```json
{
"success": true,
"status": "healthy",
"nocodb_status": "healthy",
"uptime_seconds": 123.45,
"nocodb_url": "https://nocodb.v1su4.com",
"timestamp": "2024-01-01T00:00:00.000Z"
}
```
### MCP Tool Call (Success):
MCP responses use JSON-RPC 2.0 format with Server-Sent Events (SSE) for streaming.
## π― Next Steps
1. **Check Coolify Environment Variables** - Make sure `NOCODB_API_TOKEN` is set correctly
2. **Verify NocoDB Connection** - Test token directly with NocoDB API
3. **Test MCP Endpoint** - Use the curl commands above
4. **Check Logs** - Look for Python errors in Coolify service logs
5. **Restart Service** - If needed, trigger a rebuild in Coolify
## π If Still Not Working
1. **Check Coolify Service Status** - Ensure container is running
2. **View Application Logs** in Coolify - Look for startup errors
3. **Verify Docker Image** - Ensure `gordov1su4/mcp-server-nocodb:1.2.0` is accessible
4. **Test Locally** - Use `docker-compose.yaml` for local testing
5. **Verify NocoDB URL** - Ensure `https://nocodb.v1su4.com` is accessible
## π Support
Common issues:
- Missing or incorrect `NOCODB_API_TOKEN` environment variable
- NocoDB instance not accessible from MCP server
- Port configuration mismatch (should be 3001)
- Docker image pull failures
For more details, see [COOLIFY_DEPLOYMENT_GUIDE.md](COOLIFY_DEPLOYMENT_GUIDE.md) and [NOCODB_API_SETUP_GUIDE.md](NOCODB_API_SETUP_GUIDE.md).