Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Webhook.site MCP Servercreate a new webhook endpoint and show me the URL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Webhook.site MCP Server
A production-ready Model Context Protocol (MCP) server for webhook.site - a free service for testing webhooks and HTTP requests. Built with robust error handling, comprehensive validation, and structured logging for reliable operation in production environments.
Architecture
This project follows a layered architecture for maintainability, testability, and production reliability:
Layer Responsibilities
Handlers: MCP tool routing and initial request validation
Services: Business logic, API interactions, and data processing
Models: Data structures, schemas, and tool definitions
Utils: Shared functionality (logging, validation, HTTP client)
Features
Production-Grade Capabilities
✅ Robust Error Handling - Graceful failure recovery with detailed error messages
✅ Input Validation - UUID token validation, configuration value sanitization
✅ Structured Logging - Comprehensive logging for debugging and monitoring
✅ Retry Logic - Exponential backoff for transient API failures
✅ Type Safety - Full type hints throughout the codebase
✅ Async Architecture - Non-blocking I/O for optimal performance
✅ Comprehensive Testing - Unit, integration, and real-world tests
✅ Security First - Input validation, HTTPS enforcement, no hardcoded credentials
16 MCP Tools Available
Tool | Description |
| Create a new webhook endpoint |
| Create with custom response, status, CORS, timeout |
| Send JSON data to a webhook |
| List all captured requests |
| Search with query filters |
| Get most recent request |
| Get webhook settings and stats |
| Modify webhook configuration |
| Delete a specific request |
| Bulk delete with filters |
| Delete a webhook endpoint |
| Get full URL for a token |
| Get email address for a token |
| Get DNS subdomain for a token |
| Wait for new HTTP request (polling) |
| Wait for email with magic link extraction |
Endpoints per Token
Each webhook token provides three unique endpoints:
URL:
https://webhook.site/{token}- for HTTP requestsSubdomain:
https://{token}.webhook.site- alternate URL formatEmail:
{token}@email.webhook.site- for capturing emailsDNS:
{token}.dnshook.site- for DNS lookups
Production Features
This server is built for production reliability and includes:
Error Handling
Graceful Degradation: All API failures return structured error messages
Retry Logic: Automatic retry with exponential backoff for transient failures
Timeout Management: Configurable timeouts prevent hanging operations
Detailed Logging: Every error is logged with context for debugging
Input Validation
UUID Token Validation: Ensures all webhook tokens are valid UUIDs
Configuration Validation: Validates status codes, content types, and CORS settings
Request Sanitization: Safely handles malformed JSON and invalid data
Type Checking: Runtime validation of all input parameters
Logging Infrastructure
Structured Logging: JSON-formatted logs for easy parsing
Log Levels: DEBUG, INFO, WARNING, ERROR levels for different environments
Context Preservation: Request IDs and tokens included in all log entries
Performance Tracking: Operation timing and API response metrics
API Reliability
Connection Pooling: Efficient HTTP client with connection reuse
Exponential Backoff: Smart retry logic for rate limits and transient errors
HTTPS Enforcement: All connections use secure HTTPS
Error Recovery: Automatic recovery from network failures
Security
Security best practices implemented throughout:
Input Security
UUID Validation: All webhook tokens validated against UUID v4 format
Parameter Sanitization: User inputs sanitized before API calls
Type Enforcement: Strict type checking prevents injection attacks
Safe JSON Handling: Malformed JSON handled gracefully without crashes
Credential Management
No Hardcoded Secrets: No API keys or credentials in source code
Environment Variables: Sensitive data managed through environment
Token Isolation: Each webhook token operates independently
Network Security
HTTPS Only: All webhook.site API calls use HTTPS
Timeout Limits: Prevents resource exhaustion from slow responses
Rate Limit Awareness: Respects API rate limits with backoff
Safe Error Messages: Error messages don't leak sensitive information
Installation
Quick Install (Recommended)
Using uvx (no installation needed):
Or install via pip:
For Development
Clone the repository and install dependencies:
Requirements
Python 3.10 or higher
Dependencies:
mcp>=1.1.0- Model Context Protocol SDKhttpx>=0.28.1- Async HTTP clientpytest>=8.3.4- Testing framework (dev)pytest-asyncio>=0.25.2- Async test support (dev)
Configuration
VS Code / Copilot
Add to your .vscode/mcp.json:
Option 1: Using uvx (Recommended)
Option 2: Using pip installation
Option 3: Development mode (local)
Claude Desktop
Add to claude_desktop_config.json:
Development
Running Tests
Run the comprehensive test suite:
Code Quality Standards
This project maintains high code quality standards:
PEP 8 Compliance: All code follows PEP 8 style guidelines
Type Hints: 100% type hint coverage for static analysis
Docstrings: Google-style docstrings for all public functions
Async/Await: Consistent async patterns throughout
Error Handling: All exceptions properly caught and logged
Testing: Comprehensive test coverage for all features
Contributing Guidelines
Fork and Clone: Fork the repository and clone your fork
Create Branch: Create a feature branch (
git checkout -b feature/amazing-feature)Write Tests: Add tests for new functionality
Follow Style: Maintain PEP 8 and existing code patterns
Type Hints: Add type hints to all new functions
Document: Update docstrings and README as needed
Test: Ensure all tests pass (
pytest tests/ -v)Commit: Write clear, descriptive commit messages
Push: Push to your fork and submit a pull request
Project Structure Guidelines
Handlers: Only routing logic, no business logic
Services: All business logic and API interactions
Models: Data structures and schemas only
Utils: Shared utilities used across layers
Tests: Mirror source structure in tests directory
Debugging
Enable debug logging:
Usage Examples
Create a Webhook
Create with Custom Response
Search Requests
Roadmap
PyPI publication
MCP Registry listing
Enhanced webhook statistics
Webhook template library
WebSocket support for real-time updates
Advanced filtering and search capabilities
Version History
v2.0.0 (Current - Production Ready)
✅ Production-grade error handling
✅ Comprehensive input validation
✅ Structured logging infrastructure
✅ Retry logic with exponential backoff
✅ Enhanced security measures
✅ Full type hint coverage
✅ Comprehensive test suite
v1.x (Legacy)
Basic webhook operations
Initial MCP tool implementation
Support
Issues: GitHub Issues
Discussions: GitHub Discussions
Documentation: This README and inline code documentation
License
MIT License - see LICENSE file for details
Acknowledgments
webhook.site - Excellent webhook testing service
Anthropic - Model Context Protocol specification
Python asyncio and httpx communities
Ready for production use • Actively maintained • Contributions welcome