|
| 1 | +# Configuration Guide |
| 2 | + |
| 3 | +This document covers environment variables, server configuration, and deployment options for the incident.io MCP server. |
| 4 | + |
| 5 | +## Environment Variables |
| 6 | + |
| 7 | +### Required |
| 8 | + |
| 9 | +- **`INCIDENT_IO_API_KEY`** - Your incident.io API key for authentication |
| 10 | + - Obtain from your incident.io account settings |
| 11 | + - Required for all API operations |
| 12 | + |
| 13 | +### Optional |
| 14 | + |
| 15 | +- **`INCIDENT_IO_BASE_URL`** - Base URL for incident.io API |
| 16 | + - Default: `https://api.incident.io/v2` |
| 17 | + - Only change if using a different incident.io instance |
| 18 | + |
| 19 | +## Configuration Files |
| 20 | + |
| 21 | +### `.env` File |
| 22 | + |
| 23 | +Create a `.env` file in the project root for local development: |
| 24 | + |
| 25 | +```bash |
| 26 | +# Copy from example |
| 27 | +cp .env.example .env |
| 28 | + |
| 29 | +# Edit with your values |
| 30 | +INCIDENT_IO_API_KEY=your_api_key_here |
| 31 | +# INCIDENT_IO_BASE_URL=https://api.incident.io/v2 # Optional |
| 32 | +``` |
| 33 | + |
| 34 | +## MCP Client Configuration |
| 35 | + |
| 36 | +### Claude Desktop |
| 37 | + |
| 38 | +Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`): |
| 39 | + |
| 40 | +```json |
| 41 | +{ |
| 42 | + "mcpServers": { |
| 43 | + "incident-io": { |
| 44 | + "command": "/path/to/your/project/start-mcp-server.sh", |
| 45 | + "env": { |
| 46 | + "INCIDENT_IO_API_KEY": "your_api_key_here" |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | +} |
| 51 | +``` |
| 52 | + |
| 53 | +### Other MCP Clients |
| 54 | + |
| 55 | +For other MCP clients, configure them to: |
| 56 | + |
| 57 | +1. Execute the `start-mcp-server.sh` script |
| 58 | +2. Set the `INCIDENT_IO_API_KEY` environment variable |
| 59 | +3. Optionally set `INCIDENT_IO_BASE_URL` if needed |
| 60 | + |
| 61 | +## Server Options |
| 62 | + |
| 63 | +### Standard Server |
| 64 | + |
| 65 | +```bash |
| 66 | +./start-mcp-server.sh |
| 67 | +``` |
| 68 | + |
| 69 | +- Minimal startup validation |
| 70 | +- Graceful handling of missing API key |
| 71 | + |
| 72 | +### Validated Server |
| 73 | + |
| 74 | +```bash |
| 75 | +./start-with-env.sh |
| 76 | +``` |
| 77 | + |
| 78 | +- Validates API key is set before starting |
| 79 | +- Auto-builds server if binary is missing |
| 80 | +- Exits with error if API key is missing |
| 81 | + |
| 82 | +## Deployment Considerations |
| 83 | + |
| 84 | +### Docker |
| 85 | + |
| 86 | +If deploying with Docker, ensure environment variables are passed: |
| 87 | + |
| 88 | +```dockerfile |
| 89 | +ENV INCIDENT_IO_API_KEY=${INCIDENT_IO_API_KEY} |
| 90 | +``` |
| 91 | + |
| 92 | +### System Service |
| 93 | + |
| 94 | +When running as a system service, ensure: |
| 95 | + |
| 96 | +1. Environment variables are properly set |
| 97 | +2. Working directory is set to the project root |
| 98 | +3. Binary has appropriate permissions |
| 99 | + |
| 100 | +### Security Notes |
| 101 | + |
| 102 | +- **Never commit API keys to version control** |
| 103 | +- Use environment variables or secure secret management |
| 104 | +- Restrict file permissions on configuration files containing secrets |
| 105 | +- Consider using dedicated service accounts with minimal required permissions |
| 106 | + |
| 107 | +## API Rate Limits |
| 108 | + |
| 109 | +The incident.io API has rate limits. The server handles these gracefully, but be aware: |
| 110 | + |
| 111 | +- Plan API usage according to your incident.io plan limits |
| 112 | +- Consider caching strategies for frequently accessed data |
| 113 | +- Monitor API usage through incident.io dashboard |
| 114 | + |
| 115 | +## Troubleshooting Configuration |
| 116 | + |
| 117 | +### Missing API Key |
| 118 | + |
| 119 | +``` |
| 120 | +Error: INCIDENT_IO_API_KEY environment variable is not set |
| 121 | +``` |
| 122 | + |
| 123 | +**Solution**: Set the API key in your `.env` file or environment |
| 124 | + |
| 125 | +### Invalid API Key |
| 126 | + |
| 127 | +``` |
| 128 | +Authentication failed |
| 129 | +``` |
| 130 | + |
| 131 | +**Solution**: Verify your API key is correct and has necessary permissions |
| 132 | + |
| 133 | +### Connection Issues |
| 134 | + |
| 135 | +``` |
| 136 | +Failed to connect to incident.io API |
| 137 | +``` |
| 138 | + |
| 139 | +**Solutions**: |
| 140 | + |
| 141 | +- Check network connectivity |
| 142 | +- Verify `INCIDENT_IO_BASE_URL` if using custom endpoint |
| 143 | +- Check firewall settings |
0 commit comments