lastfm
MCP server from elcachorrohumano/lastfm-mcp-server
claude mcp add --transport stdio elcachorrohumano-lastfm-mcp-server docker run --rm -i --env-file /path/to/your/.env lastfm-mcp \ --env LASTFM_API_KEY="Your Last.fm API key" \ --env LASTFM_SHARED_SECRET="Your Last.fm shared secret"
How to use
This MCP server exposes a wide range of Last.fm data and discovery capabilities through a set of categorized tools. Artist tools let you search for artists and retrieve detailed information, top albums, and top tracks. Album tools provide search and metadata access, including tracklists and top tags. Track tools enable searching, detailed track info, similar tracks, and track tags. User tools expose profile and listening history data, including top artists/albums/tracks and loved or recently played tracks. Chart tools give global top artists/tracks and popular tags, while tag tools offer tag-focused insights such as top artists, albums, and tracks, plus weekly charts for a tag. Write operations (authentication required) allow scrobbling, loving/unloving tracks, updating now playing, and managing track tags. Authentication tools exist to obtain an auth token and convert it to a session for API access. To use, ensure your environment is configured with Last.fm API credentials, then deploy the MCP server via your preferred method (Docker or UV) and use the exposed tools through the MCP interface to query data or perform actions according to the tool names listed in the README.
How to install
Prerequisites:
- Docker (recommended) or UV (for Python/uv) installed on your machine
- Last.fm API credentials (API key and shared secret)
- A copy of this MCP server repository and access to its readme for available tools
Installation steps (Docker, recommended):
- Create a .env file with your Last.fm credentials: LASTFM_API_KEY=your_actual_api_key_here LASTFM_SHARED_SECRET=your_actual_shared_secret_here
- Build or pull the MCP Docker image if required by your setup (as per project instructions): docker build -t lastfm-mcp .
- Run the MCP server via Docker using the provided configuration example: docker run --rm -i --env-file /path/to/your/.env lastfm-mcp
Alternative (UV):
- Ensure UV is installed and accessible via your PATH.
- Create an environment file (.env) with your credentials, or supply them through the command if supported by your setup.
- Run the MCP server using UV with the configuration shown in the README examples, adjusting paths as needed: uv run /path/to/your/project --env-file .env mcp_server.py
Notes:
- Replace /path/to/your/.env with the actual path to your environment file.
- If your deployment requires different environment variables, add them to the .env file and the env map in the mcp_config.
- Ensure network access to Last.fm API endpoints is available from the container or UV environment.
Additional notes
Tips and common issues:
- Ensure the Last.fm API credentials are valid; invalid keys will cause API requests to fail.
- When using Docker, ensure the image name matches your build/pull setup (lastfm-mcp in the example).
- Use the provided tool names (e.g., search_artists, get_artist_info, search_tracks, scrobble_track) to interact with the MCP server; missing credentials will prevent write operations.
- If you modify environment variables, restart the MCP server for changes to take effect.
- For debugging, check container logs or UV console output for errors related to authentication, network access, or invalid tool usage.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP