@labelgrid/mcp 0.1.1 → 0.2.1

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/CHANGELOG.md CHANGED
@@ -5,6 +5,24 @@ All notable changes to `@labelgrid/mcp` are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.1] - 2026-07-15
9
+
10
+ ### Added
11
+
12
+ - Dockerfile (the server runs containerized; boots into setup mode without credentials).
13
+ - `glama.json` metadata and score badges.
14
+
15
+ ### Changed
16
+
17
+ - Setup mode now lists the full tool catalog for introspection; every catalog
18
+ tool returns setup guidance (`NOT_CONNECTED`) until a token is configured.
19
+
20
+ ## [0.2.0] - 2026-07-15
21
+
22
+ ### Added
23
+
24
+ - MCPB one-click bundle for Claude Desktop, attached to GitHub releases.
25
+
8
26
  ## [0.1.1] - 2026-07-15
9
27
 
10
28
  ### Changed
package/README.md CHANGED
@@ -1,12 +1,24 @@
1
1
  # LabelGrid MCP Server
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/%40labelgrid%2Fmcp)](https://www.npmjs.com/package/@labelgrid/mcp) [![LabelGrid MCP server](https://glama.ai/mcp/servers/@labelgrid/labelgrid-mcp/badges/score.svg)](https://glama.ai/mcp/servers/@labelgrid/labelgrid-mcp)
4
+
3
5
  `@labelgrid/mcp` — the official [Model Context Protocol](https://modelcontextprotocol.io) server for [LabelGrid](https://labelgrid.com), the music distribution platform. Point Claude Desktop, Claude Code, Cursor, or any MCP client at your own LabelGrid account and manage your music catalog, releases, files, analytics, royalty accounting, webhooks, and distribution in natural language — it is a thin, typed wrapper over the LabelGrid public API, so every rule and validation stays on the server.
4
6
 
5
7
  ## Quickstart
6
8
 
7
9
  You need a LabelGrid API token (see [Getting a token](#getting-a-token)) and Node.js 20+. The server runs on demand via `npx` — nothing to install globally.
8
10
 
9
- ### Claude Desktop
11
+ ### Claude Desktop — one-click install
12
+
13
+ The quickest way in, with no config file to edit:
14
+
15
+ 1. Download **`labelgrid.mcpb`** from the [latest release](https://github.com/labelgrid/labelgrid-mcp/releases/latest).
16
+ 2. Double-click it, or open Claude Desktop → **Settings → Extensions** and drag the file in.
17
+ 3. When prompted, paste your [LabelGrid API token](#getting-a-token) — or leave it blank and let the in-chat guided setup walk you through creating one.
18
+
19
+ To update later, download the newer `.mcpb` and install it over the old one. Prefer to configure it yourself, or using a different client? The manual `npx` setup below works everywhere.
20
+
21
+ ### Claude Desktop — manual config
10
22
 
11
23
  Add this to your `claude_desktop_config.json` (Settings → Developer → Edit Config):
12
24
 
@@ -52,7 +64,7 @@ Add this to `~/.cursor/mcp.json` (global) or `.cursor/mcp.json` (per project):
52
64
 
53
65
  ### First run / setup mode
54
66
 
55
- If you start the server without `LABELGRID_API_TOKEN`, it does not fail — it launches in **setup mode** and exposes a single `setup` helper. Just ask your AI client to "set up LabelGrid" and it will walk you through creating a token and adding it to your config. Once the token is set, restart your client and the full toolset loads automatically.
67
+ If you start the server without `LABELGRID_API_TOKEN`, it does not fail — it launches in **setup mode**: the full tool catalog stays listed so you can see what the server offers, and a `setup` helper leads the way. Nothing can run in this state — every catalog tool returns setup guidance instead. Just ask your AI client to "set up LabelGrid" and it will walk you through creating a token and adding it to your config. Once the token is set, restart your client and the tools go live.
56
68
 
57
69
  ## Getting a token
58
70
 
package/dist/index.js CHANGED
@@ -13,35 +13,8 @@ import { isToolEnabled } from './gating.js';
13
13
  import { FULL_WRITES_NOTICE, LEGAL_SUMMARY } from './legal.js';
14
14
  import { log } from './log.js';
15
15
  import { buildServer } from './server.js';
16
- import { accountingTools } from './tools/accounting.js';
17
- import { analyticsTools } from './tools/analytics.js';
18
- import { catalogReadTools } from './tools/catalog-read.js';
19
- import { catalogWriteTools } from './tools/catalog-write.js';
20
- import { deliveryTools } from './tools/delivery.js';
21
- import { filesReadTools } from './tools/files-read.js';
22
- import { fullWriteTools } from './tools/full-writes.js';
23
- import { identityTools } from './tools/identity.js';
24
- import { referenceTools } from './tools/reference.js';
25
- import { releaseWriteTools } from './tools/release-write.js';
26
- import { reviewReadTools } from './tools/review-read.js';
27
- import { webhookTools } from './tools/webhooks.js';
16
+ import { allTools } from './tools/all.js';
28
17
  import { VERSION } from './version.js';
29
- function allTools() {
30
- return [
31
- ...identityTools,
32
- ...referenceTools,
33
- ...analyticsTools,
34
- ...catalogReadTools,
35
- ...filesReadTools,
36
- ...reviewReadTools,
37
- ...deliveryTools,
38
- ...accountingTools,
39
- ...webhookTools,
40
- ...catalogWriteTools,
41
- ...releaseWriteTools,
42
- ...fullWriteTools,
43
- ];
44
- }
45
18
  async function main() {
46
19
  let config;
47
20
  try {
@@ -62,7 +35,7 @@ async function main() {
62
35
  version: VERSION,
63
36
  });
64
37
  if (config.setupMode) {
65
- const server = buildServer(config, client, []);
38
+ const server = buildServer(config, client, allTools());
66
39
  log('info', `labelgrid-mcp v${VERSION} — setup mode (no API token configured); call the "setup" tool for guided setup`);
67
40
  log('info', LEGAL_SUMMARY);
68
41
  await server.connect(new StdioServerTransport());
package/dist/server.js CHANGED
@@ -24,8 +24,10 @@ function buildInstructions(config) {
24
24
  if (config.setupMode) {
25
25
  return [
26
26
  'No LabelGrid API token is configured, so the account is not connected yet. ' +
27
- 'Call the `setup` tool for step-by-step instructions to connect. No account ' +
28
- 'data can be accessed in this state.',
27
+ 'Call the `setup` tool for step-by-step instructions to connect. The full ' +
28
+ 'tool catalog is listed so you can see what the server offers, but no ' +
29
+ 'account data can be accessed in this state — every tool returns setup ' +
30
+ 'guidance until a token is configured.',
29
31
  LEGAL_SUMMARY,
30
32
  ].join('\n\n');
31
33
  }
@@ -41,11 +43,20 @@ function buildInstructions(config) {
41
43
  }
42
44
  export function buildServer(config, client, tools) {
43
45
  const server = new McpServer({ name: 'labelgrid-mcp', version: VERSION }, { instructions: buildInstructions(config) });
44
- // In setup mode ONLY the setup helper is registered — the account is not
45
- // connected, so none of the API-backed tools are exposed.
46
- const registered = config.setupMode ? setupTools : tools;
46
+ // In setup mode the setup helper leads, and the full catalog stays LISTED so
47
+ // introspection shows what the server offers — but every catalog tool is
48
+ // inert: without a token no API call is possible, so invoking one returns
49
+ // setup guidance instead of executing.
50
+ const registered = config.setupMode ? [...setupTools, ...tools] : tools;
47
51
  for (const tool of registered) {
48
- if (!isToolEnabled(tool, config))
52
+ const isSetupHelper = tool.toolset === 'setup';
53
+ // Listing rule: connected mode applies the full gate matrix; setup mode
54
+ // lists the whole catalog (only honoring an explicit toolset narrowing),
55
+ // because nothing can execute without a token anyway.
56
+ const listable = config.setupMode
57
+ ? config.toolsets === null || config.toolsets.has(tool.toolset)
58
+ : isToolEnabled(tool, config);
59
+ if (!isSetupHelper && !listable)
49
60
  continue;
50
61
  server.registerTool(tool.name, {
51
62
  title: tool.title,
@@ -53,8 +64,19 @@ export function buildServer(config, client, tools) {
53
64
  inputSchema: tool.inputShape,
54
65
  annotations: { title: tool.title, ...tool.annotations },
55
66
  }, async (args) => {
67
+ // Not connected: every catalog tool refuses with setup guidance.
68
+ if (config.setupMode && !isSetupHelper) {
69
+ return toToolResult({
70
+ error: {
71
+ code: 'NOT_CONNECTED',
72
+ message: 'No LabelGrid API token is configured, so this tool cannot run yet. ' +
73
+ 'Call the `setup` tool for step-by-step instructions to connect your account.',
74
+ status: 0,
75
+ },
76
+ });
77
+ }
56
78
  // Defense in depth: even a registered tool re-verifies its gate.
57
- if (!isToolEnabled(tool, config)) {
79
+ if (!isSetupHelper && !isToolEnabled(tool, config)) {
58
80
  return toToolResult({
59
81
  error: {
60
82
  code: 'TOOL_DISABLED',
@@ -0,0 +1,3 @@
1
+ /** The complete tool catalog, in registration order. */
2
+ import type { ToolDef } from './types.js';
3
+ export declare function allTools(): ToolDef[];
@@ -0,0 +1,29 @@
1
+ /** The complete tool catalog, in registration order. */
2
+ import { accountingTools } from './accounting.js';
3
+ import { analyticsTools } from './analytics.js';
4
+ import { catalogReadTools } from './catalog-read.js';
5
+ import { catalogWriteTools } from './catalog-write.js';
6
+ import { deliveryTools } from './delivery.js';
7
+ import { filesReadTools } from './files-read.js';
8
+ import { fullWriteTools } from './full-writes.js';
9
+ import { identityTools } from './identity.js';
10
+ import { referenceTools } from './reference.js';
11
+ import { releaseWriteTools } from './release-write.js';
12
+ import { reviewReadTools } from './review-read.js';
13
+ import { webhookTools } from './webhooks.js';
14
+ export function allTools() {
15
+ return [
16
+ ...identityTools,
17
+ ...referenceTools,
18
+ ...analyticsTools,
19
+ ...catalogReadTools,
20
+ ...filesReadTools,
21
+ ...reviewReadTools,
22
+ ...deliveryTools,
23
+ ...accountingTools,
24
+ ...webhookTools,
25
+ ...catalogWriteTools,
26
+ ...releaseWriteTools,
27
+ ...fullWriteTools,
28
+ ];
29
+ }
package/package.json CHANGED
@@ -1,15 +1,18 @@
1
1
  {
2
2
  "name": "@labelgrid/mcp",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "mcpName": "io.github.labelgrid/labelgrid-mcp",
5
5
  "description": "Official LabelGrid MCP server — connect your AI client to your LabelGrid account",
6
6
  "type": "module",
7
7
  "keywords": ["mcp", "model-context-protocol", "labelgrid", "music-distribution", "ai", "claude"],
8
8
  "main": "dist/index.js",
9
- "bin": { "labelgrid-mcp": "dist/index.js" },
9
+ "bin": {
10
+ "labelgrid-mcp": "dist/index.js"
11
+ },
10
12
  "files": ["dist", "README.md", "CHANGELOG.md", "LICENSE", "server.json"],
11
13
  "scripts": {
12
14
  "build": "tsc",
15
+ "build:mcpb": "npm run build && node scripts/build-mcpb.mjs",
13
16
  "start": "node dist/index.js",
14
17
  "dev": "tsc --watch",
15
18
  "test": "vitest run --exclude 'test/contract/**'",
@@ -19,9 +22,14 @@
19
22
  "check-coverage": "node scripts/check-api-coverage.mjs",
20
23
  "gen-docs": "node scripts/gen-tool-docs.mjs"
21
24
  },
22
- "repository": { "type": "git", "url": "git+https://github.com/labelgrid/labelgrid-mcp.git" },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/labelgrid/labelgrid-mcp.git"
28
+ },
23
29
  "license": "MIT",
24
- "engines": { "node": ">=20" },
30
+ "engines": {
31
+ "node": ">=20"
32
+ },
25
33
  "dependencies": {
26
34
  "@modelcontextprotocol/sdk": "^1.12.0",
27
35
  "zod": "^3.24.0"
package/server.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.labelgrid/labelgrid-mcp",
4
4
  "description": "Official LabelGrid MCP server — manage your music catalog, releases, analytics and distribution.",
5
- "version": "0.1.1",
5
+ "version": "0.2.1",
6
6
  "websiteUrl": "https://labelgrid.com",
7
7
  "repository": {
8
8
  "url": "https://github.com/labelgrid/labelgrid-mcp",
@@ -12,7 +12,7 @@
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@labelgrid/mcp",
15
- "version": "0.1.1",
15
+ "version": "0.2.1",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },