fix: empty track_uris guard, None duration handling, README env block

This commit is contained in:
2026-05-22 22:41:13 +02:00
parent 3f1181989e
commit 29d13b6974
2 changed files with 13 additions and 2 deletions

View File

@@ -52,13 +52,20 @@ Add the MCP server to your Claude Code configuration by editing `~/.claude/setti
"mcpServers": {
"spotify": {
"command": "/absolute/path/to/mcp-spotify/.venv/bin/python",
"args": ["/absolute/path/to/mcp-spotify/server.py"]
"args": ["/absolute/path/to/mcp-spotify/server.py"],
"env": {
"SPOTIPY_CLIENT_ID": "your_client_id_here",
"SPOTIPY_CLIENT_SECRET": "your_client_secret_here",
"SPOTIPY_REDIRECT_URI": "http://localhost:8888/callback"
}
}
}
}
````
**Note:** Replace `/absolute/path/to/mcp-spotify` with the actual path to your project. To find it, run `pwd` in the project directory:
**Note:** Replace the path and fill in the env values with your actual Spotify app credentials. The `env` block is required because Claude Code launches the server as a subprocess from a different working directory where `load_dotenv()` may not find your `.env` file.
Replace `/absolute/path/to/mcp-spotify` with the actual path to your project. To find it, run `pwd` in the project directory:
```bash
cd /path/to/mcp-spotify