Skip to content

Commit 0a6e54f

Browse files
authored
fix: automate __version__ from pyproject.toml (#42)
1 parent 31ff6ac commit 0a6e54f

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

aws_mcp_proxy/__init__.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
"""src.aws-mcp-proxy"""
15+
"""aws-mcp-proxy"""
1616

17-
__version__ = '0.1.0'
17+
from importlib.metadata import version as _metadata_version
18+
19+
20+
__all__ = ['__version__']
21+
__version__ = _metadata_version('aws-mcp-proxy')

aws_mcp_proxy/server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import asyncio
2727
import logging
2828
import os
29+
from aws_mcp_proxy import __version__
2930
from aws_mcp_proxy.logging_config import configure_logging
3031
from aws_mcp_proxy.middleware.tool_filter import ToolFilteringMiddleware
3132
from aws_mcp_proxy.utils import (
@@ -120,7 +121,7 @@ def add_logging_middleware(mcp: FastMCP, log_level: int) -> None:
120121
def parse_args():
121122
"""Parse command line arguments."""
122123
parser = argparse.ArgumentParser(
123-
description='AWS MCP Proxy Server',
124+
description=f'AWS MCP Proxy v{__version__}',
124125
formatter_class=argparse.RawDescriptionHelpFormatter,
125126
epilog="""
126127
Examples:

0 commit comments

Comments
 (0)