claude-desktop-config.md•2.75 kB
# Claude Desktop Configuration for MCPDB Server
## Configuration Steps
### 1. Locate Claude Desktop Config File
**macOS:**
```
~/Library/Application Support/Claude/claude_desktop_config.json
```
**Windows:**
```
%APPDATA%\Claude\claude_desktop_config.json
```
### 2. Add MCP Server Configuration
Edit the `claude_desktop_config.json` file and add the following configuration:
```json
{
"mcpServers": {
"mcpdb": {
"command": "/Users/jantuitman/develop/mcpdb/mcp-bridge.sh",
"args": [],
"env": {
"MCP_SERVER_URL": "http://localhost:8000/mcp"
}
}
}
}
```
**Important:** Replace `/Users/jantuitman/develop/mcpdb/mcp-bridge.sh` with the actual absolute path to your bridge script.
### 3. Ensure Prerequisites
Before starting Claude Desktop:
1. **Start your Laravel MCP server:**
```bash
cd /Users/jantuitman/develop/mcpdb
./vendor/bin/sail up -d
```
2. **Verify the server is running:**
```bash
curl http://localhost:8000/health
```
Should return: `{"status":"healthy","timestamp":"...","server":"Laravel MCP Server","version":"1.0.0"}`
3. **Test the bridge script (optional):**
```bash
cd /Users/jantuitman/develop/mcpdb
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{"tools":{}},"clientInfo":{"name":"Test","version":"1.0.0"}}}' | ./mcp-bridge.sh
```
### 4. Restart Claude Desktop
After saving the configuration file, completely quit and restart Claude Desktop.
### 5. Test the Integration
In Claude Desktop, try asking:
- "Can you add 5 and 3 for me?"
- "What tools do you have available?"
- "Use the add function to calculate 100 + 200"
Claude should use your MCP server's `add` function to perform the calculations.
## Debugging
### Check Bridge Logs
```bash
tail -f /tmp/mcp-bridge.log
```
### Verify Server Response
```bash
curl -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
```
### Common Issues
1. **Bridge script not executable:** `chmod +x /path/to/mcp-bridge.sh`
2. **Server not running:** Check that `./vendor/bin/sail up -d` is running
3. **Wrong path in config:** Use absolute path to bridge script
4. **Port conflicts:** Ensure port 8000 is available
## Files Created
- `mcp-bridge.sh` - Bridge script that converts stdio ↔ HTTP
- `claude-desktop-config.md` - This configuration guide
- `/tmp/mcp-bridge.log` - Debug log file (created automatically)
## Next Steps
Once this basic setup works, you can:
1. Add more MCP functions to the Laravel server
2. Implement database access tools
3. Add authentication/security features
4. Create more sophisticated data manipulation tools