CLAUDE-DESKTOP-CONFIG-INSTRUCTIONS.md•4.04 kB
# Claude Desktop Configuration Instructions - UPDATED
**Document**: MCP Server Configuration for Claude Desktop
**Version**: 2.0
**Date**: July 7, 2025
## ✅ WORKING CONFIGURATION (Recommended)
Use this shell script approach to ensure proper working directory:
```json
{
"mcpServers": {
"euconquisto-composer": {
"command": "/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc/start-mcp-server.sh",
"args": []
}
}
}
```
**Why this works**: The shell script ensures the correct working directory and environment variables are set.
## Alternative Configurations
### Option 1: Direct npx with absolute path
```json
{
"mcpServers": {
"euconquisto-composer": {
"command": "npx",
"args": [
"tsx",
"/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc/src/working-intelligent-mcp-server.ts"
],
"cwd": "/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc",
"env": {
"NODE_OPTIONS": "--max-old-space-size=4096",
"NODE_ENV": "production"
}
}
}
}
```
### Option 2: Using node with absolute paths
```json
{
"mcpServers": {
"euconquisto-composer": {
"command": "node",
"args": [
"--max-old-space-size=4096",
"/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc/node_modules/.bin/tsx",
"/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc/src/working-intelligent-mcp-server.ts"
],
"cwd": "/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc",
"env": {
"NODE_ENV": "production"
}
}
}
}
```
## Configuration Steps
1. **Update your actual path**: Replace `/Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc` with your actual project path
2. **Copy the configuration**: Use the recommended shell script approach above
3. **Add to Claude Desktop**:
- Open Claude Desktop settings
- Navigate to MCP server configuration
- Replace the existing configuration with the new one
- Save and restart Claude Desktop
4. **Verify shell script permissions**:
```bash
chmod +x /path/to/your/project/start-mcp-server.sh
```
## Troubleshooting Recent Issues
### Issue: "Could not read package.json"
**Cause**: Working directory not set correctly, npm looking in wrong location
**Solution**: Use the shell script approach above which ensures correct working directory
### Issue: ES module errors
**Cause**: TypeScript compilation issues with ES modules
**Solution**: Shell script uses `tsx` which handles TypeScript directly
### Issue: Memory errors
**Cause**: Node.js heap size not properly set
**Solution**: Shell script includes `NODE_OPTIONS="--max-old-space-size=4096"`
## Testing the Configuration
Before updating Claude Desktop, test the server manually:
```bash
# Test the shell script
cd /Users/ricardokawasaki/Desktop/euconquisto-composer-mcp-poc
./start-mcp-server.sh
# Test npx approach
npx tsx src/working-intelligent-mcp-server.ts
# Test npm script
npm run mcp:working
```
If any of these work, then that approach should work in Claude Desktop.
## Expected Behavior
When properly configured, you should see:
- ✅ MCP server "euconquisto-composer" connected in Claude Desktop
- ✅ No error messages about package.json or working directory
- ✅ Tools available for educational content generation
- ✅ Stable connection without frequent disconnections
## Project Files
The configuration uses these files:
- `start-mcp-server.sh` - Shell script wrapper (recommended)
- `src/working-intelligent-mcp-server.ts` - Main MCP server implementation
- `package.json` - Dependencies and npm scripts
- `node_modules/.bin/tsx` - TypeScript runtime
## Support
If you continue to have issues:
1. ✅ Verify the shell script is executable: `ls -la start-mcp-server.sh`
2. ✅ Test the shell script: `./start-mcp-server.sh` (should start server)
3. ✅ Check Claude Desktop logs for specific error messages
4. ✅ Ensure all paths in config match your actual project location