ScrobblerContext
MCP Server for Last.FM APIs, built in Swift
claude mcp add --transport stdio tfmart-scrobblercontext swift run ScrobblerContext \ --env LASTFM_API_KEY="your_api_key_here" \ --env LASTFM_SECRET_KEY="your_secret_key_here"
How to use
ScrobblerContext is an MCP server written in Swift that provides programmatic access to Last.fm's music database. It exposes tools for authenticating users, searching for artists, albums, and tracks, retrieving detailed metadata, managing user libraries and listening history, and submitting scrobbles and status updates. Clients communicate via stdio following the MCP protocol, invoking specific tool commands (for example authenticate_browser, search_artist, get_track_info, scrobble_track) and receiving structured responses. To use it, run the server in your environment with the required Last.fm API credentials, then configure your MCP client to connect via stdio and point it to the scrobblercontext toolset.
How to install
Prerequisites
- Swift 6.0+ (macOS 13.0+ or Linux with Swift support)
- Git
- Last.fm API credentials (API Key and Shared Secret)
Installation steps
- Clone the repository:
git clone https://github.com/tfmart/ScrobblerContext
cd ScrobblerContext
- Build the project (Swift Package Manager):
swift build
- Set your Last.fm API credentials in the environment (or export them in your shell):
export LASTFM_API_KEY="your_api_key_here"
export LASTFM_SECRET_KEY="your_secret_key_here"
- Run the server:
swift run ScrobblerContext
To run with MCP directly via a client, ensure the client is configured to start the server command and pass the required environment variables. The server outputs MCP messages over stdio as per the protocol.
Additional notes
Tips:
- Ensure LASTFM_API_KEY and LASTFM_SECRET_KEY are kept secret and only exposed to trusted MCP clients.
- If you see authentication errors, re-run the OAuth flow to refresh tokens as needed.
- When configuring MCP clients, use stdio transport and point the command to the server executable (ScrobblerContext via SwiftPM) with the required env vars set.
- For production deployments, consider running behind a process manager and securely rotating API credentials if exposed.
Related MCP Servers
swift -gui
MCP server that can execute commands such as keyboard input and mouse movement on macOS
apple-mail
MCP server giving AI assistants full access to Apple Mail - read, search, compose, organize & analyze emails via natural language
lastfm
An MCP server that provides seamless access to a user's Last.fm listening data and music information via AI assistants like Claude.
mirroir
MCP server for controlling a real iPhone via macOS iPhone Mirroring...and any MacOs app. Screenshot, tap, swipe, type — from any MCP client.
Flint
API server fro Blender MCP on macOS with visionOS connectivity. Needs a Claude API key.
mcp-screenshot
An MCP server that provides AI assistants with screenshot capabilities — both web page capture via Puppeteer and cross-platform system screenshots using native OS tools.