2 Commits

Author SHA1 Message Date
airano
7a16a260f1 fix: use find_dotenv(usecwd=True) for PyPI .env loading
Some checks failed
Release / Test before release (push) Has been cancelled
Release / Publish to PyPI (push) Has been cancelled
Release / Publish to Docker Hub (push) Has been cancelled
Release / Create GitHub Release (push) Has been cancelled
load_dotenv() without usecwd=True fails for mcphub.exe because
find_dotenv() walks the call stack and searches from site-packages/
instead of the user's working directory. Bump to v3.0.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:45:53 +03:30
airano
f29dc299b2 fix: make version display dynamic across all surfaces
- routes.py: fallback reads from importlib.metadata instead of hardcoded
- login.html: remove hardcoded default version
- README: use dynamic GitHub Release badge from shields.io
- DOCKER_README: remove hardcoded version string

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-19 04:04:15 +03:30
6 changed files with 13 additions and 8 deletions

View File

@@ -2,7 +2,7 @@
**The AI-native management hub for WordPress, WooCommerce, and self-hosted services.**
**Version 3.0.1**596 tools across 9 plugins. Connect your sites, stores, repos, and databases — manage them all through Claude, ChatGPT, Cursor, or any MCP client.
596 tools across 9 plugins. Connect your sites, stores, repos, and databases — manage them all through Claude, ChatGPT, Cursor, or any MCP client.
## Quick Start

View File

@@ -6,7 +6,7 @@
Connect your sites, stores, repos, and databases — manage them all through Claude, ChatGPT, Cursor, or any MCP client.
[![Version: 3.0.1](https://img.shields.io/badge/version-3.0.1-blue.svg)](https://github.com/airano-ir/mcphub/releases)
[![GitHub Release](https://img.shields.io/github/v/release/airano-ir/mcphub)](https://github.com/airano-ir/mcphub/releases)
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-3776ab.svg)](https://www.python.org/)
[![PyPI](https://img.shields.io/pypi/v/mcphub-server.svg)](https://pypi.org/project/mcphub-server/)

View File

@@ -1986,7 +1986,7 @@ def get_registered_plugins() -> list:
def _get_project_version() -> str:
"""Read version from pyproject.toml."""
"""Read version from pyproject.toml, falling back to package metadata."""
try:
toml_path = os.path.join(os.path.dirname(os.path.dirname(TEMPLATES_DIR)), "pyproject.toml")
with open(toml_path) as f:
@@ -1995,7 +1995,12 @@ def _get_project_version() -> str:
return line.split("=")[1].strip().strip('"').strip("'")
except Exception:
pass
return "3.0.1"
try:
from importlib.metadata import version
return version("mcphub-server")
except Exception:
return "unknown"
def get_about_info() -> dict:

View File

@@ -139,7 +139,7 @@
<!-- Footer -->
<p class="text-center text-gray-500 text-sm mt-6">
MCP Hub v{{ version|default('3.0.1') }}
MCP Hub v{{ version }}
</p>
</div>
</body>

View File

@@ -1,6 +1,6 @@
[project]
name = "mcphub-server"
version = "3.0.3"
version = "3.0.4"
description = "AI-native management hub for WordPress, WooCommerce, and self-hosted services via Model Context Protocol (MCP)"
authors = [
{name = "MCP Hub", email = "contact@mcphub.dev"}

View File

@@ -27,9 +27,9 @@ import warnings
from datetime import UTC, datetime
from typing import Optional
from dotenv import load_dotenv
from dotenv import find_dotenv, load_dotenv
load_dotenv() # Load .env from current working directory
load_dotenv(find_dotenv(usecwd=True)) # Always search from CWD (needed for PyPI mcphub.exe)
# Suppress noisy deprecation warning from websockets (transitive dependency)
warnings.filterwarnings("ignore", category=DeprecationWarning, module="websockets")