# Claude Integration Test Examples
This document shows exactly how to test the Price Service MCP with Claude Desktop after installation.
## π§ Setup Instructions
1. **Build and Install the MCP Server**:
```bash
cd /path/to/price-service-mcp
npm install
npm run build
```
2. **Configure Claude Desktop**:
Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"price-service": {
"command": "node",
"args": ["/Users/orphil/Desktop/Claude Code Buildout/PRICING MCP/build/index.js"]
}
}
}
```
3. **Restart Claude Desktop** completely
## π¬ Test Conversations
### Test 1: Basic Price Query
**You say to Claude:**
> "What's the current Bitcoin price?"
**Expected Claude Response:**
Claude should use the `get_price` tool and return something like:
> I'll get the current Bitcoin price for you.
>
> The current Bitcoin price is $110,768.89 USD. Here are the details:
> - Open: $112,976.01
> - High: $113,439.99
> - Low: $109,683.96
> - Volume: 10,041.88 BTC
### Test 2: Specific Exchange Request
**You say to Claude:**
> "Get Ethereum price from Binance"
**Expected Claude Response:**
Claude should call `get_price` with `fromSym: "ETH"` and `service: "binance"`
### Test 3: Historical Price
**You say to Claude:**
> "What was Bitcoin's price yesterday?"
**Expected Claude Response:**
Claude should calculate yesterday's timestamp and call the MCP tool with `timestampSEC`
### Test 4: Different Currency
**You say to Claude:**
> "Show me Solana price in EUR"
**Expected Claude Response:**
Claude should use `get_price` with `fromSym: "SOL"` and `toFiat: "EUR"`
### Test 5: Health Check
**You say to Claude:**
> "Check if the price service is working"
**Expected Claude Response:**
Claude should use the `health_check` tool and report the service status
## π Debugging
### Check MCP Server is Loaded
**You say to Claude:**
> "What tools do you have available?"
Claude should mention price-related tools if the MCP server loaded correctly.
### Manual Tool Testing
**You say to Claude:**
> "Use the get_price tool to get Bitcoin price"
This forces Claude to use the specific tool directly.
### Check for Errors
If Claude says it can't access price data:
1. **Check Claude Desktop logs** (usually in Console.app on Mac)
2. **Verify the path** in claude_desktop_config.json
3. **Test the build** by running: `node build/index.js` manually
4. **Check permissions** on the build directory
## π Validation Checklist
- [ ] MCP server builds without errors (`npm run build`)
- [ ] Configuration file has correct path
- [ ] Claude Desktop restarted after config change
- [ ] Claude can see price-service tools when asked about available tools
- [ ] Basic Bitcoin price query works
- [ ] Different cryptocurrencies work (ETH, SOL, etc.)
- [ ] Different exchanges work (coinbase, binance)
- [ ] Health check tool works
- [ ] Error handling works (try invalid symbol)
## π― Success Criteria
β
**Your integration is working if:**
- Claude can fetch current cryptocurrency prices
- Claude can use different exchanges (coinbase, binance, kraken)
- Claude can fetch historical prices with timestamps
- Claude can convert to different fiat currencies
- Claude handles errors gracefully (invalid symbols, service down)
- Health check reports service status
## π Common Issues
### "Tool not available"
- MCP server not configured correctly
- Wrong path in claude_desktop_config.json
- Claude Desktop not restarted
### "Connection refused" or "Service unavailable"
- Price service API is down
- Network connectivity issues
- Firewall blocking requests
### "Invalid response format"
- MCP server crashed during startup
- Dependencies not installed (`npm install`)
- Build failed (`npm run build`)
## π Getting Help
If you encounter issues:
1. Check the console output when running: `node build/index.js`
2. Verify the test script works: `node examples/test-calls.js`
3. Check Claude Desktop application logs
4. Ensure all dependencies are installed and up to date
The MCP server should provide clear error messages in Claude when something goes wrong.