[project] name = "spotify-mcp-jamiew" version = "0.6.1" description = "MCP server connecting LLMs to Spotify, with smart-batching and large-playlist tools" readme = "README.md" requires-python = ">=3.12" license = "MIT" keywords = ["mcp", "spotify", "model-context-protocol", "claude", "llm"] dependencies = [ # mcp 2.0 removed mcp.server.fastmcp, which this server is built on — an open # upper bound means a fresh `uvx` install resolves 2.x and dies on import "mcp[cli]>=1.27.1,<2", "python-dotenv>=1.2.2,<2", "spotipy>=2.26.0,<3", ] [[project.authors]] name = "Jamie Dubs" email = "jamie@glif.xyz" [[project.authors]] name = "Varun Srivastava" email = "varun.neal@berkeley.edu" [project.urls] Homepage = "https://github.com/jamiew/spotify-mcp" Repository = "https://github.com/jamiew/spotify-mcp" [build-system] requires = [ "hatchling",] build-backend = "hatchling.build" # Module dir differs from the distribution name (spotify-mcp-jamiew), so name it explicitly. [tool.hatch.build.targets.wheel] packages = ["src/spotify_mcp"] [dependency-groups] dev = [ "spotify-mcp-jamiew", "pytest>=9.0.0", "pytest-asyncio>=1.3.0", "pytest-mock>=3.15.1", "pytest-env>=1.6.0", "pytest-cov>=7.1.0", "mypy>=2.1.0", "types-requests>=2.33.0", "ruff>=0.15.0", "bandit>=1.9.4", ] [tool.uv.sources] spotify-mcp-jamiew = { workspace = true } [project.scripts] spotify-mcp-jamiew = "spotify_mcp:main" spotify-mcp = "spotify_mcp:main" [tool.pytest.ini_options] testpaths = ["tests"] python_files = ["test_*.py"] python_classes = ["Test*"] python_functions = ["test_*"] addopts = [ "-v", "--tb=short", "--strict-markers", ] asyncio_mode = "auto" markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", "integration: marks tests as integration tests", ] env = [ "SPOTIFY_CLIENT_ID=test_client_id", "SPOTIFY_CLIENT_SECRET=test_client_secret", "SPOTIFY_REDIRECT_URI=http://localhost:8888", ] # Default environment variables for development # These are used when no environment variables or .env file is present [tool.spotify-mcp.env] SPOTIFY_CLIENT_ID = "your_spotify_client_id_here" SPOTIFY_CLIENT_SECRET = "your_spotify_client_secret_here" SPOTIFY_REDIRECT_URI = "http://localhost:8888" [tool.mypy] python_version = "3.12" warn_return_any = true warn_unused_configs = true disallow_untyped_defs = true disallow_incomplete_defs = true check_untyped_defs = true disallow_untyped_decorators = true no_implicit_optional = true warn_redundant_casts = true warn_unused_ignores = true warn_no_return = true warn_unreachable = true strict_equality = true show_error_codes = true [[tool.mypy.overrides]] module = [ "spotipy.*", "dotenv.*", ] ignore_missing_imports = true [tool.ruff] target-version = "py312" line-length = 88 [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "B", # flake8-bugbear "C4", # flake8-comprehensions "UP", # pyupgrade "TC", # flake8-type-checking ] # Auto-insert `from __future__ import annotations` so type-only imports # can move under TYPE_CHECKING without breaking runtime annotations. future-annotations = true ignore = [ "E501", # line too long, handled by formatter "B008", # do not perform function calls in argument defaults "C901", # too complex ] [tool.ruff.format] quote-style = "double" indent-style = "space" line-ending = "auto" [tool.bandit] exclude_dirs = ["tests"] skips = ["B101", "B601"]