Overview
The WebHelp MCP Server can be customized through environment variables, Next.js configuration, and MCP handler options. This guide covers all available configuration points.Environment Variables
While the server works without any environment variables for basic deployments, you can configure proxy settings for corporate environments.Proxy Configuration
Primary HTTPS proxy URL for outbound requests to WebHelp deployments.Example:
Alternative lowercase variant of HTTPS_PROXY (fallback).
HTTP proxy URL for outbound requests (used if HTTPS_PROXY is not set).
Alternative lowercase variant of HTTP_PROXY (fallback).
How Proxy Variables Are Used
The proxy configuration is used when the server makes requests to external WebHelp deployments, particularly for semantic search via the Oxygen Feedback service:lib/webhelp-search-client.ts
Next.js Configuration
The server uses a minimal Next.js configuration that can be extended innext.config.ts.
Default Configuration
next.config.ts
Custom Configuration Options
You can extend this configuration to add custom settings:MCP Handler Options
The MCP handler is configured inapp/[...site]/route.ts with several customizable options.
Current Configuration
app/[...site]/route.ts
Available Handler Options
The endpoint path for the MCP server. Dynamically set based on the requested site.Default:
/${endpoint} (e.g., /docs.example.com)Enable detailed logging for debugging. Logs include:
- Incoming request paths
- Tool invocations with parameters
- Search and fetch operations
false in production to reduce log volume.Maximum duration in seconds for MCP requests. Important for:
- Large documentation sites with extensive search indexes
- Network-constrained environments
- Rate limiting and resource management
Disable Server-Sent Events (SSE) for streaming responses.Note: Currently commented out. Enable if you encounter streaming issues:
Search Tool Configuration
The search tool can be customized to adjust result limits and behavior:app/[...site]/route.ts
Maximum number of search results returned to the AI model.Considerations:
- More results provide better context but increase token usage
- Fewer results reduce costs but may miss relevant content
- Adjust based on your documentation size and AI model limits
WebHelp Search Client Options
TheWebHelpSearchClient is initialized with base URLs for documentation sites:
app/[...site]/route.ts
Federated Search
The server supports federated search across multiple WebHelp deployments:Access federated search using the
/federated/{encoded-urls} endpoint format. URLs are encoded using the url-pack utility.Semantic Search Configuration
Semantic search via Oxygen Feedback is automatically enabled when available:lib/webhelp-search-client.ts
Number of results to request from the semantic search API.
Advanced Configuration
Custom HTML to Markdown Conversion
The Turndown service can be customized inlib/webhelp-search-client.ts:204-208:
Article Extraction
The server extracts content from<article> elements. Customize in lib/webhelp-search-client.ts:230-241:
Example: Production Configuration
Here’s a complete example for a production deployment:Next Steps
Vercel Deployment
Deploy your configured server to Vercel
Security
Secure your production deployment