Fix OpenClaw MCP Server Errors
MCP Server Failed to Connect
OpenClaw uses the Model Context Protocol (MCP) to connect agents to external tools. When an MCP server fails to start or connect, agents lose access to those tools entirely. The fix depends on whether it is a spawn, network, or protocol error.
MCP server errors in OpenClaw fall into three categories: the server process fails to start (spawn errors), the server starts but cannot be reached (connection errors), or the server connects but speaks a different protocol version (version mismatch).
Next Step
Fix now, then reduce repeat incidents
If this issue keeps coming back, validate your setup in Doctor first, then harden your config.
Jump to Fix
What the Errors Look Like
Spawn / ENOENT Errors
stdio-based MCP servers are started by OpenClaw as child processes. If the command is not found, you get a spawn ENOENT error.
# Check if the MCP server binary is installed which npx # for npx-based servers which uvx # for Python uv-based servers which node # for Node-based servers # Test the server command directly npx -y @modelcontextprotocol/server-filesystem /tmp # Check PATH used by OpenClaw openclaw config get system.env.PATH
Common fix: set full binary path
OpenClaw's PATH may differ from your shell's. Use absolute paths in your MCP server config:
Connection Refused (HTTP/SSE Servers)
For HTTP or SSE-based MCP servers, OpenClaw connects to a running process over a port. "Connection refused" means the server is not running or is on the wrong port.
# Test SSE endpoint curl http://localhost:3001/sse # Check what is listening on the port lsof -i :3001 # macOS/Linux netstat -ano | findstr 3001 # Windows # Start the MCP server manually to see errors npx @modelcontextprotocol/server-filesystem /tmp
Tool Call Timeout
If the MCP server connects but tool calls time out, the server is running but responding too slowly or hanging.
# Increase tool call timeout (default: 30s) openclaw config set mcp.toolCallTimeout 60000 # Restart and test openclaw gateway restart
Server performing slow operations
Database queries, file system operations, or network calls inside the MCP server may exceed the default 30s timeout. Increase timeout or optimize the server.
Server process is hanging
The MCP server process may be deadlocked. Check server logs and restart it. Look for infinite loops or blocking I/O.
Large response payloads
MCP tool responses over ~1MB can cause timeouts. Paginate results or truncate large outputs in your MCP server.
Protocol Version Mismatch
MCP is an evolving protocol. If your server was built for an older version, you may see version mismatch errors.
# Update OpenClaw to latest npm update -g openclaw # Update npx-based MCP servers (they auto-update on next run) npx -y @modelcontextprotocol/server-filesystem --version # For npm-installed servers npm update -g @modelcontextprotocol/server-filesystem
Using Claude Desktop MCP Servers with OpenClaw
MCP servers configured in Claude Desktop can be reused in OpenClaw. Find your Claude Desktop config:
# macOS cat ~/Library/Application\ Support/Claude/claude_desktop_config.json # Windows type %APPDATA%\Claude\claude_desktop_config.json # Linux cat ~/.config/Claude/claude_desktop_config.json
Copy the mcpServers entries into your OpenClaw skill config. The format is compatible.
Enable MCP Debug Logging
# Enable verbose MCP logging openclaw config set log.level debug openclaw config set mcp.debug true openclaw gateway restart # Tail logs to see MCP messages openclaw logs --follow | grep -i mcp
Still Not Working?
Run the Doctor
Or use the web Error Doctor โ paste your MCP error for instant diagnosis.
Related Errors
MCP errors often appear alongside these:
Did this guide solve your problem?