- 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`).
* feat: Enhance run-server.sh with uv-first Python environment setup
- Implement uv-first approach for faster environment setup when available
- Add automatic WSL environment detection using wslvar for better Windows integration
- Improve system package installation by using bash -c for better command execution
- Add comprehensive environment validation and fallback mechanisms
- Optimize dependency installation with uv when environment supports it
- Enhance configuration display workflow for better user experience
- Add environment markers to track uv-created environments
- Improve error handling and user messaging throughout setup process
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add .claude/settings.local.json to .gitignore
Personal Claude Code settings should not be tracked in source control.
Reference: https://docs.anthropic.com/en/docs/claude-code/settings🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: Add shared Claude Code settings.json for team defaults
- Add .claude/settings.json with default permissions for team use
- Remove .claude/settings.local.json from git tracking (now personal config)
Reference: https://docs.anthropic.com/en/docs/claude-code/settings🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address Gemini Code Assist review issues in run-server.sh
- Fix hardcoded Unix paths (lines 563 & 568) with cross-platform detection
- Improve error handling by capturing uv stderr instead of /dev/null
- Fix uv environment detection logic to check uv_created marker file
Resolves three issues identified in PR review:
1. High Priority: Replace hardcoded $VENV_PATH/bin/python with detection
2. Medium Priority: Capture and display uv command errors for debugging
3. Medium Priority: Use marker file instead of path matching for uv detection
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: Address additional Gemini Code Assist feedback
- Enhance WSL warning message with more helpful guidance
- Add security comment explaining bash -c usage over eval
- Add get_venv_python_path helper function for cleaner cross-platform detection
- Improve path resolution error handling with proper error checking
Addresses 4 additional review points from gemini-code-assist to improve
user experience, code clarity, and error handling robustness.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>
## Description
This PR adds support for selectively disabling tools via the DISABLED_TOOLS environment variable, allowing users to customize which MCP tools are available in their Zen server instance. This feature enables better control over tool availability for security, performance, or organizational requirements.
## Changes Made
- [x] Added `DISABLED_TOOLS` environment variable support to selectively disable tools
- [x] Implemented tool filtering logic with protection for essential tools (version, listmodels)
- [x] Added comprehensive validation with warnings for unknown tools and attempts to disable essential tools
- [x] Updated `.env.example` with DISABLED_TOOLS documentation and examples
- [x] Added comprehensive test suite (16 tests) covering all edge cases
- [x] No breaking changes - feature is opt-in with default behavior unchanged
## Configuration
Add to `.env` file:
```bash
# Optional: Tool Selection
# Comma-separated list of tools to disable. If not set, all tools are enabled.
# Essential tools (version, listmodels) cannot be disabled.
# Available tools: chat, thinkdeep, planner, consensus, codereview, precommit,
# debug, docgen, analyze, refactor, tracer, testgen
# Examples:
# DISABLED_TOOLS= # All tools enabled (default)
# DISABLED_TOOLS=debug,tracer # Disable debug and tracer tools
# DISABLED_TOOLS=planner,consensus # Disable planning tools
Moved aliases as part of SUPPORTED_MODELS instead of shorthand, more in line with how custom_models are declared
Further refactoring to cleanup some code
## Description
This PR implements a new [DIAL](https://dialx.ai/dial_api) (Data & AI Layer) provider for the Zen MCP Server, enabling unified access to multiple AI models through the DIAL API platform. DIAL provides enterprise-grade AI model access with deployment-specific routing similar to Azure OpenAI.
## Changes Made
- [x] Added support of atexit:
- Ensures automatic cleanup of provider resources (HTTP clients, connection pools) on server shutdown
- Fixed bug using ModelProviderRegistry.get_available_providers() instead of accessing private _providers
- Works with SIGTERM/Ctrl+C for graceful shutdown in both development and containerized environments
- [x] Added new DIAL provider (`providers/dial.py`) inheriting from `OpenAICompatibleProvider`
- [x] Updated server.py to register DIAL provider during initialization
- [x] Updated provider registry to include DIAL provider type
- [x] Implemented deployment-specific routing for DIAL's Azure OpenAI-style endpoints
- [x] Implemented performance optimizations:
- Connection pooling with httpx for better performance
- Thread-safe client caching with double-check locking pattern
- Proper resource cleanup with `close()` method
- [x] Added comprehensive unit tests with 16 test cases (`tests/test_dial_provider.py`)
- [x] Added DIAL configuration to `.env.example` with documentation
- [x] Added support for configurable API version via `DIAL_API_VERSION` environment variable
- [x] Added DIAL model restrictions support via `DIAL_ALLOWED_MODELS` environment variable
### Supported DIAL Models:
- OpenAI models: o3, o4-mini (and their dated versions)
- Google models: gemini-2.5-pro, gemini-2.5-flash (including search variant)
- Anthropic models: Claude 4 Opus/Sonnet (with and without thinking mode)
### Environment Variables:
- `DIAL_API_KEY`: Required API key for DIAL authentication
- `DIAL_API_HOST`: Optional base URL (defaults to https://core.dialx.ai)
- `DIAL_API_VERSION`: Optional API version header (defaults to 2025-01-01-preview)
- `DIAL_ALLOWED_MODELS`: Optional comma-separated list of allowed models
### Breaking Changes:
- None
### Dependencies:
- No new dependencies added (uses existing OpenAI SDK with custom routing)
* feat: Update Claude model references from v3 to v4
- Update model configurations from claude-3-opus to claude-4-opus
- Update model configurations from claude-3-sonnet to claude-4-sonnet
- Maintain backward compatibility through existing aliases (opus, sonnet, claude)
- Update provider registry preferred models list
- Update all test cases and assertions to reflect new model names
- Update documentation and examples consistently across all files
- Add Claude 4 model support while preserving existing functionality
Files modified: 15 (config, docs, providers, tests, tools)
Pattern: Systematic claude-3-* → claude-4-* model reference migration
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* PR feedback: changed anthropic/claude-4-opus -> anthropic/claude-opus-4 and anthropic/claude-4-haiku -> anthropic/claude-3.5-haiku
* changed anthropic/claude-4-sonnet -> anthropic/claude-sonnet-4
* PR feedback removed specific model from test mock
* PR feedback removed base.py
---------
Co-authored-by: Omry Nachman <omry@wix.com>
Co-authored-by: Claude <noreply@anthropic.com>
Description: This feature adds support for UTF-8 encoding in JSON responses, allowing for proper handling of special characters and emojis.
- Implement unit tests for UTF-8 encoding in various model providers including Gemini, OpenAI, and OpenAI Compatible.
- Validate UTF-8 support in token counting, content generation, and error handling.
- Introduce tests for JSON serialization ensuring proper handling of French characters and emojis.
- Create tests for language instruction generation based on locale settings.
- Validate UTF-8 handling in workflow tools including AnalyzeTool, CodereviewTool, and DebugIssueTool.
- Ensure that all tests check for correct UTF-8 character preservation and proper JSON formatting.
- Add integration tests to verify the interaction between locale settings and model responses.
* fix: remove duplicate version tool registration
The version tool was appearing twice in the MCP tool list due to:
- VersionTool class properly registered in TOOLS dictionary (line 181)
- Hardcoded Tool() registration in handle_list_tools() (lines 451-462)
This duplicate was leftover from the architectural migration:
- June 8, 2025: Original hardcoded "get_version" tool added
- June 14, 2025: Renamed from "get_version" to "version"
- June 21, 2025: VersionTool class added during workflow architecture migration
- The old hardcoded registration was never removed
The hardcoded registration has been removed since VersionTool provides
identical functionality through the proper architecture.
Fixes: BeehiveInnovations/zen-mcp-server#120
* fix: complete removal of legacy version tool code
Following up on the duplicate version tool fix, this commit removes
all remaining dead code identified by Gemini Code Assist:
- Removed dead elif block for version tool (lines 639-643)
This block was unreachable since version is handled by TOOLS registry
- Removed orphaned handle_version() function (lines 942-1030)
No longer called after elif block removal
- Fixed imports: removed unused __author__ and __updated__ imports
These were remnants from the June 2025 migration from function-based
to class-based tools. The VersionTool class now handles all version
functionality through the standard tool architecture.
All 546 tests pass - no functional changes.
Related to: BeehiveInnovations/zen-mcp-server#120