INSPECTOR.md•3.47 kB
# MCP Inspector Setup
This project includes setup for using the official MCP Inspector to explore and debug your Oura Ring MCP server.
## What is MCP Inspector?
MCP Inspector is the official debugging tool for Model Context Protocol servers. It provides a web-based interface to:
- **Connect to your server** and view connection status
- **Test tools** with custom inputs and see execution results
- **Browse resources** and view their content
- **Test prompts** with different arguments
- **Monitor server communications** in real-time
## Usage
### 1. Build your server first
```bash
npm run build
```
### 2. Run MCP Inspector
```bash
# Run inspector with built server
npm run inspector
# Or run with TypeScript source (development)
npm run inspector:dev
```
### 3. Open your browser
The inspector will start and show you:
- **Client UI**: http://localhost:5173 (default)
- **MCP Proxy Server**: http://localhost:3000 (default)
### 4. Explore your server
Once connected, you can:
- View all 17+ available Oura Ring tools
- Test tools like `get_sleep`, `get_activity`, `get_readiness`
- See tool schemas and parameter requirements
- Execute tools with sample data ranges
- Monitor API responses and errors
## Custom Ports
If you need to use different ports:
```bash
CLIENT_PORT=8080 SERVER_PORT=9000 npm run inspector
```
## Available Tools to Test
Your Oura Ring MCP server provides these tools to explore:
### Health Data
- `get_personal_info` - User profile information
- `get_sleep` - Sleep scores and stages
- `get_activity` - Steps, calories, activity levels
- `get_readiness` - Daily readiness scores
- `get_heart_rate` - Heart rate measurements
### Daily Summaries
- `get_daily_sleep` - Daily sleep summaries
- `get_daily_activity` - Daily activity summaries
- `get_daily_readiness` - Daily readiness summaries
- `get_daily_stress` - Daily stress levels
### Workouts & Sessions
- `get_workouts` - Exercise sessions
- `get_sessions` - Breathing, meditation sessions
- `get_tags` - User-created tags
### Configuration
- `get_sleep_time` - Bedtime and wake time
- `get_rest_mode_periods` - Rest mode periods
- `get_ring_configuration` - Ring settings
### Webhooks (Advanced)
- `get_webhook_subscriptions` - List webhooks
- `create_webhook_subscription` - Create new webhook
- `delete_webhook_subscription` - Delete webhook
## Example Testing Workflow
1. **Start with personal info**: Test `get_personal_info` (no parameters needed)
2. **Try sleep data**: Test `get_sleep` with date range like:
```json
{
"start_date": "2024-01-01",
"end_date": "2024-01-07"
}
```
3. **Explore activity**: Test `get_activity` with the same date range
4. **Test pagination**: Use `next_token` from responses for large datasets
## Requirements
- Node.js 18+
- Valid `OURA_ACCESS_TOKEN` in your `.env` file
- Internet connection for Oura API calls
## Troubleshooting
**Inspector won't start**: Make sure you've built the project first with `npm run build`
**Server connection fails**: Check that your `.env` file has a valid `OURA_ACCESS_TOKEN`
**EACCES permission errors**: The inspector scripts now use `node` to execute the built files properly
**Tools show errors**: Verify your Oura token has the necessary permissions and hasn't expired
**Need different ports**: Use the custom port environment variables shown above
**Connection errors**: If you see "spawn EACCES" errors, restart the inspector with `npm run inspector`