Quick Diagnosis

Most issues are caused by an incorrect Node.js version being used. Start here:
1

Check Node.js Version

Verify your Node.js version is 18 or higher:
node --version
If you see a version below 18, you’ll need to upgrade.
2

Check Your PATH

If your Node.js version looks correct but you’re still getting errors, check your PATH:
echo $PATH
Look for Node.js paths in the output. If you see multiple Node.js versions, the first one in the PATH will be used. You can set the PATH environment variable in your mcp config to override what node version is being used.
3

Verify Environment Variables

Check that your environment variables are set correctly. See the environment variables section for reference.

Common Issues

’fetch’ is not defined errors

This is the most common error and typically indicates a Node.js version issue. If the quick diagnosis above didn’t solve your problem, try forcing a specific Node.js version:
1

Force Node.js Version

You can force the MCP server to use a specific Node.js version by setting the PATH environment variable:
{
  "mcpServers": {
    "sei": {
      "command": "npx",
      "args": ["-y", "@sei-js/mcp-server"],
      "env": {
        "PATH": "/path/to/your/node/bin"
      }
    }
  }
}
Replace /path/to/your/node/bin with the actual path to your preferred Node.js version.
Quick Path Finder: Run dirname $(which npx) to get the correct path to use.

NVM Version Conflicts

If you’re using NVM (Node Version Manager), you might have multiple Node.js versions installed.
1

Check NVM Versions

Check your installed versions:
nvm list
Look for versions below 18 that might be taking precedence.
2

Option 1: Remove Problematic Versions

Uninstall Node.js versions below 18:
nvm uninstall 16.15.0
nvm uninstall 14.21.3
# ... uninstall other versions below 18
This will prevent conflicts with older versions.
3

Option 2: Force Specific Version

Alternatively, you can force the MCP server to use a specific Node.js version by setting the PATH environment variable:
{
  "mcpServers": {
    "sei": {
      "command": "npx",
      "args": ["-y", "@sei-js/mcp-server"],
      "env": {
        "PATH": "/Users/yourname/.nvm/versions/node/v18.18.0/bin:/usr/local/bin:/usr/bin:/bin"
      }
    }
  }
}

Environment Variable Issues

Many issues stem from incorrect environment variable configuration.
1

Check Your Configuration

Verify your environment variables are set correctly. Common issues include:
  • WALLET_MODE: Should be "disabled" or "private-key"
  • PRIVATE_KEY: Must be 0x-prefixed hex string when using private-key mode
  • RPC URLs: Should be valid URLs if you’re overriding defaults
2

Test Configuration

Try running with minimal configuration first:
{
  "mcpServers": {
    "sei": {
      "command": "npx",
      "args": ["-y", "@sei-js/mcp-server"]
    }
  }
}
If this works, gradually add your environment variables back.
3

Reference Documentation

See the Environment Variables section for complete documentation of all available options.

Error Reference

'fetch' is not defined

Cause: Node.js version below 18 or PATH pointing to wrong Node.js version Solution: Upgrade Node.js or fix PATH as shown above

'Cannot find module'

Cause: Package not installed or network issues Solution: Check internet connection and try reinstalling the package

'Permission denied'

Cause: Insufficient permissions to execute npx Solution: Ensure npx is executable or use full path to Node.js binary

'RPC connection failed'

Cause: Invalid RPC URL or network connectivity issues Solution: Check your RPC URLs and internet connection

Getting Help

Before Reporting an Issue

  1. Check this troubleshooting guide - Your issue might already be covered
  2. Verify your environment - Ensure Node.js 18+ and correct PATH
  3. Test with minimal config - Try the basic setup first
  4. Check environment variables - Verify all settings are correct

Reporting Issues

If you’re still experiencing problems, please create an issue on GitHub with the following information:
1

Environment Details

Include:
  • Operating system and version
  • Node.js version (node --version)
  • MCP client (Cursor, Claude Desktop, etc.)
  • Your PATH (echo $PATH)
2

Configuration

Share your MCP configuration (remove private keys):
{
  "mcpServers": {
    "sei": {
      "command": "npx",
      "args": ["-y", "@sei-js/mcp-server"],
      "env": {
        "WALLET_MODE": "disabled"
        // ... other env vars (no private keys)
      }
    }
  }
}
3

Error Messages

Include the complete error message and any relevant logs.
4

Steps to Reproduce

Describe exactly what you did to encounter the issue.
Security: Never include private keys or sensitive information when reporting issues. Use placeholder values instead.

Community Support