@withpica/mcp-server-directory 1.4.1 → 1.4.2
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 +25 -1
- package/README.md +62 -0
- package/dist/client.js +1 -1
- package/dist/config.js +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/changelog.generated.d.ts +2 -2
- package/dist/lib/changelog.generated.d.ts.map +1 -1
- package/dist/lib/changelog.generated.js +3 -3
- package/dist/lib/changelog.generated.js.map +1 -1
- package/dist/lib/changelog.js +1 -1
- package/dist/prompts/index.js +1 -1
- package/dist/prompts/public-question-atlas.js +1 -1
- package/dist/resources/llms-primer.js +1 -1
- package/dist/server.js +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/skills.generated.js +1 -1
- package/dist/tools/chain.js +1 -1
- package/dist/tools/index.js +1 -1
- package/dist/tools/people.js +1 -1
- package/dist/tools/recordings.js +1 -1
- package/dist/tools/release-notes.d.ts.map +1 -1
- package/dist/tools/release-notes.js +3 -2
- package/dist/tools/release-notes.js.map +1 -1
- package/dist/tools/search.js +1 -1
- package/dist/tools/skills.d.ts.map +1 -1
- package/dist/tools/skills.js +5 -3
- package/dist/tools/skills.js.map +1 -1
- package/dist/tools/works.js +1 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +57 -4
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/formatting.d.ts.map +1 -1
- package/dist/utils/formatting.js +9 -3
- package/dist/utils/formatting.js.map +1 -1
- package/jest.config.js +4 -1
- package/package.json +8 -4
- package/scripts/build-changelog.ts +2 -2
- package/scripts/build-skills.ts +9 -4
- package/src/__tests__/prompts/index.test.ts +1 -1
- package/src/__tests__/prompts/prompt-eval-harness.test.ts +1 -1
- package/src/__tests__/skills/skills-registry.test.ts +2 -5
- package/src/__tests__/skills/skills-tools.test.ts +5 -13
- package/src/__tests__/tools/chain.test.ts +1 -1
- package/src/__tests__/tools/composability-chains.test.ts +15 -26
- package/src/__tests__/tools/people.test.ts +1 -1
- package/src/__tests__/tools/search.test.ts +1 -1
- package/src/__tests__/tools/tool-count-parity.test.ts +63 -0
- package/src/__tests__/tools/works.test.ts +1 -1
- package/src/__tests__/utils/errors.test.ts +68 -0
- package/src/client.ts +1 -1
- package/src/config.ts +1 -1
- package/src/index.ts +1 -2
- package/src/lib/changelog.ts +1 -1
- package/src/prompts/index.ts +1 -1
- package/src/prompts/public-question-atlas.ts +1 -1
- package/src/resources/llms-primer.ts +1 -1
- package/src/server.ts +1 -1
- package/src/skills/find-music-for-sync-brief/SKILL.md +1 -1
- package/src/skills/index.ts +1 -1
- package/src/skills/skills.generated.ts +1 -1
- package/src/tools/__tests__/release-notes.test.ts +1 -1
- package/src/tools/chain.ts +1 -1
- package/src/tools/index.ts +1 -1
- package/src/tools/people.ts +1 -1
- package/src/tools/recordings.ts +1 -1
- package/src/tools/release-notes.ts +3 -2
- package/src/tools/search.ts +1 -1
- package/src/tools/skills.ts +5 -3
- package/src/tools/works.ts +1 -1
- package/src/utils/errors.ts +72 -4
- package/src/utils/formatting.ts +9 -3
- package/tsconfig.build.json +10 -0
- package/dist/tools/__tests__/release-notes.test.d.ts +0 -2
- package/dist/tools/__tests__/release-notes.test.d.ts.map +0 -1
- package/dist/tools/__tests__/release-notes.test.js +0 -49
- package/dist/tools/__tests__/release-notes.test.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,11 +8,35 @@ for breaking tool-surface changes.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.4.2] - 2026-08-24
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **A README on the npm page.** This package published with no README at all, so
|
|
16
|
+
its npm listing showed only the one-line description — a stranger evaluating it
|
|
17
|
+
had nothing to read. The README is now generated by
|
|
18
|
+
`scripts/build-mcp-readmes.mjs` from the tool registry and `package.json`, so
|
|
19
|
+
the install command, the tool inventory and the version cannot drift from the
|
|
20
|
+
code the way a hand-written one did. `--check` fails CI on drift.
|
|
21
|
+
- `homepage` and `bugs.email` in `package.json`, so the npm page links somewhere
|
|
22
|
+
and a problem has a route back.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
|
|
26
|
+
- **The published tool count drifted to 9 of 11** — `directory_release_notes`, `directory_skill_get` and `directory_skill_list` had been added without the count following; now derived from the registry with a parity tripwire, and the one destructive tool no longer wears a write tier (pica #2024).
|
|
27
|
+
|
|
28
|
+
- `formatAsText`: bare array payloads are wrapped in the standard
|
|
29
|
+
`{ items, count }` list envelope — MCP requires structuredContent to be a
|
|
30
|
+
record, and the SDK server rejects arrays with -32602 (latent here: no
|
|
31
|
+
current call sites, fixed in lockstep with `@withpica/mcp-utils`).
|
|
32
|
+
|
|
11
33
|
## [1.4.1] - 2026-05-16
|
|
12
34
|
|
|
13
35
|
### Changed
|
|
14
36
|
|
|
15
|
-
-
|
|
37
|
+
- Branding pass: "PICA" → "withPICA" in package metadata
|
|
38
|
+
(commit `9787d4c37`). Published to npm 2026-05-16 without committing the
|
|
39
|
+
version bump — repo realigned 2026-06-12.
|
|
16
40
|
|
|
17
41
|
## [1.4.0] - 2026-05-13
|
|
18
42
|
|
package/README.md
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<!-- GENERATED FILE — do not edit by hand.
|
|
2
|
+
Prose lives in mcp-server/README.intro.md; the tool inventory is
|
|
3
|
+
derived from the source registries. Regenerate with
|
|
4
|
+
`node scripts/build-mcp-readmes.mjs`; `--check` fails on drift. -->
|
|
5
|
+
|
|
6
|
+
# @withpica/mcp-server-directory
|
|
7
|
+
|
|
8
|
+
MCP server for the **withPICA public directory** — read-only search over works, recordings and creators that rights holders have chosen to publish. No account, no API key, no setup.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
claude mcp add withpica-directory -- npx --yes @withpica/mcp-server-directory@latest
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## What it can answer
|
|
17
|
+
|
|
18
|
+
Who wrote this song. What the ISWC is. Which recordings exist of a work and what their ISRCs are. Which creators match a name, an ISNI or an IPI. Which published recordings sit in a tempo, key, energy or mood range. And, in one call, the rights chain for a work: writers, publishers, recording, audio.
|
|
19
|
+
|
|
20
|
+
Every entry is published deliberately by its rights holder, with attested credits and verified identifiers.
|
|
21
|
+
|
|
22
|
+
## REST, if you would rather not run a process
|
|
23
|
+
|
|
24
|
+
- `GET https://withpica.com/api/public/directory/works`
|
|
25
|
+
- `GET https://withpica.com/api/public/directory/people`
|
|
26
|
+
- `GET https://withpica.com/api/public/directory/search?q={query}`
|
|
27
|
+
- `GET https://withpica.com/api/public/directory/recordings`
|
|
28
|
+
- `GET https://withpica.com/api/public/directory/consent?iswc={iswc}`
|
|
29
|
+
|
|
30
|
+
100 requests/minute unauthenticated. Licensing keys unlock extended fields and their own limits.
|
|
31
|
+
|
|
32
|
+
## Before you train on any of this
|
|
33
|
+
|
|
34
|
+
withpica.com publishes a blanket TDM reservation at <https://withpica.com/.well-known/tdmrep.json> (`"tdm-reservation": 1`). Nothing here is licensed for text-and-data mining or model training by default.
|
|
35
|
+
|
|
36
|
+
The `consent` endpoint above is the granular counterpart: ask it about an identifier and it reports what the rights holders have actually cleared, and at what level. A work is cleared at a level only when every credited contributor has granted at least that level; one refusal blocks it. Read `no_assertion_published` literally — it means no permission is published for that identifier, which is not a maybe.
|
|
37
|
+
|
|
38
|
+
## Links
|
|
39
|
+
|
|
40
|
+
- Directory: <https://directory.withpica.com>
|
|
41
|
+
- Machine-readable: <https://withpica.com/directory/llms.txt>
|
|
42
|
+
- Support: support@withpica.com
|
|
43
|
+
|
|
44
|
+
## Tools
|
|
45
|
+
|
|
46
|
+
11 tools, all read-only:
|
|
47
|
+
|
|
48
|
+
- `directory_chain` — Graph lookup — resolves a query, ISWC, or ISRC to its full rights chain in one call
|
|
49
|
+
- `directory_list_people` — Browse and filter creators in the PICA public directory
|
|
50
|
+
- `directory_list_works` — Browse and filter verified musical works in the PICA public directory
|
|
51
|
+
- `directory_lookup_isrc` — Shortcut: look up the work(s) associated with a recording identifier (ISRC)
|
|
52
|
+
- `directory_lookup_person` — Get full details of a creator by global creator ID (UUID), ISNI, IPI number, or MusicBrainz ID
|
|
53
|
+
- `directory_lookup_work` — Get full details of a single work by ISWC or work UUID
|
|
54
|
+
- `directory_release_notes` — Returns recent releases of the PICA directory MCP server — what shipped in the public catalogue surface itself
|
|
55
|
+
- `directory_search` — Convenience fan-out across works and creators — runs list_works and list_people with the same query and returns the union
|
|
56
|
+
- `directory_search_recordings` — Find tracks by BPM, key, energy, danceability, duration, and more
|
|
57
|
+
- `directory_skill_get` — Returns the full methodology body for one directory skill — markdown with step-by-step instructions and tool chains
|
|
58
|
+
- `directory_skill_list` — Returns the list of downloadable directory skill methodologies — name, description, trigger phrases
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
Generated for `@withpica/mcp-server-directory@1.4.2`. © 2024-2026 Withpica Ltd. All rights reserved. MIT licensed.
|
package/dist/client.js
CHANGED
package/dist/config.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// Copyright (c)
|
|
2
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
3
3
|
import { loadConfig, validateConfig } from "./config.js";
|
|
4
4
|
import { DirectoryMcpServer } from "./server.js";
|
|
5
5
|
async function main() {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,6DAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,6DAA6D;AAE7D,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,KAAK,UAAU,IAAI;IACjB,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAC5B,cAAc,CAAC,MAAM,CAAC,CAAC;QAEvB,MAAM,MAAM,GAAG,IAAI,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAC9C,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QAErB,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,IAAI,EAAE;YAC9B,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAClD,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;QAEH,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;YAC/B,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;YAClD,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;YACpB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CACX,8BAA8B,EAC9B,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CACvD,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const CHANGELOG_MD = "# Changelog\n\nAll notable changes to `@withpica/mcp-server-directory` are documented here.\n\nThe format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to semantic versioning where the major number is incremented\nfor breaking tool-surface changes.\n\n## [Unreleased]\n\n## [1.4.1] - 2026-05-16\n\n### Changed\n\n-
|
|
1
|
+
export declare const CHANGELOG_MD = "# Changelog\n\nAll notable changes to `@withpica/mcp-server-directory` are documented here.\n\nThe format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to semantic versioning where the major number is incremented\nfor breaking tool-surface changes.\n\n## [Unreleased]\n\n## [1.4.2] - 2026-08-24\n\n### Added\n\n- **A README on the npm page.** This package published with no README at all, so\n its npm listing showed only the one-line description \u2014 a stranger evaluating it\n had nothing to read. The README is now generated by\n `scripts/build-mcp-readmes.mjs` from the tool registry and `package.json`, so\n the install command, the tool inventory and the version cannot drift from the\n code the way a hand-written one did. `--check` fails CI on drift.\n- `homepage` and `bugs.email` in `package.json`, so the npm page links somewhere\n and a problem has a route back.\n\n### Fixed\n\n- **The published tool count drifted to 9 of 11** \u2014 `directory_release_notes`, `directory_skill_get` and `directory_skill_list` had been added without the count following; now derived from the registry with a parity tripwire, and the one destructive tool no longer wears a write tier (pica #2024).\n\n- `formatAsText`: bare array payloads are wrapped in the standard\n `{ items, count }` list envelope \u2014 MCP requires structuredContent to be a\n record, and the SDK server rejects arrays with -32602 (latent here: no\n current call sites, fixed in lockstep with `@withpica/mcp-utils`).\n\n## [1.4.1] - 2026-05-16\n\n### Changed\n\n- Branding pass: \"PICA\" \u2192 \"withPICA\" in package metadata\n (commit `9787d4c37`). Published to npm 2026-05-16 without committing the\n version bump \u2014 repo realigned 2026-06-12.\n\n## [1.4.0] - 2026-05-13\n\n### Added\n\n- **`directory_release_notes` tool + `release-notes://withpica/mcp-server-directory/latest` Resource (PR #414).**\n Agent-facing surface for directory MCP release notes. Reads `CHANGELOG.md`\n embedded at build time via `scripts/build-changelog.ts`. Returns the\n last 3 versions by default with optional `since_version` and `sections`\n filters. Resource counterpart serves the full CHANGELOG for\n Resource-native clients. Sister of `pica_release_notes` (creator MCP)\n and `team_release_notes` (team MCP). Disambiguated from catalogue-content\n searches (`directory_search` / `directory_list_works` / `directory_chain`)\n by the NOT-FOR clause in the description.\n\n## [1.3.0] - 2026-05-11\n\n### Added\n\n- **`directory_skill_list` + `directory_skill_get` \u2014 skill discovery on the public directory MCP (ADR-140 Phase 2b, PR #371).**\n Lazy-loaded skill catalogue exposed via two meta-tools + one `skill://`\n Resource per shipped skill (SEP-2640 bridge pattern). v1 ships\n `find-music-for-sync-brief` \u2014 a methodology for searching the public\n directory by audio characteristics + free-text brief. Skill metadata is\n static at boot; bodies load on `skill_get` call. IP-protection lint\n (Rule 14) gates skill content against trade-secret directories before\n publish; cross-coverage parity lint asserts skill resource URIs match\n between stdio and HTTP transports.\n\n## [1.1.0] - 2026-04-21\n\nShipped as minor rather than major despite the `*_full` tool removal:\nthe removed names had near-zero external adoption (they shipped recently\nand weren't advertised externally), and staying on the 1.x line keeps\n`^1.0.0` consumers on the upgrade path rather than stranding them on\nthe broken cascade. Clients that cached the `*_full` names will see a\ntool-not-found error and need to refresh their tool list.\n\n### Breaking\n\n- **Removed `directory_lookup_person_full` and `directory_lookup_work_full`.**\n Both tools hit the same upstream endpoints as their non-`_full` counterparts\n with only a formatting difference \u2014 there was no capability delta. The\n `_full` variants are now the canonical names (`directory_lookup_person`\n and `directory_lookup_work`); the thin variants have been deleted. Clients\n that cached the `_full` names need to update their tool list; the\n replacements return a superset of the prior data, so no output is lost.\n\n### Added\n\n- **`directory_chain` tool** \u2014 one-call rights-chain lookup. Accepts a\n free-text query, a direct ISWC/ISRC `identifier`, or audio-only filters\n (BPM / key / energy / mood). Returns the already-public `ChainResult`\n shape: work + writers + publishers (names + roles only, no IPIs or\n splits) + linked recording + audio characteristics. Wraps the existing\n public `/api/public/directory/chain` endpoint \u2014 no new backing API work.\n- `directory_list_people` now accepts `letter` (A\u2013Z, `#`) for alphabetical\n browsing. The backend has supported this for months; only the MCP tool\n was missing the parameter.\n- `directory_list_works` now accepts `letter`, `sort` (`title` | `recent`),\n and `isrc` \u2014 all previously backend-only.\n\n### Changed\n\n- **`directory_lookup_person` now matches its description.** Previously the\n tool advertised ISNI / IPI / MusicBrainz ID support but the backing query\n only matched `global_creator_id` \u2014 any non-UUID identifier silently 404'd.\n The query now cascades through `global_creator_id` \u2192 `isni` \u2192\n `cae_ipi_number` \u2192 `musicbrainz_id`, first hit wins.\n- `directory_search` description rewritten to drop the false \"ranked\" claim.\n The backing endpoint is a fan-out (`listWorks` + `listPeople`,\n half-limit each), not cross-type ranking. Callers should prefer typed\n list tools when they know the entity type.\n- `directory_lookup_isrc` description rewritten to frame it honestly as a\n pinned filter preset on `list_works` rather than a distinct lookup.\n";
|
|
2
2
|
export declare const PACKAGE_NAME = "@withpica/mcp-server-directory";
|
|
3
|
-
export declare const PACKAGE_VERSION = "1.4.
|
|
3
|
+
export declare const PACKAGE_VERSION = "1.4.2";
|
|
4
4
|
//# sourceMappingURL=changelog.generated.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.generated.d.ts","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"changelog.generated.d.ts","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY,yrLAAymL,CAAC;AACnoL,eAAO,MAAM,YAAY,mCAAmC,CAAC;AAC7D,eAAO,MAAM,eAAe,UAAU,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
// Generated by scripts/build-changelog.ts — do not edit.
|
|
3
|
-
export const CHANGELOG_MD = "# Changelog\n\nAll notable changes to `@withpica/mcp-server-directory` are documented here.\n\nThe format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to semantic versioning where the major number is incremented\nfor breaking tool-surface changes.\n\n## [Unreleased]\n\n## [1.4.1] - 2026-05-16\n\n### Changed\n\n-
|
|
3
|
+
export const CHANGELOG_MD = "# Changelog\n\nAll notable changes to `@withpica/mcp-server-directory` are documented here.\n\nThe format is loosely based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to semantic versioning where the major number is incremented\nfor breaking tool-surface changes.\n\n## [Unreleased]\n\n## [1.4.2] - 2026-08-24\n\n### Added\n\n- **A README on the npm page.** This package published with no README at all, so\n its npm listing showed only the one-line description — a stranger evaluating it\n had nothing to read. The README is now generated by\n `scripts/build-mcp-readmes.mjs` from the tool registry and `package.json`, so\n the install command, the tool inventory and the version cannot drift from the\n code the way a hand-written one did. `--check` fails CI on drift.\n- `homepage` and `bugs.email` in `package.json`, so the npm page links somewhere\n and a problem has a route back.\n\n### Fixed\n\n- **The published tool count drifted to 9 of 11** — `directory_release_notes`, `directory_skill_get` and `directory_skill_list` had been added without the count following; now derived from the registry with a parity tripwire, and the one destructive tool no longer wears a write tier (pica #2024).\n\n- `formatAsText`: bare array payloads are wrapped in the standard\n `{ items, count }` list envelope — MCP requires structuredContent to be a\n record, and the SDK server rejects arrays with -32602 (latent here: no\n current call sites, fixed in lockstep with `@withpica/mcp-utils`).\n\n## [1.4.1] - 2026-05-16\n\n### Changed\n\n- Branding pass: \"PICA\" → \"withPICA\" in package metadata\n (commit `9787d4c37`). Published to npm 2026-05-16 without committing the\n version bump — repo realigned 2026-06-12.\n\n## [1.4.0] - 2026-05-13\n\n### Added\n\n- **`directory_release_notes` tool + `release-notes://withpica/mcp-server-directory/latest` Resource (PR #414).**\n Agent-facing surface for directory MCP release notes. Reads `CHANGELOG.md`\n embedded at build time via `scripts/build-changelog.ts`. Returns the\n last 3 versions by default with optional `since_version` and `sections`\n filters. Resource counterpart serves the full CHANGELOG for\n Resource-native clients. Sister of `pica_release_notes` (creator MCP)\n and `team_release_notes` (team MCP). Disambiguated from catalogue-content\n searches (`directory_search` / `directory_list_works` / `directory_chain`)\n by the NOT-FOR clause in the description.\n\n## [1.3.0] - 2026-05-11\n\n### Added\n\n- **`directory_skill_list` + `directory_skill_get` — skill discovery on the public directory MCP (ADR-140 Phase 2b, PR #371).**\n Lazy-loaded skill catalogue exposed via two meta-tools + one `skill://`\n Resource per shipped skill (SEP-2640 bridge pattern). v1 ships\n `find-music-for-sync-brief` — a methodology for searching the public\n directory by audio characteristics + free-text brief. Skill metadata is\n static at boot; bodies load on `skill_get` call. IP-protection lint\n (Rule 14) gates skill content against trade-secret directories before\n publish; cross-coverage parity lint asserts skill resource URIs match\n between stdio and HTTP transports.\n\n## [1.1.0] - 2026-04-21\n\nShipped as minor rather than major despite the `*_full` tool removal:\nthe removed names had near-zero external adoption (they shipped recently\nand weren't advertised externally), and staying on the 1.x line keeps\n`^1.0.0` consumers on the upgrade path rather than stranding them on\nthe broken cascade. Clients that cached the `*_full` names will see a\ntool-not-found error and need to refresh their tool list.\n\n### Breaking\n\n- **Removed `directory_lookup_person_full` and `directory_lookup_work_full`.**\n Both tools hit the same upstream endpoints as their non-`_full` counterparts\n with only a formatting difference — there was no capability delta. The\n `_full` variants are now the canonical names (`directory_lookup_person`\n and `directory_lookup_work`); the thin variants have been deleted. Clients\n that cached the `_full` names need to update their tool list; the\n replacements return a superset of the prior data, so no output is lost.\n\n### Added\n\n- **`directory_chain` tool** — one-call rights-chain lookup. Accepts a\n free-text query, a direct ISWC/ISRC `identifier`, or audio-only filters\n (BPM / key / energy / mood). Returns the already-public `ChainResult`\n shape: work + writers + publishers (names + roles only, no IPIs or\n splits) + linked recording + audio characteristics. Wraps the existing\n public `/api/public/directory/chain` endpoint — no new backing API work.\n- `directory_list_people` now accepts `letter` (A–Z, `#`) for alphabetical\n browsing. The backend has supported this for months; only the MCP tool\n was missing the parameter.\n- `directory_list_works` now accepts `letter`, `sort` (`title` | `recent`),\n and `isrc` — all previously backend-only.\n\n### Changed\n\n- **`directory_lookup_person` now matches its description.** Previously the\n tool advertised ISNI / IPI / MusicBrainz ID support but the backing query\n only matched `global_creator_id` — any non-UUID identifier silently 404'd.\n The query now cascades through `global_creator_id` → `isni` →\n `cae_ipi_number` → `musicbrainz_id`, first hit wins.\n- `directory_search` description rewritten to drop the false \"ranked\" claim.\n The backing endpoint is a fan-out (`listWorks` + `listPeople`,\n half-limit each), not cross-type ranking. Callers should prefer typed\n list tools when they know the entity type.\n- `directory_lookup_isrc` description rewritten to frame it honestly as a\n pinned filter preset on `list_works` rather than a distinct lookup.\n";
|
|
4
4
|
export const PACKAGE_NAME = "@withpica/mcp-server-directory";
|
|
5
|
-
export const PACKAGE_VERSION = "1.4.
|
|
5
|
+
export const PACKAGE_VERSION = "1.4.2";
|
|
6
6
|
//# sourceMappingURL=changelog.generated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changelog.generated.js","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,yDAAyD;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"changelog.generated.js","sourceRoot":"","sources":["../../src/lib/changelog.generated.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,yDAAyD;AAEzD,MAAM,CAAC,MAAM,YAAY,GAAG,smLAAsmL,CAAC;AACnoL,MAAM,CAAC,MAAM,YAAY,GAAG,gCAAgC,CAAC;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,OAAO,CAAC"}
|
package/dist/lib/changelog.js
CHANGED
package/dist/prompts/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
/**
|
|
3
3
|
* Names known-ambiguous in the music-metadata domain — multiple persons
|
|
4
4
|
* sharing a stage name, or artist project names that collide with
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
export const DIRECTORY_PRIMER = `# PICA Directory — Public Music Catalog Search
|
|
3
3
|
|
|
4
4
|
Read-only access to published music catalog data. No authentication required.
|
package/dist/server.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/skills/index.js
CHANGED
package/dist/tools/chain.js
CHANGED
package/dist/tools/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
import { DirectoryWorksTools } from "./works.js";
|
|
3
3
|
import { DirectoryPeopleTools } from "./people.js";
|
|
4
4
|
import { DirectorySearchTools } from "./search.js";
|
package/dist/tools/people.js
CHANGED
package/dist/tools/recordings.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-notes.d.ts","sourceRoot":"","sources":["../../src/tools/release-notes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAyBtE,qBAAa,0BAA0B;IACzB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAE3C,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"release-notes.d.ts","sourceRoot":"","sources":["../../src/tools/release-notes.ts"],"names":[],"mappings":"AAIA;;;;;;;;;GASG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAyBtE,qBAAa,0BAA0B;IACzB,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,eAAe;IAE3C,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;IA8CzE,OAAO,CAAC,YAAY,CAyDlB;CACH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
import { parseChangelogText, CHANGELOG_SECTION_NAMES, } from "../lib/changelog.js";
|
|
3
3
|
import { CHANGELOG_MD, PACKAGE_NAME, PACKAGE_VERSION, } from "../lib/changelog.generated.js";
|
|
4
4
|
const RESOURCE_URI = "release-notes://withpica/mcp-server-directory/latest";
|
|
@@ -34,7 +34,8 @@ export class DirectoryReleaseNotesTools {
|
|
|
34
34
|
"directory_list_works / directory_chain for those). " +
|
|
35
35
|
"Returns { package, current_version, releases: [{ version, date, sections, markdown }], resource_uri }. " +
|
|
36
36
|
"Defaults to the last 3 releases; use `since_version` to bound the output " +
|
|
37
|
-
"or `sections` to filter to Added/Fixed/etc."
|
|
37
|
+
"or `sections` to filter to Added/Fixed/etc. " +
|
|
38
|
+
"→ then: directory_search (explore anything a release note mentions)",
|
|
38
39
|
inputSchema: {
|
|
39
40
|
type: "object",
|
|
40
41
|
properties: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"release-notes.js","sourceRoot":"","sources":["../../src/tools/release-notes.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAiB7D,OAAO,EACL,kBAAkB,EAElB,uBAAuB,GACxB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAC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@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAiB;;IAMjC,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"skills.d.ts","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAAE,YAAY,EAAc,MAAM,YAAY,CAAC;AAGtE,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAiB;;IAMjC,QAAQ,IAAI,KAAK,CAAC;QAAE,UAAU,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,YAAY,CAAA;KAAE,CAAC;YA8C3D,UAAU;YAsBV,QAAQ;CA2DvB"}
|
package/dist/tools/skills.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
import { SkillsRegistry, SkillNotFoundError } from "../skills/index.js";
|
|
3
3
|
export class DirectorySkillsTools {
|
|
4
4
|
registry;
|
|
@@ -13,7 +13,8 @@ export class DirectorySkillsTools {
|
|
|
13
13
|
tier: "read",
|
|
14
14
|
description: "Use when the user asks: 'what skills do you have?', 'what can you do?', 'show me your methodologies', 'how do I find music here?'. " +
|
|
15
15
|
"Returns the list of downloadable directory skill methodologies — name, description, trigger phrases. " +
|
|
16
|
-
"Cheap to call.
|
|
16
|
+
"Cheap to call. " +
|
|
17
|
+
"→ then: directory_skill_get (load a specific skill's full methodology body)",
|
|
17
18
|
inputSchema: {
|
|
18
19
|
type: "object",
|
|
19
20
|
properties: {},
|
|
@@ -28,7 +29,8 @@ export class DirectorySkillsTools {
|
|
|
28
29
|
tier: "read",
|
|
29
30
|
description: "Use when the user asks: 'what skills do you have?', 'what can you do?', 'show me your methodologies'. " +
|
|
30
31
|
"Returns the full methodology body for one directory skill — markdown with step-by-step instructions and tool chains. " +
|
|
31
|
-
"Call directory_skill_list first to see available skill names, then directory_skill_get to load one. Read once at the start of the workflow; do not re-fetch on every step."
|
|
32
|
+
"Call directory_skill_list first to see available skill names, then directory_skill_get to load one. Read once at the start of the workflow; do not re-fetch on every step. " +
|
|
33
|
+
"→ then: directory_search (run the loaded methodology against the catalogue)",
|
|
32
34
|
inputSchema: {
|
|
33
35
|
type: "object",
|
|
34
36
|
properties: {
|
package/dist/tools/skills.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAW7D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,OAAO,oBAAoB;IACvB,QAAQ,CAAiB;IAEjC;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IACvC,CAAC;IAED,QAAQ;QACN,OAAO;YACL;gBACE,UAAU,EAAE;oBACV,IAAI,EAAE,sBAAsB;oBAC5B,IAAI,EAAE,MAAM;oBACZ,WAAW,EACT,qIAAqI;wBACrI,uGAAuG;wBACvG,
|
|
1
|
+
{"version":3,"file":"skills.js","sourceRoot":"","sources":["../../src/tools/skills.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAW7D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAExE,MAAM,OAAO,oBAAoB;IACvB,QAAQ,CAAiB;IAEjC;QACE,IAAI,CAAC,QAAQ,GAAG,IAAI,cAAc,EAAE,CAAC;IACvC,CAAC;IAED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AAC,MAAM,EAAE;YAC7B,EAAE;YACF,KAAK;YACL,EAAE;SACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACb,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,kBAAkB,GAAG,KAAK,CAAC,IAAI;iBACtC;aACF;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,WAAW,EAAE,KAAK,CAAC,WAAW;gBAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,cAAc,EAAE,KAAK,CAAC,cAAc;gBACpC,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB;SACF,CAAC;IACJ,CAAC;CACF"}
|
package/dist/tools/works.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAe,SAAQ,KAAK;IAG9B,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,GAAG;gBAFpB,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,GAAG,YAAA;CAMvB;AAED,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;CAI3C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAEA,qBAAa,cAAe,SAAQ,KAAK;IAG9B,IAAI,EAAE,MAAM;IACZ,OAAO,CAAC,EAAE,GAAG;gBAFpB,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,GAAG,YAAA;CAMvB;AAED,qBAAa,kBAAmB,SAAQ,cAAc;gBACxC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;CAI3C;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAuEtE;AA8BD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAS1D"}
|
package/dist/utils/errors.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
export class McpServerError extends Error {
|
|
3
3
|
code;
|
|
4
4
|
details;
|
|
@@ -23,17 +23,70 @@ export function formatError(error) {
|
|
|
23
23
|
text: JSON.stringify({ error: error.code, message: error.message, details: error.details }, null, 2),
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
// Recover a structured error body so a real domain code surfaces instead of
|
|
27
|
+
// collapsing every route failure to UNKNOWN_ERROR. The mcp-sdk wraps the
|
|
28
|
+
// body inside `ApiError("API request failed: <status> <body>")`, so the JSON
|
|
29
|
+
// is not at the start of the string. PICA's api-response.ts errorResponse()
|
|
30
|
+
// emits { success: false, error: { code, message, details } } — `error` is a
|
|
31
|
+
// nested OBJECT; a few routes emit the flat { code, error } / { error_code,
|
|
32
|
+
// message } conventions. Decode all of them.
|
|
33
|
+
const rawMessage = error instanceof Error
|
|
34
|
+
? error.message
|
|
35
|
+
: error?.message || String(error);
|
|
36
|
+
const structuredBody = extractEmbeddedJson(rawMessage);
|
|
37
|
+
const nestedError = structuredBody?.error && typeof structuredBody.error === "object"
|
|
38
|
+
? structuredBody.error
|
|
39
|
+
: null;
|
|
40
|
+
const bodyCode = structuredBody?.error_code ?? structuredBody?.code ?? nestedError?.code;
|
|
41
|
+
const bodyMessage = structuredBody?.message ??
|
|
42
|
+
nestedError?.message ??
|
|
43
|
+
(typeof structuredBody?.error === "string"
|
|
44
|
+
? structuredBody.error
|
|
45
|
+
: undefined);
|
|
46
|
+
const bodyDetails = structuredBody?.details ?? nestedError?.details;
|
|
47
|
+
// Structured error body from the route — propagate the domain-specific code
|
|
48
|
+
// and message rather than the "API request failed: …" wrapper noise.
|
|
49
|
+
if (bodyCode) {
|
|
27
50
|
return {
|
|
28
51
|
type: "text",
|
|
29
|
-
text: JSON.stringify({
|
|
52
|
+
text: JSON.stringify({
|
|
53
|
+
error: bodyCode,
|
|
54
|
+
message: bodyMessage || rawMessage,
|
|
55
|
+
details: bodyDetails,
|
|
56
|
+
}, null, 2),
|
|
30
57
|
};
|
|
31
58
|
}
|
|
32
59
|
return {
|
|
33
60
|
type: "text",
|
|
34
|
-
text: JSON.stringify({
|
|
61
|
+
text: JSON.stringify({
|
|
62
|
+
error: "UNKNOWN_ERROR",
|
|
63
|
+
// A body without a code still carries the real message — surface it.
|
|
64
|
+
message: bodyMessage || rawMessage,
|
|
65
|
+
}, null, 2),
|
|
35
66
|
};
|
|
36
67
|
}
|
|
68
|
+
/**
|
|
69
|
+
* Extract a JSON error body from an error message. The body may be the whole
|
|
70
|
+
* string, or — as the mcp-sdk wraps it — embedded after a prefix
|
|
71
|
+
* ("API request failed: 400 {…}"). Slices from the first `{` to the last `}`
|
|
72
|
+
* so a wrapped body is still recovered. Returns null when there is no
|
|
73
|
+
* parseable object.
|
|
74
|
+
*/
|
|
75
|
+
function extractEmbeddedJson(raw) {
|
|
76
|
+
if (typeof raw !== "string")
|
|
77
|
+
return null;
|
|
78
|
+
const first = raw.indexOf("{");
|
|
79
|
+
const last = raw.lastIndexOf("}");
|
|
80
|
+
if (first === -1 || last <= first)
|
|
81
|
+
return null;
|
|
82
|
+
try {
|
|
83
|
+
const parsed = JSON.parse(raw.slice(first, last + 1));
|
|
84
|
+
return parsed && typeof parsed === "object" ? parsed : null;
|
|
85
|
+
}
|
|
86
|
+
catch {
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
37
90
|
export function logError(context, error) {
|
|
38
91
|
const entry = {
|
|
39
92
|
level: "error",
|
package/dist/utils/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,MAAM,OAAO,cAAe,SAAQ,KAAK;IAG9B;IACA;IAHT,YACE,OAAe,EACR,IAAY,EACZ,OAAa;QAEpB,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAM;QAGpB,IAAI,CAAC,IAAI,GAAG,gBAAgB,CAAC;QAC7B,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACxD,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD,YAAY,OAAe,EAAE,OAAa;QACxC,KAAK,CAAC,OAAO,EAAE,sBAAsB,EAAE,OAAO,CAAC,CAAC;QAChD,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AAED,MAAM,UAAU,WAAW,CAAC,KAAU;IACpC,IAAI,KAAK,YAAY,cAAc,EAAE,CAAC;QACpC,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAClB,EAAE,KAAK,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,EACrE,IAAI,EACJ,CAAC,CACF;SACF,CAAC;IACJ,CAAC;IAED,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/utils/errors.ts"],"names":[],"mappings":"AAAA,6DAA6D;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I,CAAC;IAC/C,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;QACtD,OAAO,MAAM,IAAI,OAAO,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC9D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,OAAe,EAAE,KAAU;IAClD,MAAM,KAAK,GAA4B;QACrC,KAAK,EAAE,OAAO;QACd,OAAO;QACP,OAAO,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAC/D,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;IACF,IAAI,KAAK,YAAY,KAAK,IAAI,KAAK,CAAC,KAAK;QAAE,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;IACrE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"formatting.d.ts","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/C,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC7C;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,GAAG,GAAG,eAAe,CAWvD;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EACpC,KAAK,EAAE,CAAC,EAAE,EACV,UAAU,EAAE,MAAM,EAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAC7B,eAAe,CASjB"}
|
package/dist/utils/formatting.js
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
export function formatAsText(data) {
|
|
3
|
+
// MCP requires structuredContent to be a RECORD — bare arrays are rejected
|
|
4
|
+
// by the SDK server with -32602. Wrap them in the standard list envelope
|
|
5
|
+
// (mirrors @withpica/mcp-utils formatAsText).
|
|
6
|
+
const envelope = Array.isArray(data)
|
|
7
|
+
? { items: data, count: data.length }
|
|
8
|
+
: data;
|
|
3
9
|
return {
|
|
4
|
-
content: [{ type: "text", text: JSON.stringify(
|
|
5
|
-
structuredContent:
|
|
10
|
+
content: [{ type: "text", text: JSON.stringify(envelope, null, 2) }],
|
|
11
|
+
structuredContent: envelope,
|
|
6
12
|
};
|
|
7
13
|
}
|
|
8
14
|
export function formatStructuredList(items, entityName, metadata) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formatting.js","sourceRoot":"","sources":["../../src/utils/formatting.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAO7D,MAAM,UAAU,YAAY,CAAC,IAAS;IACpC,OAAO;QACL,OAAO,EAAE,C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
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
preset: 'ts-jest/presets/default-esm',
|
|
@@ -15,6 +15,9 @@ export default {
|
|
|
15
15
|
tsconfig: {
|
|
16
16
|
module: 'ESNext',
|
|
17
17
|
moduleResolution: 'node',
|
|
18
|
+
// TS 6.0 errors (TS5107) on the deprecated node10 resolution that
|
|
19
|
+
// 'node' now aliases. Silence until TS 7.0 forces migration.
|
|
20
|
+
ignoreDeprecations: '6.0',
|
|
18
21
|
},
|
|
19
22
|
},
|
|
20
23
|
],
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withpica/mcp-server-directory",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "MCP Server for the withPICA Public Directory — enables AI assistants to search verified works and creators",
|
|
5
|
+
"homepage": "https://withpica.com/connect",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"email": "support@withpica.com"
|
|
8
|
+
},
|
|
5
9
|
"type": "module",
|
|
6
10
|
"main": "dist/index.js",
|
|
7
11
|
"bin": {
|
|
@@ -9,7 +13,7 @@
|
|
|
9
13
|
},
|
|
10
14
|
"scripts": {
|
|
11
15
|
"prebuild": "tsx scripts/build-changelog.ts && tsx scripts/build-skills.ts",
|
|
12
|
-
"build": "tsc",
|
|
16
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
13
17
|
"dev": "tsx src/index.ts",
|
|
14
18
|
"start": "node dist/index.js",
|
|
15
19
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest",
|
|
@@ -25,11 +29,11 @@
|
|
|
25
29
|
},
|
|
26
30
|
"devDependencies": {
|
|
27
31
|
"@types/jest": "^29.5.14",
|
|
28
|
-
"@types/node": "^20.
|
|
32
|
+
"@types/node": "^20.19.43",
|
|
29
33
|
"jest": "^29.7.0",
|
|
30
34
|
"ts-jest": "^29.4.5",
|
|
31
35
|
"tsx": "^4.7.0",
|
|
32
|
-
"typescript": "^
|
|
36
|
+
"typescript": "^6.0.3"
|
|
33
37
|
},
|
|
34
38
|
"engines": {
|
|
35
39
|
"node": ">=18.0.0"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Copyright (c)
|
|
1
|
+
// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.
|
|
2
2
|
|
|
3
3
|
import { readFileSync, writeFileSync } from "fs";
|
|
4
4
|
import { resolve, dirname } from "path";
|
|
@@ -15,7 +15,7 @@ const escaped = JSON.stringify(md);
|
|
|
15
15
|
|
|
16
16
|
writeFileSync(
|
|
17
17
|
outPath,
|
|
18
|
-
`// Copyright (c)
|
|
18
|
+
`// Copyright (c) 2025-2026 Withpica Ltd. All rights reserved.\n` +
|
|
19
19
|
`// Generated by scripts/build-changelog.ts — do not edit.\n\n` +
|
|
20
20
|
`export const CHANGELOG_MD = ${escaped};\n` +
|
|
21
21
|
`export const PACKAGE_NAME = ${JSON.stringify(pkg.name)};\n` +
|