Overview
The Surfa platform includes a built-in connection tester to validate your MCP setup before creating test scenarios.Using the Test Connection Feature
1. Navigate to MCP Settings
Go to Settings → MCP in your Surfa workspace.2. Add Your MCP
Click Add New MCP and fill in:- Name: Descriptive name (e.g., “Production Surfa MCP”)
- Transport: SSE, STDIO, or Streamable HTTP
- Endpoint: Your MCP URL (e.g.,
https://surfa-mcp.fly.dev/sse) - Headers: Authentication headers (optional)
3. Click “Test Connection”
The platform will:- Send an
initializerequest - Send a
tools/listrequest - Parse the response
- Display discovered tools
What Happens During Testing
For SSE Transport
Success Response
Retry Behavior
If the server returns202 Accepted (machine starting):
You’ll see progress messages:
Common Test Results
✅ Success
Message: “Connection successful!” Tools: List of discovered tools displayed Next: Create test scenarios⚠️ Cold Start (202)
Message: “Retry attempt X of 3…” Action: Wait for retries to complete Duration: Up to 27 seconds❌ Timeout
Message: “Machine is starting up but taking longer than expected” Cause: Server not responding after 27 seconds Fix:- Check server is running
- Increase timeout
- Configure always-on
❌ Unauthorized (401)
Message: “Authentication failed” Cause: Invalid API key or missing headers Fix:- Verify API key
- Check Authorization header format
- Ensure key has correct permissions
❌ Not Found (404)
Message: “Endpoint not found” Cause: Wrong URL or path Fix:- Verify endpoint URL
- Check transport type matches
- Test with curl first
❌ No Tools Found
Message: “Connection successful but no tools discovered” Cause:tools/list returned empty array
Fix:
- Check MCP server has tools defined
- Verify tools are registered
- Test
tools/listmanually
Manual Testing with curl
Test Initialize
Test Tools List
Expected Response
Debugging Failed Tests
Enable Debug Logging
In Surfa Platform: Check browser console (F12) for detailed logs:Check Server Logs
Fly.io:Verify Network
Test connectivity:- Ensure port 443 (HTTPS) is open
- Verify no VPN blocking requests
Best Practices
Test Locally First
Validate your MCP works on localhost before deploying
Use curl
Test manually with curl to isolate issues
Check Logs
Review server logs for detailed error messages
Start Simple
Test without auth first, then add complexity
Troubleshooting Guide
Connection times out
Connection times out
Possible causes:
- Server is starting (cold start)
- Network issues
- Firewall blocking requests
- Wait for retry logic to complete
- Check server status:
fly status - Test with curl to verify connectivity
Tools not showing
Tools not showing
Possible causes:
- MCP server not returning tools
- Wrong endpoint path
- Tools not registered
- Test
tools/listmanually with curl - Verify endpoint URL is correct
- Check server logs for errors
Authentication errors
Authentication errors
Possible causes:
- Invalid API key
- Wrong header format
- Missing Authorization header
- Verify API key is correct
- Use format:
Bearer sk_live_... - Check headers are set in MCP config
JSON parse errors
JSON parse errors
Possible causes:
- Invalid JSON response
- Server returning HTML instead of JSON
- CORS issues
- Check server is returning valid JSON
- Verify Content-Type header
- Enable CORS if needed
Next Steps
Remote Deployment
Deploy your MCP to production
Create Scenarios
Build test cases for your MCP
Claude Desktop Setup
Connect Claude Desktop to your MCP
API Reference
Complete API documentation