Commit Graph

32 Commits

Author SHA1 Message Date
谢栋梁
471af60e90 Merge remote-tracking branch 'upstream/main' into feat/native-claude-cli-detection 2025-12-07 00:08:17 +08:00
Fahad
b2dc84992d fix: rebranding, see [docs/name-change.md](docs/name-change.md) for details 2025-12-04 18:15:14 +04:00
谢栋梁
adc6231b98 feat: support native installed Claude CLI detection
Add automatic detection for Claude CLI installed via native methods:
- curl https://claude.ai/install.sh | bash -> ~/.local/bin/claude
- brew install --cask claude-code -> /opt/homebrew/bin/claude (Apple Silicon)
- brew install --cask claude-code -> /usr/local/bin/claude (Intel Mac/Linux)

When claude is not found in PATH, the script checks these paths in order
and adds the first found to PATH, with informative log messages.

Closes #303
2025-12-03 16:24:15 +08:00
Fahad
2ec64ba748 fix: replaced deprecated Codex web search configuration 2025-11-18 10:37:31 +04:00
Fahad
d36489fdc9 fix:sed usage https://github.com/BeehiveInnovations/zen-mcp-server/issues/287 2025-10-21 11:06:18 +04:00
Fahad
d2773f488a fix: configure codex with a longer timeout
refactor: param names
2025-10-21 10:35:44 +04:00
Fahad
97ba7e44ce feat: codex supports web-search natively but needs to be turned on, run-server script asks if the user would like this done
fix: improved prompt for codex to avoid calling apilookup in a loop thinking it's a web-tool
2025-10-06 10:55:22 +04:00
Fahad
fe9968b633 feat: support for Qwen Code 2025-10-04 23:07:50 +04:00
Fahad
ce56d16240 feat: Codex CLI support
docs: Update instructions to discover uvx automatically, may not be installed system wide
2025-08-26 11:08:16 +04:00
Fahad
4b202f5d1d feat: refactored and tweaked model descriptions / schema to use fewer tokens at launch (average reduction per field description: 60-80%) without sacrificing tool effectiveness
Disabled secondary tools by default (for new installations), updated README.md with instructions on how to enable these in .env
run-server.sh now displays disabled / enabled tools (when DISABLED_TOOLS is set)
2025-08-22 09:23:59 +04:00
Sven Lito
7c6ec4a928 fix: resolve pip detection inconsistency in non-interactive shells
- Convert virtual environment Python paths to absolute paths to ensure
  consistency across different shell environments (Git Bash, WSL, etc.)
- Add enhanced diagnostic information when pip detection fails to help
  users troubleshoot path and environment issues
- Improve error messages with specific guidance for different platforms
- Fix black configuration to exclude .zen_venv directory from formatting
- Add comprehensive test suite for pip detection edge cases

Fixes #188
2025-08-08 23:49:24 +07:00
Fahad
cded4c1251 Merge branch 'refactor-image-validation' 2025-08-08 12:01:28 +05:00
Fahad
74ec6210f9 Better portability 2025-08-08 11:55:27 +05:00
Beehive Innovations
e67a66f582 Merge pull request #193 from nsp/feat/continue-setup-without-api-keys
feat: Continue Python environment setup even without API keys
2025-08-07 23:29:50 -07:00
Beehive Innovations
55bdb72a78 Update run-server.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-08 09:32:00 +04:00
Nate Parsons
2c979058e5 feat: Continue Python environment setup even without API keys
Modified run-server.sh to allow developers to set up the Python development
environment without having API keys configured. This enables:

- Developers to clone and immediately start working on the codebase
- Running tests that don't require API calls
- Browsing and understanding the code structure
- Adding API keys later when ready to test MCP server functionality

Changes:
- Added new check_api_keys() function that warns but doesn't exit
- Changed print_error to print_warning for missing keys
- Updated main() to use check_api_keys instead of validate_api_keys || exit 1
- Kept original validate_api_keys() for backward compatibility

