Great! Let's test the SAP OData MCP server with Claude Desktop. Here's a step-by-step guide to get it working:
## **๐ง Step 1: Configure Claude Desktop**
### **Add to Claude Desktop Config:**
**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
**Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
```json
{
"mcpServers": {
"sap-odata": {
"command": "node",
"args": ["/full/path/to/your/sap-odata-mcp-server/dist/index.js"],
"env": {
"SAP_ODATA_BASE_URL": "https://mmc-s4sap06.mmc.1stbasis.com:44300/sap/opu/odata/sap/",
"SAP_USERNAME": "your-username",
"SAP_PASSWORD": "your-password",
"SAP_CLIENT": "your-client",
"SAP_VALIDATE_SSL": "false"
}
}
}
}
```
**Important**: Replace `/full/path/to/your/sap-odata-mcp-server/` with your actual project path!
## **๐๏ธ Step 2: Build and Prepare**
```bash
# Make sure everything is built
npm run build
# Verify the dist folder exists
ls dist/
```
## **๐ Step 3: Restart Claude Desktop**
1. **Quit Claude Desktop completely**
2. **Restart Claude Desktop**
3. **Look for the ๐ icon** in a new chat
## **๐งช Step 4: Test Commands in Claude**
### **Test 1: Check Available Tools**
```
What SAP tools do you have available?
```
Expected: Claude should list SAP OData tools like `sap_connect`, `sap_get_services`, etc.
### **Test 2: Check Connection Status**
```
Check SAP connection status
```
Expected: Should show "No SAP OData connection established"
### **Test 3: Connect to SAP**
```
Connect to SAP OData service at https://mmc-s4sap06.mmc.1stbasis.com:44300/sap/opu/odata/sap/ using username [YOUR_USERNAME] and password [YOUR_PASSWORD]
```
Replace with your actual credentials.
### **Test 4: If Connection Works - Get Services**
```
Get list of available OData services
```
### **Test 5: If You Find Services - Get Metadata**
```
Get metadata for service [SERVICE_NAME]
```
## **๐ Troubleshooting**
### **If Claude doesn't see the tools:**
1. **Check config file location**:
```bash
# macOS
cat ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
type %APPDATA%\Claude\claude_desktop_config.json
```
2. **Verify server path**:
```bash
# Test the path directly
node /full/path/to/your/sap-odata-mcp-server/dist/index.js
```
3. **Check Claude Desktop logs**:
- **macOS**: `~/Library/Logs/Claude/`
- **Windows**: `%LOCALAPPDATA%/Claude/logs/`
### **If connection fails in Claude:**
1. **Test locally first**:
```bash
npm run test:discovery
npm run test:connection
```
2. **Try different URL** if discovery found alternatives
3. **Check credentials** are correct in config
## **๐ Example Claude Conversation:**
Once working, you should be able to have conversations like:
**You**: "What SAP tools do you have?"
**Claude**: "I have several SAP OData tools available:
- sap_connect: Connect to SAP OData service
- sap_get_services: Get list of available OData services
- sap_query_entity_set: Query data with filtering and pagination
- ..."
**You**: "Connect to our SAP system"
**Claude**: "I'll connect to your SAP OData service..." *[uses the environment variables from config]*
**You**: "Show me all available services"
**Claude**: "Here are the available SAP OData services..." *[lists actual services from your SAP system]*
## **โ
Success Indicators:**
- **๐ Icon appears** in Claude chat
- **Tools are listed** when asked
- **Connection succeeds** without errors
- **Services are discovered** from your SAP system
- **Data can be queried** from entity sets
## **โ Common Issues:**
| Issue | Solution |
|-------|----------|
| No ๐ icon | Check config file path and syntax |
| "Tool not found" | Verify server builds and path is correct |
| Connection fails | Run local discovery tool first |
| SSL errors | Set `SAP_VALIDATE_SSL: "false"` in config |
Try these steps and let me know what happens! The key is getting the correct OData URL from the discovery tool first.