MCP Troubleshooting
Solutions for common MCP server issues.
Connection Issues
MCP Server Won't Start
Problem: node dist/src/index.js fails to run
Solutions:
- Verify Node.js is installed:
node --version - Check dependencies are installed:
npm install - Rebuild TypeScript:
npm run build - Check for port conflicts:
lsof -i :3000
Can't Connect to Database
Problem: MCP executes commands but gets database connection errors
Solutions:
- Verify connection file exists in project:
ls .envorls default-env.json - Check credentials in connection file are correct
- Verify network access to HANA server
- Test direct connection:
hana-cli connect -s
Project Context Not Working
Problem: MCP ignores projectPath and uses wrong connection
Solutions:
- Ensure
__projectContextis included in tool call - Check projectPath is absolute path (not relative)
- Verify connection file exists at that location
- Enable debug:
DEBUG=hana-cli:* node dist/src/index.js
Command Failures
Command Execution Errors
Problem: Tool call returns error from HANA CLI
Solutions:
- Check command parameters are correct
- Verify schema/table names exist and you have permissions
- Check data types match (especially for import)
- Review error message for specific issue
Permission Denied
Problem: User doesn't have access to schema/table
Solutions:
- Verify user in connection file has necessary permissions
- Check with database admin for grants
- Try with admin/system user temporarily
- Review SAP HANA user privileges
Performance Issues
Slow Queries
Problem: Commands take too long to complete
Solutions:
- Reduce data size with
--limitparameter - Use
--batchSizesmaller values for imports - Add WHERE clause filtering to exports
- Check HANA server load and resources
Memory Issues
Problem: Out of memory errors
Solutions:
- Use smaller
--batchSizevalues - Process data in chunks with
--limit - Use pagination for large result sets
- Increase Node.js heap:
NODE_OPTIONS="--max-old-space-size=4096"
AI Assistant Issues
Claude/AI Can't Call MCP Tools
Problem: AI assistant doesn't see available tools
Solutions:
- Restart Claude Desktop if using it
- Verify MCP server is running
- Check claude_desktop_config.json configuration
- Ensure correct path to MCP executable
AI Gives Wrong Results
Problem: AI assistant returns incorrect data
Solutions:
- Verify schema/table names are correct
- Check project path in context is right project
- Review data in database directly to confirm
- Pass explicit parameters instead of relying on defaults
Debug & Logs
Enable Debug Logging
bash
# Standard debug
DEBUG=hana-cli:* node dist/src/index.js
# Verbose debug
DEBUG=* node dist/src/index.js
# To file
DEBUG=hana-cli:* node dist/src/index.js > debug.log 2>&1Check MCP Logs
Look for messages starting with:
hana-cli:- General messageshana-cli:executor:- Command executionhana-cli:connection:- Connection issues
Getting Help
- Review error message carefully for clues
- Enable debug logging to see what's happening
- Check MCP Architecture documentation
- Review Connection Guide
- Open issue on GitHub
