discogs-mcp-server 0.2.0 → 0.3.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Christopher Kim
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,9 @@
1
+ [![License](https://img.shields.io/github/license/cswkim/discogs-mcp-server)](LICENSE)
2
+ [![GitHub Release](https://img.shields.io/github/v/release/cswkim/discogs-mcp-server)](https://github.com/cswkim/discogs-mcp-server/releases)
3
+ [![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/cswkim/discogs-mcp-server/.github%2Fworkflows%2Fcheck-pr.yml)](https://github.com/cswkim/discogs-mcp-server/actions/workflows/check-pr.yml)
4
+ [![NPM Downloads](https://img.shields.io/npm/d18m/discogs-mcp-server)](https://www.npmjs.com/package/discogs-mcp-server)
5
+ [![Sponsor](https://img.shields.io/static/v1?label=sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/cswkim)
6
+
1
7
  # Discogs MCP Server
2
8
 
3
9
  MCP Server for the Discogs API, enabling music catalog operations, search functionality, and more.
@@ -187,7 +193,6 @@ Any changes to local code will require Claude to be restarted to take effect. Al
187
193
  - OAuth support
188
194
  - Missing tools:
189
195
  - Inventory uploading
190
- - Editing collection custom fields
191
196
 
192
197
  ## License
193
198
 
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import dotenv from 'dotenv';
4
4
  import { z } from 'zod';
5
5
 
6
6
  // src/version.ts
7
- var VERSION = "0.2.0";
7
+ var VERSION = "0.3.0";
8
8
 
9
9
  // src/config.ts
10
10
  dotenv.config();
@@ -1757,6 +1757,14 @@ var UserCollectionCustomFieldsSchema = z.object({
1757
1757
  })
1758
1758
  )
1759
1759
  });
1760
+ var UserCollectionCustomFieldEditParamsSchema = UsernameInputSchema.merge(
1761
+ FolderIdParamSchema().extend({
1762
+ value: z.string(),
1763
+ release_id: z.union([z.number(), z.string()]),
1764
+ instance_id: z.union([z.number(), z.string()]),
1765
+ field_id: z.number()
1766
+ })
1767
+ );
1760
1768
  var UserCollectionFolderSchema = z.object({
1761
1769
  id: z.number(),
1762
1770
  count: z.number(),
@@ -2248,6 +2256,39 @@ var UserCollectionService = class extends BaseUserService {
2248
2256
  throw new Error(`Failed to delete release from folder: ${String(error)}`);
2249
2257
  }
2250
2258
  }
2259
+ /**
2260
+ * Edit a custom field value for a release in a user's collection
2261
+ *
2262
+ * @param params The parameters for the custom field value edit
2263
+ * @throws {DiscogsAuthenticationError} If authentication fails
2264
+ * @throws {DiscogsPermissionError} If trying to edit a custom field value of another user
2265
+ * @throws {DiscogsResourceNotFoundError} If the username, folder_id, release_id, or instance_id cannot be found
2266
+ * @throws {DiscogsValidationFailedError} If the field is a dropdown and the value is not in the list of options
2267
+ * @throws {Error} If there's an unexpected error
2268
+ */
2269
+ async editCustomFieldValue({
2270
+ username,
2271
+ folder_id,
2272
+ release_id,
2273
+ instance_id,
2274
+ field_id,
2275
+ value
2276
+ }) {
2277
+ try {
2278
+ await this.request(
2279
+ `/${username}/collection/folders/${folder_id}/releases/${release_id}/instances/${instance_id}/fields/${field_id}`,
2280
+ {
2281
+ method: "POST",
2282
+ body: { value }
2283
+ }
2284
+ );
2285
+ } catch (error) {
2286
+ if (isDiscogsError(error)) {
2287
+ throw error;
2288
+ }
2289
+ throw new Error(`Failed to edit custom field value: ${String(error)}`);
2290
+ }
2291
+ }
2251
2292
  /**
2252
2293
  * Edit a folder's metadata. Folders 0 and 1 cannot be renamed.
2253
2294
  *
@@ -2756,6 +2797,20 @@ var deleteUserCollectionFolderTool = {
2756
2797
  }
2757
2798
  }
2758
2799
  };
2800
+ var editUserCollectionCustomFieldValueTool = {
2801
+ name: "edit_user_collection_custom_field_value",
2802
+ description: `Edit a custom field value for a release in a user's collection`,
2803
+ parameters: UserCollectionCustomFieldEditParamsSchema,
2804
+ execute: async (args) => {
2805
+ try {
2806
+ const userService = new UserService();
2807
+ await userService.collection.editCustomFieldValue(args);
2808
+ return "Custom field value edited successfully";
2809
+ } catch (error) {
2810
+ throw formatDiscogsError(error);
2811
+ }
2812
+ }
2813
+ };
2759
2814
  var editUserCollectionFolderTool = {
2760
2815
  name: "edit_user_collection_folder",
2761
2816
  description: `Edit a folder's metadata. Folders 0 and 1 cannot be renamed.`,
@@ -2895,6 +2950,7 @@ function registerUserCollectionTools(server) {
2895
2950
  server.addTool(moveReleaseInUserCollectionTool);
2896
2951
  server.addTool(deleteReleaseFromUserCollectionFolderTool);
2897
2952
  server.addTool(getUserCollectionCustomFieldsTool);
2953
+ server.addTool(editUserCollectionCustomFieldValueTool);
2898
2954
  server.addTool(getUserCollectionValueTool);
2899
2955
  }
2900
2956
  var DiscogsUserIdentitySchema = z.object({