The script now shows a warning when API keys are missing but continues
with the full Python environment setup, dependencies installation, and
Claude configuration.
2025-07-12 20:32:33 -07:00
Andrew
fd76f8580d Update run-server.sh
Fix issue where wslu not installed results in var not set errors.
2025-07-03 12:01:57 -05:00
Fahad
6b495cea0b New tool! "challenge" with confidence and stop Claude from agreeing with you blindly and undoing the _correct_ strategy because you were wrong
Fixed run script to ensure pip is installed
2025-06-29 15:50:45 +04:00
Fahad
6d0bafa81d Support for Gemini CLI (setup instructions) - WIP 2025-06-25 19:36:09 +04:00
Ming
8b7620b262 feat: Enhance run-server.sh with uv-first Python environment setup (#129)
* 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>
2025-06-24 11:31:50 +04:00
Illya Havsiyevych
0623ce3546 feat: DIAL provider implementation (#112)
## 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)
2025-06-23 14:07:10 +04:00
Fahad
669160755a Detect pyenv when available 2025-06-22 10:24:24 -07:00
Fahad Gilani
123746243a Fixed WSL / Linux installation 2025-06-20 23:21:34 -04:00
Fahad
6fa2d63eac Should help with https://github.com/BeehiveInnovations/zen-mcp-server/issues/97
Clear python cache when running script: https://github.com/BeehiveInnovations/zen-mcp-server/issues/96
Improved retry error logging
Cleanup
2025-06-21 05:59:19 +04:00
Fahad
07b43aae36 Fixes for Linux https://github.com/BeehiveInnovations/zen-mcp-server/issues/84 2025-06-19 13:15:43 +04:00
Fahad
be1885c782 Cleanup echo 2025-06-19 05:42:12 +04:00
Beehive Innovations
4151c3c3a5 Migration from Docker to Standalone Python Server (#73)
* Migration from docker to standalone server
Migration handling
Fixed tests
Use simpler in-memory storage
Support for concurrent logging to disk
Simplified direct connections to localhost

* Migration from docker / redis to standalone script
Updated tests
Updated run script
Fixed requirements
Use dotenv
Ask if user would like to install MCP in Claude Desktop once
Updated docs

* More cleanup and references to docker removed

* Cleanup

* Comments

* Fixed tests

* Fix GitHub Actions workflow for standalone Python architecture

- Install requirements-dev.txt for pytest and testing dependencies
- Remove Docker setup from simulation tests (now standalone)
- Simplify linting job to use requirements-dev.txt
- Update simulation tests to run directly without Docker

Fixes unit test failures in CI due to missing pytest dependency.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove simulation tests from GitHub Actions

- Removed simulation-tests job that makes real API calls
- Keep only unit tests (mocked, no API costs) and linting
- Simulation tests should be run manually with real API keys
- Reduces CI costs and complexity

GitHub Actions now only runs:
- Unit tests (569 tests, all mocked)
- Code quality checks (ruff, black)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fixed tests

* Fixed tests

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-06-18 23:41:22 +04:00
Fahad
b43b30b49d Fixed regex 2025-06-16 06:22:10 +04:00
Fahad
c9798325c7 Extra logging 2025-06-16 06:09:58 +04:00
Fahad
6304b7af6b Native support for xAI Grok3
Model shorthand mapping related fixes
Comprehensive auto-mode related tests
2025-06-15 12:21:44 +04:00
Fahad
318b5c7ae7 Easier access to logs at startup
Updated documentation
2025-06-15 07:09:44 +04:00
Fahad
746380eb7f Renamed setup script to avoid confusion (https://github.com/BeehiveInnovations/zen-mcp-server/issues/35)
Further fixes to tests
Pass O3 simulation test when keys are not set, along with a notice
Updated docs on testing, simulation tests / contributing
Support for OpenAI o4-mini and o4-mini-high
2025-06-14 09:28:20 +04:00