Skip to content

Conversation

@guram-evinced
Copy link

Summary

This PR adds support for configurable HOST binding address to enable deployment in containerized environments like Docker and Kubernetes.

Changes

Core Implementation

  • src/config.ts: Added HOST environment variable with default 127.0.0.1
  • src/sse_server.ts: Updated HTTP and HTTPS server binding to use configurable HOST

Documentation

  • README.md: Added HOST to configuration options table
  • docs/sse-transport.md: Added HOST configuration and usage examples

Motivation

The server was hardcoded to bind to 127.0.0.1 (localhost only), which prevented external access in production environments:

  • Kubernetes deployments couldn't receive health probe requests
  • Docker containers couldn't expose the server externally
  • Load balancers and ingress controllers couldn't reach the server

Solution

Added a configurable HOST environment variable that:

  • Defaults to 127.0.0.1: Maintains secure localhost binding for local development
  • Allows 0.0.0.0: Enables external access when explicitly configured via environment variable
  • No breaking changes: Existing installations continue to work without modification

Usage

Local Development (Default)

# Binds to 127.0.0.1 (localhost only)
npx @taazkareem/clickup-mcp-server

Production/Kubernetes

# Binds to 0.0.0.0 (external access)
HOST=0.0.0.0 PORT=8080 ENABLE_SSE=true npx @taazkareem/clickup-mcp-server

Kubernetes Deployment

env:
  - name: HOST
    value: "0.0.0.0"
  - name: PORT
    value: "8080"
  - name: ENABLE_SSE
    value: "true"

Security Considerations

Secure by default: Defaults to 127.0.0.1 (localhost only)
Opt-in for production: Requires explicit HOST=0.0.0.0 configuration
No breaking changes: Existing users unaffected
Works with existing security features: Compatible with HTTPS, origin validation, rate limiting

Testing

Tested in production Kubernetes cluster:

  • ✅ Health probes working correctly
  • ✅ Ingress routing functional
  • ✅ Service discovery operational
  • ✅ Local development unaffected

Related Issues

This enables proper deployment in containerized environments and resolves binding issues in Kubernetes.


CC: @taazkareem - This change enables the ClickUp MCP Server to run in production Kubernetes environments while maintaining secure defaults for local development.

- Add HOST environment variable to config.ts with default '127.0.0.1'
- Update sse_server.ts to use configurable HOST for HTTP and HTTPS servers
- Add HOST to README.md configuration table
- Maintains secure localhost default for local development
- Allows 0.0.0.0 binding for production/Kubernetes via environment variable
- Add HOST to configuration options table in sse-transport.md
- Include example of using HOST=0.0.0.0 for external access
- Provides guidance for Docker/Kubernetes deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant