Skip to content

Commit 018c276

Browse files
hieutrtrtoreleonCopilot
authored
update to version 0.1.11 (#36)
* Toreleon non config mcphub (#21) * Add CI/CD workflows for testing, version bumping, and PyPI publishing; enhance README with development and CI/CD details; implement comprehensive tests for MCPHub and MCPServers functionality. * Enhance CI workflow by installing all extras with Poetry * Refactor CI workflow to include version bumping and streamline package publishing using Poetry * Update README to clarify MCPHub installation options with framework-specific dependencies * Restrict pull request triggers to the release branch only * Update CI workflow to enable fail-fast strategy and restrict Python versions to 3.12 only * Refactor CI workflows to remove version bumping from CI and add tagging functionality; update README for clarity on automatic versioning and tagging process. * Refactor CI workflows to integrate version bumping and ensure proper versioning before publishing; update version-bump workflow to set outputs for new version. * Bump version to 0.1.6 in pyproject.toml * Refactor CI workflows: remove version-bump workflow and integrate version extraction and tagging directly in the publish job; update package version to 0.1.7 in pyproject.toml * Fix test data structure in TestMCPServersParams to match expected format Updated the mock data in the test for _load_predefined_servers_params to reflect the correct structure, ensuring that the "mcpServers" key wraps the predefined server details. This change enhances the accuracy of the test and aligns it with the actual implementation. * Toreleon cli (#22) * Add CI/CD workflows for testing, version bumping, and PyPI publishing; enhance README with development and CI/CD details; implement comprehensive tests for MCPHub and MCPServers functionality. * Enhance CI workflow by installing all extras with Poetry * Refactor CI workflow to include version bumping and streamline package publishing using Poetry * Update README to clarify MCPHub installation options with framework-specific dependencies * Restrict pull request triggers to the release branch only * Update CI workflow to enable fail-fast strategy and restrict Python versions to 3.12 only * Refactor CI workflows to remove version bumping from CI and add tagging functionality; update README for clarity on automatic versioning and tagging process. * Refactor CI workflows to integrate version bumping and ensure proper versioning before publishing; update version-bump workflow to set outputs for new version. * Bump version to 0.1.6 in pyproject.toml * Refactor CI workflows: remove version-bump workflow and integrate version extraction and tagging directly in the publish job; update package version to 0.1.7 in pyproject.toml * Fix test data structure in TestMCPServersParams to match expected format Updated the mock data in the test for _load_predefined_servers_params to reflect the correct structure, ensuring that the "mcpServers" key wraps the predefined server details. This change enhances the accuracy of the test and aligns it with the actual implementation. * Add CLI commands and utilities for MCPHub configuration management - Implemented CLI commands for initializing, adding, removing, and listing MCP servers. - Created utility functions for loading and saving configuration files. - Added tests for CLI commands to ensure proper functionality and error handling. * Enhance test for 'init' command to skip config creation when it exists * Enhance test for 'init' command to skip config creation when it exists (#23) * Enhance test for 'init' command to skip config creation when it exists * Update tests/test_cli.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]> * Enhance test for 'init' command to skip config creation when it exists (#24) * Refactor dependencies in pyproject.toml to separate optional dependencies and clean up main dependencies section * Toreleon fix dependencies (#25) * Enhance test for 'init' command to skip config creation when it exists * Refactor dependencies in pyproject.toml to separate optional dependencies and clean up main dependencies section * Optional init (#26) * solve test * remove legacy functions * [hot-fix] autogen create_adapters and add examples * update readme * Add SSE support for running MCP servers and enhance add command funct… (#29) * Add SSE support for running MCP servers and enhance add command functionality * Refactor add_command in CLI to simplify configuration handling and remove client-specific logic * Toreleon auto config (#30) * Add SSE support for running MCP servers and enhance add command functionality * Refactor add_command in CLI to simplify configuration handling and remove client-specific logic * Enhance MCPHub CLI by adding functionality to add servers from GitHub repositories, including README parsing with OpenAI for configuration extraction. Update dependencies in pyproject.toml and improve logging and user feedback in CLI commands. * Refactor MCPHub CLI by removing the run_command function and associated argument parsing for running MCP servers. This change simplifies the codebase and prepares for future enhancements. * Enhance MCPHub CLI by adding a new process manager for handling server processes, improving environment variable checks, and implementing progress indicators for various commands. Update dependencies in pyproject.toml to include psutil for process management. * Update .gitignore to include .coverage file and add pytest-cov dependency in pyproject.toml. Remove unused server configuration functions from utils.py and enhance CLI tests for server management commands. * Update README and add CLI documentation for MCPHub (#32) - Enhanced README with new documentation section including links to CLI, API, configuration guide, and examples. - Introduced a new README file for the MCPHub CLI, detailing installation, available commands, configuration, features, error handling, and contribution guidelines. * Update src/mcphub/mcp_servers/params.py Co-authored-by: Copilot <[email protected]> * Update src/mcphub/mcp_servers/params.py Co-authored-by: Copilot <[email protected]> * Enhance config params (#34) * Enhance error handling in MCPServersParams class - Raise ServerConfigNotFoundError if no configuration file path is provided. - Validate server configuration to ensure 'command' and 'args' are not None, raising a ValueError if they are invalid. * update version 0.1.10 * Update to 0.1.11 --------- Co-authored-by: Thang Le <[email protected]> * Enhance config params (#35) * Enhance error handling in MCPServersParams class - Raise ServerConfigNotFoundError if no configuration file path is provided. - Validate server configuration to ensure 'command' and 'args' are not None, raising a ValueError if they are invalid. * update version 0.1.10 * Update to 0.1.11 * upgrade version --------- Co-authored-by: Thang Le <[email protected]> * Update README and add CLI documentation for MCPHub (#37) - Enhanced README with new documentation section including links to CLI, API, configuration guide, and examples. - Introduced a new README file for the MCPHub CLI, detailing installation, available commands, configuration, features, error handling, and contribution guidelines. * rebase release * Toreleon cli (#22) * Add CI/CD workflows for testing, version bumping, and PyPI publishing; enhance README with development and CI/CD details; implement comprehensive tests for MCPHub and MCPServers functionality. * Enhance CI workflow by installing all extras with Poetry * Refactor CI workflow to include version bumping and streamline package publishing using Poetry * Update README to clarify MCPHub installation options with framework-specific dependencies * Restrict pull request triggers to the release branch only * Update CI workflow to enable fail-fast strategy and restrict Python versions to 3.12 only * Refactor CI workflows to remove version bumping from CI and add tagging functionality; update README for clarity on automatic versioning and tagging process. * Refactor CI workflows to integrate version bumping and ensure proper versioning before publishing; update version-bump workflow to set outputs for new version. * Bump version to 0.1.6 in pyproject.toml * Refactor CI workflows: remove version-bump workflow and integrate version extraction and tagging directly in the publish job; update package version to 0.1.7 in pyproject.toml * Fix test data structure in TestMCPServersParams to match expected format Updated the mock data in the test for _load_predefined_servers_params to reflect the correct structure, ensuring that the "mcpServers" key wraps the predefined server details. This change enhances the accuracy of the test and aligns it with the actual implementation. * Add CLI commands and utilities for MCPHub configuration management - Implemented CLI commands for initializing, adding, removing, and listing MCP servers. - Created utility functions for loading and saving configuration files. - Added tests for CLI commands to ensure proper functionality and error handling. * Optional init (#26) * solve test * remove legacy functions * Enhance config params (#34) * Enhance error handling in MCPServersParams class - Raise ServerConfigNotFoundError if no configuration file path is provided. - Validate server configuration to ensure 'command' and 'args' are not None, raising a ValueError if they are invalid. * update version 0.1.10 * Update to 0.1.11 --------- Co-authored-by: Thang Le <[email protected]> * Enhance config params (#35) * Enhance error handling in MCPServersParams class - Raise ServerConfigNotFoundError if no configuration file path is provided. - Validate server configuration to ensure 'command' and 'args' are not None, raising a ValueError if they are invalid. * update version 0.1.10 * Update to 0.1.11 * upgrade version --------- Co-authored-by: Thang Le <[email protected]> --------- Co-authored-by: Thang Le <[email protected]> Co-authored-by: toreleon <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent 6e9ae0f commit 018c276

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "mcphub"
7-
version = "0.1.10"
7+
version = "0.1.11"
88
description = "A Python package for managing and integrating Model Context Protocol (MCP) servers with AI frameworks like OpenAI Agents, LangChain, and Autogen"
99
readme = "README.md"
1010
authors = [

src/mcphub/mcp_servers/params.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def _load_user_config(self) -> Dict:
4747
"""Load user configuration from JSON file."""
4848
# If no config path is provided, return empty dict
4949
if not self.config_path:
50-
return {}
50+
raise ServerConfigNotFoundError("No configuration file path provided")
5151

5252
try:
5353
with open(self.config_path, "r") as f:
@@ -188,8 +188,15 @@ def _load_servers_params(self) -> Dict[str, MCPServerConfig]:
188188
)
189189

190190
# Get command and args with defaults
191-
command = server_config.get("command", "npx")
192-
args = server_config.get("args", ["-y", package_name])
191+
command = server_config.get("command", None)
192+
args = server_config.get("args", None)
193+
194+
# Skip if command or args is None
195+
if command is None or args is None:
196+
raise ValueError(
197+
f"Invalid server '{mcp_name}' configuration: command or args is None. "
198+
f"Command: {command}, Args: {args}"
199+
)
193200

194201
servers[mcp_name] = MCPServerConfig(
195202
package_name=package_name,

0 commit comments

Comments
 (0)