discogs-mcp-server 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,194 @@
1
+ # Discogs MCP Server
2
+
3
+ MCP Server for the Discogs API, enabling music catalog operations, search functionality, and more.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Acknowledgements](#acknowledgements)
8
+ - [Available Tools](#available-tools)
9
+ - [Caveats](#caveats)
10
+ - [Prerequisites](#prerequisites)
11
+ - [Setup](#setup)
12
+ - [Running the Server](#running-the-server-locally)
13
+ - [Option 1: Local Development](#option-1-local-development)
14
+ - [Option 2: Docker](#option-2-docker)
15
+ - [Inspection](#inspection)
16
+ - [MCP Clients](#mcp-clients)
17
+ - [Claude Desktop Configuration](#claude-desktop-configuration)
18
+ - [NPX](#npx)
19
+ - [Local Node](#local-node)
20
+ - [Docker](#docker)
21
+ - [TODO](#todo)
22
+ - [License](#license)
23
+
24
+ ## Acknowledgements
25
+
26
+ This MCP server is built using [FastMCP](https://github.com/punkpeye/fastmcp), a typescript framework for building MCP servers. For more information about MCP and how to use MCP servers, please refer to the [FastMCP documentation](https://github.com/punkpeye/fastmcp/blob/main/README.md) and the [official MCP documentation](https://modelcontextprotocol.io).
27
+
28
+ ## Available Tools
29
+
30
+ Check out the list of available tools: [TOOLS.md](TOOLS.md)
31
+
32
+ ## Caveats
33
+
34
+ - The [Discogs API documentation](https://www.discogs.com/developers) is not perfect and some endpoints may not be fully documented or may have inconsistencies.
35
+ - Due to the vast number of API endpoints and response types, it's not feasible to verify type safety for every possible response. Please report any type-related issues you encounter.
36
+ - This MCP server allows for editing data in your Discogs collection. Please use with caution and verify your actions before executing them.
37
+ - The Discogs API `per_page` default is `50`, which can be too much data for some clients to process effectively, so within this project a `discogs.config.defaultPerPage` value has been set to `5`. You can request more data in your prompts, but be aware that some clients may struggle with larger responses.
38
+
39
+ ## Prerequisites
40
+
41
+ - Node.js (tested with Node.js `20.x.x`, but `18.x.x` should work as well)
42
+ - Check your Node.js version with: `node --version`
43
+ - Docker (optional, for running a local docker image without having to deal with Node or dependencies)
44
+
45
+ ## Setup
46
+
47
+ 1. Clone the repository
48
+ 2. Create a `.env` file in the root directory based on `.env.example`
49
+ 3. Set the following required environment variables in your `.env`:
50
+ - `DISCOGS_PERSONAL_ACCESS_TOKEN`: Your Discogs personal access token
51
+
52
+ To get your Discogs personal access token, go to your [Discogs Settings > Developers](https://www.discogs.com/settings/developers) page and find your token or generate a new one. **_DO NOT SHARE YOUR TOKEN_**. OAuth support will be added in a future release.
53
+
54
+ The other environment variables in `.env.example` are optional and have sensible defaults, so you don't need to set them unless you have specific requirements.
55
+
56
+ ## Running the Server Locally
57
+
58
+ ### Option 1: Local Development
59
+
60
+ 1. Install dependencies:
61
+ ```bash
62
+ pnpm install
63
+ ```
64
+
65
+ 2. Available commands:
66
+ - `pnpm run dev`: Start the development server with hot reloading
67
+ - `pnpm run dev:sse`: Start the development server with hot reloading in SSE mode
68
+ - `pnpm run build`: Build the production version
69
+ - `pnpm run start`: Run the production build
70
+ - `pnpm run inspect`: Run the MCP Inspector (see [Inspection](#inspection) section)
71
+ - `pnpm run format`: Check code formatting (prettier)
72
+ - `pnpm run lint`: Run linter (eslint)
73
+ - `pnpm run test`: Run vitest
74
+ - `pnpm run test:coverage`: Run vitest v8 coverage
75
+ - `pnpm run version:check`: Checks that the package.json version and src/version.ts match
76
+
77
+ ### Option 2: Docker
78
+
79
+ 1. Build the Docker image:
80
+ ```bash
81
+ docker build -t discogs-mcp-server:latest .
82
+ ```
83
+
84
+ 2. Run the container:
85
+ ```bash
86
+ docker run --env-file .env discogs-mcp-server:latest
87
+ ```
88
+
89
+ For SSE transport mode:
90
+ ```bash
91
+ # The port should match what is in your .env file
92
+ docker run --env-file .env -p 3001:3001 discogs-mcp-server:latest sse
93
+ ```
94
+
95
+ ## Inspection
96
+
97
+ Run the MCP Inspector to test your local MCP server:
98
+
99
+ ```bash
100
+ pnpm run inspect
101
+ ```
102
+
103
+ This will start the MCP Inspector at `http://127.0.0.1:6274`. Visit this URL in your browser to interact with your local MCP server.
104
+
105
+ For more information about the MCP Inspector, visit [the official documentation](https://modelcontextprotocol.io/docs/tools/inspector).
106
+
107
+ ## MCP Clients
108
+
109
+ Currently, this MCP server has only been tested with Claude Desktop. More client examples will be added in the future.
110
+
111
+ ### Claude Desktop Configuration
112
+
113
+ Find your `claude_desktop_config.json` at `Claude > Settings > Developer > Edit Config` and depending on which option you'd like, add **JUST ONE** of the following:
114
+
115
+ #### NPX
116
+
117
+ Running it straight from the npm registry.
118
+
119
+ ```json
120
+ {
121
+ "mcpServers": {
122
+ "discogs": {
123
+ "command": "npx",
124
+ "args": [
125
+ "-y",
126
+ "discogs-mcp-server"
127
+ ],
128
+ "env": {
129
+ "DISCOGS_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
130
+ }
131
+ }
132
+ }
133
+ }
134
+ ```
135
+
136
+ #### Local Node
137
+
138
+ Dependencies should have been installed before you use this method (`pnpm install`).
139
+
140
+ ```json
141
+ {
142
+ "mcpServers": {
143
+ "discogs": {
144
+ "command": "npx",
145
+ "args": [
146
+ "tsx",
147
+ "/PATH/TO/YOUR/PROJECT/FOLDER/src/index.ts"
148
+ ],
149
+ "env": {
150
+ "DISCOGS_PERSONAL_ACCESS_TOKEN": "<YOUR_TOKEN>"
151
+ }
152
+ }
153
+ }
154
+ }
155
+ ```
156
+
157
+ #### Docker
158
+
159
+ The docker image should have been built before using this method.
160
+
161
+ ```json
162
+ {
163
+ "mcpServers": {
164
+ "discogs": {
165
+ "command": "docker",
166
+ "args": [
167
+ "run",
168
+ "--rm",
169
+ "-i",
170
+ "--env-file",
171
+ "/PATH/TO/YOUR/PROJECT/FOLDER/.env",
172
+ "discogs-mcp-server:latest"
173
+ ]
174
+ }
175
+ }
176
+ }
177
+ ```
178
+
179
+ Any changes to local code will require Claude to be restarted to take effect. Also, Claude requires human-in-the-loop interaction to allow an MCP tool to be run, so everytime a new tool is accessed Claude will ask for permission. You usually only have to do this once per tool per chat. _If using the free version, long chats may result in more frequent errors trying to run tools as Claude limits the amount of context within a single chat._
180
+
181
+ ## TODO
182
+
183
+ - OAuth support
184
+ - Missing tools:
185
+ - Marketplace tools for creating/editing/deleting listings. Retrieving orders, etc.
186
+ - Inventory management - uploading/exporting, etc.
187
+ - Getting user submissions
188
+ - Getting user contributions
189
+ - Editing collection custom fields
190
+ - Getting versions from a master release
191
+
192
+ ## License
193
+
194
+ This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node