Encountering connection issues with MCP servers? This comprehensive guide covers common problems, platform-specific solutions, and best practices for establishing reliable MCP connections.
Before diving into troubleshooting, it’s essential to understand how MCP connections work:
Connection Flow
Client Discovery : Cursor/Claude Code discovers MCP servers from configuration
Process Launch : Client spawns server process using specified command
Transport Negotiation : Client and server establish communication channel
Tool Registration : Server advertises available tools to client
Keep-Alive : Connection maintained with periodic health checks
This is the most common issue when setting up MCP servers.
Symptoms:
Red indicator next to MCP server
“No tools found” message
Server not appearing in tool list
Solutions:
# 1. Verify MCP server is enabled
cursor --version # Ensure v0.45+ for MCP support
# 2. Check configuration syntax
cat ~/.cursor/mcp.json # or project-specific .cursor/mcp.json
# 3. Restart Cursor completely
# Close all windows including background processes
Configuration Check:
"args" : [ " -y " , " @your-scope/server-name " ]
Symptoms:
Server doesn’t appear in tool list
No MCP tools available in chat
Connection timeout messages
Solutions:
# 1. List configured servers
# 2. Test server manually
claude mcp test your-server-name
Configuration Example:
# Add server with SSE transport (e.g., Figma)
claude mcp add --transport sse figma-dev-mode http://127.0.0.1:3845/sse
These errors indicate the server process failed to start.
Clear NPX Cache
Verify Dependencies
# Check Node.js version (requires 18+)
# Ensure npx is available
Test Manual Execution
# Try running the server command directly
npx -y @modelcontextprotocol/server-example
Check PATH Configuration
$env:Path += " ;C:\Program Files\nodejs "
# For permanent fix, add via System Properties
export PATH = " /usr/local/bin: $PATH "
Common Auth Problems
API keys not configured
OAuth flow failures
File system permissions
Firewall blocking localhost
Solutions by Type:
"args" : [ " -y " , " @example/server " ],
"API_KEY" : " your-key-here " ,
"API_SECRET" : " your-secret "
For OAuth-based servers (e.g., remote MCP):
claude mcp add --transport sse remote-server https://api.example.com/mcp
# Follow OAuth prompts in browser
# Check for popup blockers
Troubleshooting:
Ensure redirect URLs are whitelisted
Check browser console for errors
Verify OAuth app configuration
# Fix permission issues on Unix systems
chmod +x ~/.npm/_npx/ * /node_modules/ * /dist/index.js
sudo npm install -g @modelcontextprotocol/server-name
PowerShell Execution Issues
Windows users often encounter PowerShell-specific problems with MCP servers.
Problem : Empty PowerShell windows or execution policy errors
Solutions:
# 1. Set execution policy
Set-ExecutionPolicy - ExecutionPolicy RemoteSigned - Scope CurrentUser
# 2. Use full paths instead of npx
" args " : [ " C:\\Users\\YourName\\AppData\\Roaming\\npm\\node_modules\\@scope\\server\\dist\\index.js " ]
# 3. Disable PowerShell window (Cursor specific)
Gatekeeper Blocks
# If macOS blocks execution
xattr -d com.apple.quarantine /path/to/mcp/server
Port Access
# Check if port is in use
lsof -i :3845 # For Figma MCP example
Homebrew Node Issues
# Ensure correct Node version
# 1. Avoid global npm installs with sudo
npm config set prefix ' ~/.npm-global '
echo ' export PATH=~/.npm-global/bin:$PATH ' >> ~/.bashrc
sudo chown -R $( whoami ) ~/.npm
# 3. Use node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
# Test localhost connectivity
curl http://127.0.0.1:3845/sse # Example for Figma
# Alternative: use 0.0.0.0
"url" : " http://0.0.0.0:3845/sse "
netsh advfirewall firewall add rule name= " MCP Server " dir=in action=allow protocol=TCP localport= 3845
sudo pfctl -f /etc/pf.conf
For corporate networks with proxies:
"args" : [ " -y " , " @scope/server " ],
"HTTP_PROXY" : " http://proxy.company.com:8080 " ,
"HTTPS_PROXY" : " http://proxy.company.com:8080 " ,
"NO_PROXY" : " localhost,127.0.0.1 "
Fix for Cursor:
Open Settings (Cmd/Ctrl + ,
)
Search for “HTTP/2”
Enable “Disable HTTP/2”
Restart Cursor
"MCP_TIMEOUT" : " 30000 " , // 30 seconds
"NODE_OPTIONS" : " --max-old-space-size=4096 "
For multiple MCP servers:
// Example configuration for high-load scenarios
" args " : [ " @db/mcp-server " ],
1. Ctrl+Shift+U (Cmd+Shift+U on Mac )
2. Select " MCP Logs " from dropdown
- Authentication failures
- Tool registration errors
claude mcp get server-name -v
claude --debug 2>&1 | grep MCP
# Find stuck MCP processes
tasklist | findstr " node "
# Clean up orphaned processes
// Example recovery configuration
" args " : [ " @scope/server " ],
Configuration Management
Use version control for MCP configs
Separate dev/prod configurations
Document required environment variables
Test configs before deployment
Security Considerations
Never hardcode sensitive credentials
Use read-only database users
Implement rate limiting
Validate input parameters
Monitoring Setup
Enable debug logs in development
Set up health checks
Monitor resource usage
Track connection metrics
Error Handling
Implement graceful degradation
Add retry logic with backoff
Log errors comprehensively
Provide user-friendly messages
When troubleshooting MCP connections, work through this checklist:
Version Check
Cursor v0.45+ or Claude Code latest
Node.js 18+ installed
NPM/NPX working correctly
Configuration Validation
Valid JSON syntax
Correct command and args
Required environment variables set
Network Verification
Server reachable on specified port
No firewall blocking
Proxy settings if applicable
Process Health
No orphaned processes
Sufficient system resources
Correct file permissions
Debug Information
Enable debug logs
Check error messages
Test manual execution
If you’re still experiencing issues:
Gather Debug Information
cursor --version # or claude --version
cat ~/.cursor/mcp.json # or equivalent
# Copy from MCP Logs output
Check Community Resources
Report Issues
Include full error messages
Specify platform and versions
Provide minimal reproduction steps
Mention what you’ve already tried
Remember that MCP is evolving rapidly, so keep your tools updated and check release notes for breaking changes!