# Troubleshooting

### "No organization context available"

**Problem:** Tool calls fail with missing organization context.

**Solution:**

1. Ensure you completed the OAuth flow successfully
2. Specify the `organization` parameter explicitly
3. Use `getOrganizationsList` to verify access

### "Token expired"

**Problem:** Access token has expired after 1 hour.

**Solution:** Your MCP client should automatically refresh the token. If not, disconnect and reconnect the server.

### "Shop not found"

**Problem:** During authentication, the specified shop cannot be found.

**Solution:**

1. Verify the shop domain is correct (use format: `mystore.myshopify.com`)
2. Ensure the store has Intelligems installed
3. Check that you have access to the organization

### Connection Issues

**Problem:** Cannot connect to MCP server.

**Solution:**

1. Verify the server URL is correct: `https://ai.intelligems.io/mcp` or `https://ai.intelligems.io/mcp/sse`  &#x20;
2. Check your internet connection
3. Ensure your MCP client supports HTTP or SSE transport
4. Check MCP client logs for detailed error messages

**Problem:** "Server disconnected" - Node.js/npx Not Found (Claude Desktop)

**Symptoms:**

* "Server disconnected" error immediately after installation
* Claude Desktop shows "failed" status for Intelligems MCP server
* Logs show: `Failed to spawn process: No such file or directory`

**Root Cause:** Claude Desktop cannot find the `npx` command. This commonly occurs when:

* Node.js is not installed on your system
* Node.js was installed via a version manager (nvm, Proto, asdf, etc.) that doesn't add executables to standard system paths
* Desktop applications don't inherit your terminal's PATH environment

**Solution:**

**Option 1: Install Node.js via Homebrew (Recommended for macOS)**

```bash
# Install Node.js
brew install node

# Create symlinks so Claude Desktop can find it
sudo ln -sf /opt/homebrew/bin/node /usr/local/bin/node
sudo ln -sf /opt/homebrew/bin/npx /usr/local/bin/npx

# Verify installation
/usr/local/bin/node --version
/usr/local/bin/npx --version
```

**Option 2: Symlink Your Existing Node Installation** If you already have Node.js installed via a version manager:

```bash
# Find your node location
which node
which npx

# Create symlinks (replace paths with your actual node/npx locations)
sudo ln -sf $(which node) /usr/local/bin/node
sudo ln -sf $(which npx) /usr/local/bin/npx

# Verify
/usr/local/bin/node --version
/usr/local/bin/npx --version
```

**After either option:**

1. Completely quit Claude Desktop (Cmd+Q or right-click icon > Quit)
2. Reopen Claude Desktop
3. The Intelligems MCP server should now connect successfully

**For Windows users:** Ensure Node.js is installed from [nodejs.org](https://nodejs.org/) and added to your system PATH during installation.
