MCP Server Discogs
A Model Context Protocol (MCP) server for interacting with the Discogs API. This server allows searching the Discogs database and retrieving user information.
Konwn issues
- searches can be very expensive, there is simply too much data coming back. Also search pagination is NOT used, the search currently looks only at the first page of results.
Features
- Search Discogs: Search for releases, masters, artists, or labels using various filters
- User Info: Retrieve authenticated user information including collection value statistics
- MCP Integration: Use with Claude, GPT or other MCP-compatible AI assistants
Prerequisites
- Python 3.13 or higher
- Discogs API token (Get one here)
- For MCP Inspector: Node.js (as a development dependency)
- For Open WebUI integration: mcpo package
Installation
From Source
-
Clone the repository:
git clone https://gitlab.com/konstantinpae/mcp-server-discogs.git cd /path/to/mcp-server-discogs
-
Create and activate a virtual environment:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install the package in development mode:
uv sync
Usage
Basic Usage
-
Set your Discogs API token as an environment variable:
export DISCOGS_API_TOKEN="your_discogs_api_token"
-
Run the MCP server:
uvx --refresh /path/to/mcp-server-discogs
Note: --refresh rebuilds the package on every start
Usage with Claud, Cline or anything supporting MCP
- Go to the settings file for your MCP server, it should look something like this
{ "mcpServers": { "mcp-server1": {...}, "mcp-server2": {...}, } }
Add the following, so it looks something like this{ "mcpServers": { "mcp-server1": {...}, "mcp-server2": {...}, "discogs-mcp-server": { "disabled": false, "timeout": 300, "command": "uvx", "args": [ "/path/to/mcp-server-discogs" ], "env": { "DISCOGS_API_TOKEN": "your_discogs_api_token" } } } }
- You should now be able to use the MCP server from your client of choice.
Using with MCP Inspector
The MCP Inspector provides a UI for testing and inspecting the server's capabilities.
-
Install the MCP Inspector (if not already installed):
npm install -g @modelcontextprotocol/inspector
-
Run the MCP server with Inspector:
env DISCOGS_API_TOKEN="YOUR_API_TOKEN" npx @modelcontextprotocol/inspector uvx --refresh /path/to/mcp-server-discogs
Using with Open WebUI
Known Issue: mcpo only implements tools but not resources, so user-info will not work!
To integrate with Open WebUI, you'll need the (mcpo) package:
-
In the repository, run:
uvx mcpo --port 8000 --api-key "ANY API KEY" -- uvx /path/to/mcp-server-discogs
Note: Set any API key here, you will need it for setup with Open Web UI
-
Configure Open WebUI to use this MCP server (refer to Open WebUI documentation for specific steps)
Server Capabilities
Tools
search
Searches Discogs for a given search string and returns results.
Parameters:
query(required): The search string to be used in the searchtype: The type of the query can be 'release', 'master', 'artist' or 'label'title: Search by combined "Artist Name - Release Title" title fieldrelease_title: Search release titlescredit: Search release creditsartist: Search artist namesanv: Search artist ANVlabel: Search label namesgenre: Search genresstyle: Search stylescountry: Search release countryyear: Search release yearformat: Search formatscatno: Search catalog numberbarcode: Search barcodestrack: Search track titlessubmitter: Search submitter usernamecontributor: Search contributor usernames
Resources
discogs-user-info
Returns all relevant information of the Discogs user currently authenticated.
URI: data://discogs/userinfo
Development
Development Setup
-
Clone the repository:
git clone https://github.com/yourusername/mcp-server-discogs.git cd /path/to/repository
-
Create and activate a virtual environment:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install development dependencies:
uv pip install -e . uv pip install bandit mypy pytest pytest-cov ruff
-
Install Node.js (required for MCP Inspector):
# Using nvm (recommended) nvm install node # Or download from https://nodejs.org/
Running Tests
uv run pytest
Code Quality
The project uses several tools to maintain code quality:
-
ruff: For linting and formatting
uv run ruff check uv run ruff format
-
mypy: For type checking
uv run mypy . --follow-untyped-imports # we need this as the discogs client doesn't offer stubs
-
bandit: For security analysis
uv run bandit -c pyproject.toml -r .
License
See the LICENSE file for details.
Acknowledgements
- Discogs Client by the Joalla Team
TODO
- Unit Tests
- More functionality
- Optimization of the search function
Metadata
Release files for mcp-server-discogs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mcp_server_discogs-0.2.0.tar.gz | 38.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_server_discogs-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.3 kB
Release files / mcp_server_discogs-0.2.0.tar.gz
| Download URL | mcp_server_discogs-0.2.0.tar.gz |
|---|---|
| Size | 38.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43f4ba8d722be73410469177c25eb154d81bc7370351b90ed60c2f21ef93dc4d
|
|
BLAKE2b-256 checksum How to use checksums |
1e7b8a014cd191e51a448dd6874aa740e537f1b9f52a0efc16ac23bd1671919c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Release files / mcp_server_discogs-0.2.0-py3-none-any.whl
| Download URL | mcp_server_discogs-0.2.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f95df26c3361074f4310273b2b217e211b428ac0063cd65306670b0e40da65f0
|
|
BLAKE2b-256 checksum How to use checksums |
0407e9df77d3f65458a474372e8b036641430449b8142070486308cc697a44f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.3
|
Security for mcp-server-discogs 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.