Troubleshooting¶
This guide covers common issues and their solutions when using MCPOmni Connect.
Configuration Issues¶
"Failed to connect to server: Session terminated"¶
This is the most common connection issue with several possible causes:
Session Terminated Error
Error: Failed to connect to server 'server-name': Session terminated
Possible Causes & Solutions:
1. Wrong Transport Type¶
Solution: Check your server's documentation for the correct transport type
{
"filesystem": {
"transport_type": "stdio",
"command": "uvx",
"args": ["mcp-server-filesystem", "/tmp"]
}
}
2. OAuth Configuration Mismatch¶
Solution: Remove the auth
section and use headers instead:
{
"api-server": {
"transport_type": "streamable_http",
"url": "http://localhost:8080/mcp",
"headers": {
"Authorization": "Bearer your-token"
}
}
}
3. Server Not Running¶
Solution: Start your MCP server first, then connect with MCPOmni Connect
# Example: Start a local MCP server
uvx mcp-server-filesystem /tmp &
# Then start MCPOmni Connect
mcpomni_connect
4. Wrong URL or Port¶
Solution: Verify the server's actual address and port
# Check if server is listening
curl http://localhost:8080/health
# Or use netstat to see listening ports
netstat -tlnp | grep 8080
"Started callback server on http://localhost:3000" - Is This Normal?¶
OAuth Callback Server
Yes, this is completely normal when: - You have "auth": {"method": "oauth"}
in any server configuration - The OAuth server handles authentication tokens automatically - You cannot and should not try to change this address
If you don't want the OAuth server: - Remove "auth": {"method": "oauth"}
from all server configurations - Use alternative authentication methods like Bearer tokens
{
"server": {
"auth": {"method": "oauth"},
"url": "http://example.com/mcp"
}
}
{
"server": {
"url": "http://example.com/mcp",
"headers": {
"Authorization": "Bearer token"
}
}
}
Authentication Issues¶
Invalid API Key Errors¶
API Key Problems
Error: Invalid API key
or Authentication failed
OpenAI API Key Issues¶
# Check your .env file
cat .env | grep LLM_API_KEY
# Verify key format (should start with sk-)
LLM_API_KEY=sk-your-key-here
# Test key directly
curl -H "Authorization: Bearer $LLM_API_KEY" \
https://api.openai.com/v1/models
Anthropic API Key Issues¶
# Anthropic keys start with sk-ant-
LLM_API_KEY=sk-ant-your-key-here
# Test key
curl -H "x-api-key: $LLM_API_KEY" \
https://api.anthropic.com/v1/messages
Environment Variable Not Loaded¶
# Check if environment variable is loaded
echo $LLM_API_KEY
# Restart MCPOmni Connect to reload .env
mcpomni_connect
OAuth Authentication Failures¶
OAuth Issues
Error: OAuth authentication failed
Solutions:
-
Port 3000 Already in Use
-
Browser Not Opening
-
Firewall Blocking Localhost
Server Configuration Issues¶
JSON Syntax Errors¶
Configuration Parsing
Error: JSON decode error
or Invalid configuration
Common JSON Mistakes:
{
"LLM": {
"provider": "openai",
"model": "gpt-4o-mini" // ❌ Trailing comma
},
"mcpServers": {
"server": {
"url": "http://example.com" // ❌ Missing comma
"timeout": 60
}
}
}
{
"LLM": {
"provider": "openai",
"model": "gpt-4o-mini"
},
"mcpServers": {
"server": {
"url": "http://example.com",
"timeout": 60
}
}
}
Validation Tools:
Missing Required Fields¶
Required Configuration
Error: Missing required field
Check Required Fields:
{
"LLM": {
"provider": "openai", // ✅ Required
"model": "gpt-4o-mini" // ✅ Required
},
"mcpServers": {} // ✅ Required (can be empty)
}
Runtime Issues¶
Tool Execution Failures¶
Tool Errors
Error: Tool execution failed
or Tool timeout
Timeout Issues¶
{
"AgentConfig": {
"tool_call_timeout": 60 // Increase from default 30
}
}
# Enable debug mode for detailed logs
/debug
# Check tool availability
/tools
# Test simple command first
/tools
Permission Denied¶
# Check file permissions
ls -la /path/to/file
# Ensure MCPOmni Connect has necessary permissions
chmod +r /path/to/file
Memory Issues¶
Redis Connection
Error: Could not connect to Redis
Solutions:
-
Redis Not Running
-
Wrong Redis Configuration
-
Disable Redis Memory
Rate Limiting¶
API Limits
Error: Rate limit exceeded
or Too many requests
Solutions:
-
Reduce Request Frequency
-
Switch to Different Provider
-
Check Current Usage
Network Issues¶
Connection Timeouts¶
Network Timeouts
Error: Connection timeout
or Request timeout
Solutions:
-
Increase Timeout Values
-
Check Network Connectivity
Firewall Issues¶
Connection Blocked
Error: Connection refused
or Network unreachable
Solutions:
-
Check Firewall Rules
-
Corporate Firewall
Performance Issues¶
Slow Response Times¶
Performance Problems
Issue: MCPOmni Connect is responding slowly
Diagnosis:
-
Enable Debug Mode
-
Check API Stats
Solutions:
-
Optimize Model Settings
-
Reduce Context Length
High Token Usage¶
Token Consumption
Issue: Running out of tokens quickly
Solutions:
-
Set Token Limits
-
Use More Efficient Models
Debugging Tools¶
Built-in Debug Features¶
# Enable verbose logging
/debug
# Check system status
/status
# View current configuration
/connections
# Check API usage
/api_stats
# Refresh server connections
/refresh
Log Analysis¶
# Check application logs
tail -f mcpomni_connect.log
# Filter for errors
grep ERROR mcpomni_connect.log
# Check specific server logs
grep "server-name" mcpomni_connect.log
Environment Verification¶
# Check Python version
python --version
# Check installed packages
pip list | grep mcpomni
# Verify environment variables
env | grep LLM_API_KEY
# Test configuration file
python -m json.tool servers_config.json
Getting Help¶
Before Asking for Help¶
- Enable Debug Mode:
/debug
- Check Logs: Look for error messages
- Verify Configuration: Validate JSON syntax
- Test Simple Cases: Try basic operations first
Information to Include¶
When reporting issues, include:
- MCPOmni Connect version:
mcpomni_connect --version
- Python version:
python --version
- Operating system:
uname -a
(Linux/Mac) orver
(Windows) - Configuration (remove sensitive data):
- Complete error message
- Steps to reproduce
Support Channels¶
- GitHub Issues: Report bugs
- GitHub Discussions: Ask questions
- Email: abiolaadedayo1993@gmail.com
Next: User Guide →