Unhook MCP Server
Use Unhook’s webhook data through the Model Context Protocol A Model Context Protocol (MCP) server implementation that integrates Unhook for webhook debugging and analysis capabilities. Our MCP server provides access to your webhook events, requests, and analytics through AI assistants like Claude and Cursor.Features
- Webhook event monitoring and analysis
- Request inspection and debugging
- Performance metrics and failure analysis
- Real-time webhook data access
- Cloud and self-hosted support
- SSE transport support
Installation
You can either use our remote hosted URL or run the server locally. Get your API key from your Unhook dashboard at https://unhook.sh/app/api-keys.Remote hosted URL
Running with npx
Manual Installation
Try out our MCP Server on MCP.so’s playground or integrate with your favorite AI assistant.
Configuration
Environment Variables
Required for Cloud API
UNHOOK_API_KEY
: Your Unhook API key- Required when using cloud API (default)
- Get this from https://unhook.sh/app/api-keys
UNHOOK_API_URL
(Optional): Custom API endpoint for self-hosted instances- Example:
https://api.your-domain.com
- If not provided, the cloud API will be used (requires API key)
- Example:
Optional Configuration
Retry Configuration
UNHOOK_RETRY_MAX_ATTEMPTS
: Maximum number of retry attempts (default: 3)UNHOOK_RETRY_INITIAL_DELAY
: Initial delay in milliseconds before first retry (default: 1000)UNHOOK_RETRY_MAX_DELAY
: Maximum delay in milliseconds between retries (default: 10000)UNHOOK_RETRY_BACKOFF_FACTOR
: Exponential backoff multiplier (default: 2)
Rate Limiting
UNHOOK_RATE_LIMIT_REQUESTS
: Maximum requests per minute (default: 60)UNHOOK_RATE_LIMIT_WINDOW
: Rate limit window in milliseconds (default: 60000)
Configuration Examples
Basic Cloud Configuration
Self-Hosted Configuration
Running on Different Platforms
Running on Cursor
Add Unhook MCP server to CursorManual Installation
Note: Requires Cursor version 0.45.6+ To configure Unhook MCP in Cursor v0.48.6:- Open Cursor Settings
- Go to Features > MCP Servers
- Click ”+ Add new global MCP server”
- Enter the following code:
- Open Cursor Settings
- Go to Features > MCP Servers
- Click ”+ Add New MCP Server”
- Enter the following:
- Name: “unhook” (or your preferred name)
- Type: “command”
- Command:
env UNHOOK_API_KEY=your-api-key npx -y @unhook/mcp-server
If you are using Windows and are running into issues, try cmd /c "set UNHOOK_API_KEY=your-api-key && npx -y @unhook/mcp-server"
Replace your-api-key
with your Unhook API key. If you don’t have one yet, you can get it from https://unhook.sh/app/api-keys.
After adding, refresh the MCP server list to see the new tools. The Composer Agent will automatically use Unhook MCP when appropriate, but you can explicitly request it by describing your webhook debugging needs.
Running on Windsurf
Add this to your./codeium/windsurf/model_config.json
:
Running with SSE Mode
To run the server using Server-Sent Events (SSE) locally instead of the default stdio transport:http://localhost:3000/sse
or https://unhook.sh/api/mcp/{YOUR_API_KEY}/sse
Running on VS Code
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressingCtrl + Shift + P
and typing Preferences: Open User Settings (JSON)
.
.vscode/mcp.json
in your workspace. This will allow you to share the configuration with others:
Running on Claude Desktop
Add this to the Claude config file:Rate Limiting and Performance
The server utilizes Unhook’s built-in rate limiting and performance optimization:- Automatic rate limit handling with exponential backoff
- Efficient data pagination for large datasets
- Smart request caching and deduplication
- Automatic retries for transient errors
Available Tools
1. Search Events Tool (search_events
)
Search webhook events with advanced filtering options.
2. Search Requests Tool (search_requests
)
Search webhook requests with detailed filtering.
3. Analyze Event Tool (analyze_event
)
Get detailed analysis of a specific webhook event.
4. Analyze Request Tool (analyze_request
)
Get detailed analysis of a specific webhook request.
5. Get Webhook Stats Tool (get_webhook_stats
)
Get comprehensive statistics for webhooks.
6. Create Test Event Tool (create_test_event
)
Create a test webhook event for debugging.
7. Debug Webhook Issue Tool (debug_webhook_issue
)
Get intelligent debugging assistance for webhook issues.
8. Performance Report Tool (performance_report
)
Generate comprehensive performance reports.
Available Resources
Recent Events (webhook://events/recent
)
Access the most recent webhook events with metadata.
Recent Requests (webhook://requests/recent
)
Access the most recent webhook requests with response data.
Webhook List (webhook://webhooks/list
)
Get all configured webhooks in your organization.
Active Connections (webhook://connections/active
)
View currently active webhook connections.
Statistics Overview (webhook://stats/overview
)
Get high-level statistics for all webhooks.
Logging System
The server includes comprehensive logging:- Connection status and authentication
- Request/response performance metrics
- Error conditions and retry attempts
- Rate limit tracking
Error Handling
The server provides robust error handling:- Automatic retries for transient errors
- Rate limit handling with backoff
- Detailed error messages with context
- Authentication error recovery
- Network resilience
Usage Examples
Debugging Failed Webhooks
Ask your AI assistant:- “Show me all failed webhook events from the last hour”
- “Why are my Stripe webhooks failing?”
- “Analyze the error patterns in my webhook requests”
Performance Analysis
Ask your AI assistant:- “What’s the average response time for my webhooks?”
- “Which webhooks have the highest failure rate?”
- “Generate a performance report for my payment webhooks”
Request Inspection
Ask your AI assistant:- “Show me the payload for event evt_123”
- “What headers were sent with the last GitHub webhook?”
- “Compare successful vs failed requests for my Clerk webhook”
Security
Authentication
- All MCP requests require authentication via your Unhook API key
- API keys are scoped to your organization’s data only
- Never share your API key publicly
Data Access
- MCP servers can only access data you have permission to view
- All data transmission is encrypted over HTTPS
- No webhook data is stored by the AI assistant
Best Practices
- Use environment-specific API keys for development vs production
- Rotate your API keys regularly
- Review MCP access logs in your dashboard
Troubleshooting
Connection Issues
AI assistant can't connect to Unhook
AI assistant can't connect to Unhook
- Verify your configuration file syntax is valid JSON
- Check that your API key is correct and not expired
- Ensure you’re using HTTPS (not HTTP) in the URL
- Restart your AI assistant after configuration changes
No webhook data appearing
No webhook data appearing
- Confirm you have webhooks configured in your dashboard
- Check that your API key has the correct permissions
- Verify you’re in the right organization
- Try manually triggering a webhook to generate data
Authentication errors
Authentication errors
- Regenerate your API key in the dashboard
- Ensure the API key is properly formatted in the configuration
- Check for extra spaces or characters in the API key
- Verify the API key hasn’t expired
Rate limiting issues
Rate limiting issues
- Check your current rate limits in the dashboard
- Reduce the frequency of requests
- Use pagination to limit data size
- Contact support if you need higher limits
Performance
The MCP server limits responses to prevent overwhelming AI assistants:
- Events: Maximum 100 per request
- Requests: Maximum 100 per request
- Use search filters to find specific data
- Enable pagination for large datasets
Development
Contributing
- Fork the repository
- Create your feature branch
- Run tests:
npm test
- Submit a pull request
Support
Need help with MCP integration?- Check our GitHub discussions
- Join our Discord community
- Email support at support@unhook.sh