Skip to content

Commit bd9f520

Browse files
committed
chore: restrict MCP dependency version and update logging setup.
Set MCP dependency to <1.4 for compatibility and replaced a custom logging utility with standard `logging` module setup. This improves maintainability and ensures consistent behavior with logging configurations. See also: modelcontextprotocol/python-sdk#280
1 parent bc740ac commit bd9f520

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

.pre-commit-config.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ repos:
2626
hooks:
2727
- id: mypy
2828
args: []
29-
additional_dependencies: ["mcp>=1.3.0", "youtube-transcript-api>=1.0.1", "pytest>=8.3.5", "pytest-mock>=3.14"]
29+
additional_dependencies: ["mcp>=1.3,<1.4", "youtube-transcript-api>=1.0.1", "pytest>=8.3.5", "pytest-mock>=3.14"]
3030
- repo: local
3131
hooks:
3232
- id: pytest

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
]
2424
dependencies = [
2525
"click>=8.1.8",
26-
"mcp>=1.3",
26+
"mcp>=1.3,<1.4",
2727
"pydantic>=2.10.6",
2828
"youtube-transcript-api>=1.0.1",
2929
]

src/mcp_youtube_transcript/__init__.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@
55
# This software is released under the MIT License.
66
#
77
# http://opensource.org/licenses/mit-license.php
8-
9-
from logging import Logger
8+
import logging
109
from typing import Final
1110

1211
import click
13-
from mcp.server.fastmcp.utilities import logging
1412

1513
from mcp_youtube_transcript.server import new_server
1614

@@ -39,7 +37,8 @@ def main(
3937
) -> None:
4038
"""YouTube Transcript MCP server."""
4139

42-
logger: Final[Logger] = logging.get_logger(__name__)
40+
logging.basicConfig(level=logging.INFO)
41+
logger = logging.getLogger(__name__)
4342

4443
logger.info("starting Youtube Transcript MCP server")
4544
mcp = new_server(webshare_proxy_username, webshare_proxy_password, http_proxy, https_proxy)

uv.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)