forked from BeehiveInnovations/pal-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add remote hosting capability with HTTP/SSE transport #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
crystalin
wants to merge
57
commits into
main
Choose a base branch
from
feature/remote-mcp-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Created build.sh script for building the Docker image with environment variable checks. - Added deploy.sh script for deploying the Zen MCP Server with health checks and logging. - Implemented healthcheck.py to verify server process, Python imports, log directory, and environment variables. - Developed comprehensive tests for Docker configuration, environment validation, and integration with MCP. - Included performance tests for Docker image size and startup time. - Added validation script tests to ensure proper Docker and MCP setup.
…ding Feat: Local support with utf 8 encoding
Feat: Add comprehensive Docker support and documentation for Zen MCP Server
…nused MCP configuration tests
…cript with API key validation and connectivity checks
…cp-server into feat-dockerisation
…r; update .dockerignore and README. Fix error in API key detection in Docker deployment script.
- Implemented `run-server.ps1` for setting up the Zen MCP server environment, including virtual environment creation, dependency installation, and Docker cleanup. - Added logging and error handling throughout the setup process. - Included functions for validating API keys and configuring integration with Claude Desktop and Gemini CLI. - Created `run_integration_tests.ps1` to execute integration tests with real API calls, including checks for API key availability and environment setup. - Enhanced output with color-coded messages for better user experience. Patch directory added for cross-platform patching support (`patch_crossplatform.py`).
Added new confidence values (very_high, almost_certain) to all workflow tools to provide more granular confidence tracking. Updated enum declarations in: - analyze.py, codereview.py, debug.py, precommit.py, secaudit.py, testgen.py - Updated debug.py's get_required_actions to handle new confidence values - All tools now use consistent 7-value confidence scale - refactor.py kept its unique scale (exploring/incomplete/partial/complete) Also fixed model thinking configuration: - Added very_high and almost_certain to MODEL_THINKING_PREFERENCES - Set medium thinking for very_high, high thinking for almost_certain - Updated prompts to clarify certain means 100% local confidence 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…er initialization order is correct. Fix run-server.ps1 to handle PowerShell script creation correctly and ensure pip is installed in the uv environment.
- Add HTTP/SSE transport mode alongside existing stdio mode - Implement http_server.py with Starlette/Uvicorn for remote hosting - Add authentication middleware with Bearer token support - Update server.py to support --transport flag for mode selection - Add web dependencies (starlette, uvicorn, PyJWT, python-multipart) - Update run-server.sh with new transport options - Add comprehensive remote deployment documentation - Include Docker and docker-compose configuration examples - Update .env.example with HTTP server configuration options - Maintain full backward compatibility with stdio mode This enables users to host Zen MCP Server remotely and connect via URL. Co-Authored-By: Claude <[email protected]>
- Remove Dockerfile, docker-compose.yml, and .dockerignore - Update remote deployment guide to use PM2 instead of Docker - Replace Docker references with systemd and PM2 alternatives - Simplify deployment options for better maintainability Co-Authored-By: Claude <[email protected]>
- Remove CORSMiddleware from http_server.py - Remove MCP_CORS_ORIGINS configuration from .env.example - Update documentation to clarify server is for MCP clients only - Simplify security model by removing cross-origin concerns The server is designed for MCP protocol clients, not web browsers. Co-Authored-By: Claude <[email protected]>
- Added --non-interactive flag to run-server.sh - Auto-detect non-interactive mode when no TTY available - Skip all interactive prompts in non-interactive mode: - Python installation prompts - Claude CLI/Desktop integration prompts - Gemini CLI integration prompts - Fix issue where service startup fails due to interactive prompts - Update help documentation with new flag and examples This allows the script to run properly when deployed as a systemd service or in other non-interactive environments.
- Replace Bearer token authentication with x-api-key header - Update AuthenticationMiddleware to check x-api-key header - Change MCP_AUTH_TOKEN to MCP_API_KEY in .env.example - Update run-server.sh to check for MCP_API_KEY - Update all documentation to reflect API key usage - Align with Claude's remote MCP authentication pattern This provides a more standard API key authentication approach that is commonly used in API services and matches Claude's implementation.
- Move message handler mounting to lifespan function - Ensure SSE transport is initialized before mounting - Remove redundant on_event startup handler - Fix race condition where handler was mounted before transport existed
- Remove Production Deployment section (systemd, PM2) - Remove nginx reverse proxy configuration - Remove Cloud Deployment Examples (AWS, GCP, Heroku) - Keep only essential remote deployment information - Simplify documentation to focus on basic HTTP/SSE setup
…ts for health checks Update the Docker README and create a Docker Deployment guide in the docs folder
…olume persistence - Introduced tests for Docker deployment scripts to ensure existence, permissions, and proper command usage. - Added tests for Docker integration with Claude Desktop, validating MCP configuration and command formats. - Implemented health check tests for Docker, ensuring script functionality and proper configuration in Docker setup. - Created tests for Docker MCP validation, focusing on command validation and security configurations. - Developed security tests for Docker configurations, checking for non-root user setups, privilege restrictions, and sensitive data handling. - Added volume persistence tests to ensure configuration and logs are correctly managed across container runs. - Updated .dockerignore to exclude sensitive files and added relevant tests for Docker secrets handling.
…tion feat: Add Docker support and documentation
…teform_compatibility Feat: Cross-Plateform Compatibily
Add uvx support
…ith you blindly and undoing the _correct_ strategy because you were wrong Fixed run script to ensure pip is installed
Automatically determine MCP client's name
Screenshots with and without zen for Challenge tool
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Changes
Core Implementation
http_server.py) with Starlette/Uvicornx-api-keyheader withMCP_API_KEYenv var--non-interactiveflag for systemd/service deploymentKey Features
https://your-server.com:8000/sse)/healthConfiguration
MCP_API_KEY: API key for authenticationMCP_REQUIRE_AUTH: Enable/disable authentication (default: true)MCP_HOST: Host to bind to (default: 127.0.0.1)MCP_PORT: Port to bind to (default: 8000)Documentation
docs/remote-deployment.mdwith setup instructions.env.examplewith new configuration optionsBug Fixes
/messages/endpoint by properly mounting handlerUsage
Testing
🤖 Generated with Claude Code