HTTP Server Mode
The WhoisXML API MCP Server supports HTTP server mode using modern Streamable HTTP transport for web-based integrations and scenarios where multiple clients need to share a single server instance.
WhoisXML API Hosted Service
The WhoisXML API team provides a hosted instance of this MCP server that you can use immediately without any deployment. Simply configure your MCP client with:
URL: https://mcp-hosted.whoisxmlapi.com/mcp
Configuration Example:
{
"mcpServers": {
"whoisxmlapi": {
"url": "https://mcp-hosted.whoisxmlapi.com/mcp"
}
}
}
Authentication is handled automatically via OAuth2 — you sign in with your WhoisXML API account or enter your API key once during the connect flow (free tier available), so your key never lives in your config files.
What is HTTP Server Mode?
HTTP server mode runs the MCP server as a stateless HTTP server that communicates using streamable HTTP transport instead of stdio. This enables:
- Remote AI service access - AI services can connect over HTTP
- Multiple client support - one server instance for multiple AI clients
- Automation tool integration - tools like n8n can connect to remote MCP servers
- HTTP-based communication instead of stdin/stdout
When to Use HTTP Server Mode
Recommended For:
- Remote AI service access - AI services connecting over HTTP
- Automation platforms like n8n (self-hosted or cloud)
- Multiple AI clients sharing one server
- Distributed deployments where stdio isn't feasible
- Multi-tenant hosted services - deploy with per-request authentication
Not Recommended For:
- Single desktop client usage (use stdio mode)
- Direct editor integration (stdio is simpler)
- Simple automation scripts (stdio is more direct)
Security Consideration
When running in HTTP server mode with a token configured via environment variable, anyone who can connect to your server will be able to use your API token.
- Do NOT expose the server to the public internet without proper authentication and security measures
- Use the hosted service at
https://mcp-hosted.whoisxmlapi.com/mcpif you need public access - For self-hosted deployments, restrict access using firewalls, VPNs, or reverse proxy authentication
- Consider using the hosted service for multi-user scenarios where per-request token isolation is needed
Basic Usage
Command Line
Start the server in HTTP mode using any installation method:
Using Binary
# Basic HTTP mode (default port 3000)
mcp-whoisxmlapi --http
# Specify custom port
mcp-whoisxmlapi --http --http-port 8080
# With environment variables
export WHOISXMLAPI_TOKEN="your-token"
mcp-whoisxmlapi --http --http-port 3000
Using npm
# Basic HTTP mode
export WHOISXMLAPI_TOKEN="your-token"
npx @whoisxmlapidotcom/mcp-whoisxmlapi --http
# Custom port
npx @whoisxmlapidotcom/mcp-whoisxmlapi --http --http-port 8080
Using Docker
# Basic HTTP mode
docker run --rm -p 3000:3000 \
-e WHOISXMLAPI_TOKEN=your-token \
whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
--http --http-port 3000
# Custom port
docker run --rm -p 8080:8080 \
-e WHOISXMLAPI_TOKEN=your-token \
whoisxmlapidotcom/mcp-whoisxmlapi:v1 \
--http --http-port 8080
Debugging HTTP Mode
Monitor your HTTP server and troubleshoot issues:
# Find your HTTP container
docker ps --filter "ancestor=whoisxmlapidotcom/mcp-whoisxmlapi"
# Check if HTTP endpoint is responding
curl -i http://localhost:3000/mcp
# Test the endpoint with a simple MCP request
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"tools/list","params":{}}'
# Check container logs for HTTP-specific output
docker logs -f <container-id> | grep -i http
# Test port accessibility
netstat -tlnp | grep :3000
API Endpoints
The HTTP server exposes a single main endpoint that handles all MCP communication:
/mcp - MCP Protocol Endpoint
POST /mcp
This endpoint handles all MCP protocol communication using streamable HTTP transport. It automatically negotiates the best transport method (direct HTTP responses or streaming) based on the request type and client capabilities.
Request Headers:
Content-Type: application/json
Request Body:
{
"jsonrpc": "2.0",
"id": "1",
"method": "tools/list",
"params": {}
}
Response: HTTP response containing MCP protocol message, potentially using streaming for server-initiated notifications.
Integration with Automation Tools
n8n Integration Example:
When configuring n8n (self-hosted or cloud) to connect to your MCP server:
- Server URL:
http://your-server:3000/mcp - HTTP Method:
POST - Content-Type:
application/json
Protocol Details
The HTTP server mode uses streamable HTTP transport which:
- Automatically handles protocol negotiation between direct HTTP and streaming modes
- Supports server-initiated notifications when needed
- Operates in stateless mode - each request is completely independent
- Provides better error handling than traditional SSE implementations
- Follows MCP specification for HTTP transport
- Fast shutdown - no session state to clean up
Tool sets
A client that does not need all of the tools can pick a smaller named set, so the model reads fewer tool definitions. A set hides the other tools from the tool list, from tool_search and from calls (a call to a hidden tool answers "tool not found"), and the server instructions and prompts follow it: a hidden tool is described as turned off, and a prompt is offered only when the tools it sends the model to are available. domain_risk uses domain_profile where the connection has it and the separate lookups where it does not. It changes no prices and disables nothing on the server.
| Set | Tools | For |
|---|---|---|
core | whois, dns_lookup, ipgeolocation, ssl_certificates, domain_reputation, threat_intelligence, domain_availability, account_balance, domain_profile, ip_profile | the everyday one-domain questions |
security | core, plus ip_netblocks, dns_history, subdomain_lookup, domain_and_subdomain_discovery, reverse_ip, reverse_mx, reverse_ns, reverse_dns, typosquatting, categorization, website_screenshot, vpn_proxy_detection, bulk_dns_lookup, bulk_ip_geolocation, bulk_vpn_proxy_detection, bulk_subdomain_lookup, infrastructure_pivot, lookalike_triage | infrastructure pivots and their bulk forms |
brand | typosquatting, brand_alert, domain_and_subdomain_discovery, domain_availability, bulk_domain_availability, whois, dns_lookup, ssl_certificates, domain_reputation, threat_intelligence, website_screenshot, account_balance, domain_profile, lookalike_triage | find lookalikes, check whether they are taken, then look at each one |
sales | whois, categorization, website_screenshot, dns_lookup, ipgeolocation, email_verification, disposable_email_check, bulk_whois, bulk_email_verification, bulk_job_status, bulk_job_results, account_balance | qualify a company from its domain and check contact addresses |
all | every tool | the same as choosing no set |
The tools reverse_whois, reverse_whois_advanced, whois_history, registrant_alert and domain_info are in all only. tool_search, when it is on, is always shown.
Choosing a set. Add ?tools=<name> to the MCP address, for example https://mcp-hosted.whoisxmlapi.com/mcp?tools=core. Several names make the union of their sets (?tools=core,brand), and all among them means every tool. Names are not case-sensitive. A name the server does not know is ignored, with a warning in the server log; with no known name the connection gets the server's default. At most five names are read, from the first 64 bytes.
Server default. For a self-hosted server, set WHOISXMLAPI_TOOL_SETS (same syntax) to make a set the default for every connection that picks none. A name that is not a set stops the server at start, with an error that lists the valid sets. With neither the address option nor the variable, every tool is shown, as before.
The usage guide leaves out lines about tools a set hides or the server turned off, and the advanced reverse WHOIS syntax guide is listed only where reverse_whois_advanced is available. The credits table lists every tool. The server card lists the server's default tools: every tool, or the set that WHOISXMLAPI_TOOL_SETS names. It is built once at start, so a set chosen per connection does not change it.
Sign-in
Connections that use an API key work with ?tools=. Whether a client can sign in through an address with a query depends on the client, so if a sign-in fails on a ?tools= address, connect with an API key or use the plain address.
Cache hints
For clients on protocol version 2026-07-28 and later, the server tells the client how long it may reuse a list or reference answer (ttlMs), always with the private scope, so a shared cache never serves one caller's answer to another:
| Request | ttlMs |
|---|---|
tools/list | 300000 (5 minutes) |
prompts/list, resources/list, resources/read | 3600000 (1 hour) |
Earlier clients get no hints, as before. The hints are advisory: a client may always ask again.
To turn them off for one server, set WHOISXMLAPI_CACHE_HINT_TTL_MS=0, which gives ttlMs: 0 on every request, as before the hints existed. Any other whole number of milliseconds replaces both figures above. An unset, negative or non-numeric value keeps the defaults. The server reads it at start.
Streamable HTTP Transport
The server uses modern Streamable HTTP transport which provides:
- Automatic protocol negotiation between direct HTTP and streaming modes
- Server-initiated notifications when needed
- Stateless operation - each request is completely independent
- Better error handling than traditional implementations
- Standards compliance with the MCP specification
- Fast shutdown - no session state to clean up
This modern approach replaces older SSE-based implementations while maintaining full compatibility with MCP clients.
TLS/SSL Configuration
The MCP server runs HTTP only and does not provide built-in TLS/SSL support. For production deployments requiring HTTPS, use a reverse proxy to handle TLS termination.
Recommended Approach: Reverse Proxy
Why use a reverse proxy?
- Security: Professional TLS termination with proper certificate management
- Performance: Optimized SSL/TLS handling and caching
- Flexibility: Easy certificate renewal and security policy updates
- Industry Standard: Common practice for production HTTP services
Popular Reverse Proxy Options
Nginx Configuration Example
server {
listen 443 ssl http2;
server_name your-domain.com;
ssl_certificate /path/to/your/certificate.crt;
ssl_private_key /path/to/your/private.key;
# Modern SSL configuration
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384;
ssl_prefer_server_ciphers off;
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Docker with Traefik
version: '3.8'
services:
mcp-server:
image: whoisxmlapidotcom/mcp-whoisxmlapi:v1
command: ["--http", "--http-port", "3000"]
environment:
- WHOISXMLAPI_TOKEN=your-token
labels:
- "traefik.enable=true"
- "traefik.http.routers.mcp.rule=Host(`your-domain.com`)"
- "traefik.http.routers.mcp.tls=true"
- "traefik.http.routers.mcp.tls.certresolver=letsencrypt"
- "traefik.http.services.mcp.loadbalancer.server.port=3000"
Local Development
For local development and testing, plain HTTP is perfectly acceptable:
# Development - HTTP only
mcp-whoisxmlapi --http --http-port 3000
# Access locally
curl http://localhost:3000/mcp
Security Considerations
For production deployments:
- Always use HTTPS via reverse proxy
- Restrict network access - bind to localhost when using reverse proxy
- Enable rate limiting at the reverse proxy level
- Monitor access logs for security analysis
Troubleshooting
Common Issues
- Port already in use: Change the port with
--http-port - Connection refused: Ensure the server is running and firewall allows the port
- Authentication errors: Verify your
WHOISXMLAPI_TOKENenvironment variable is set - Timeout issues: Check network connectivity and API quotas
Health Check
Test server health:
# Simple health check
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"ping","params":{}}' \
| jq .
Expected response:
{
"jsonrpc": "2.0",
"id": "1",
"result": {}
}