@withpica/mcp-server 2.95.2 → 2.95.4

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.
Files changed (206) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.intro.md +115 -0
  3. package/README.md +188 -204
  4. package/dist/lib/changelog.generated.d.ts +2 -2
  5. package/dist/lib/changelog.generated.d.ts.map +1 -1
  6. package/dist/lib/changelog.generated.js +2 -2
  7. package/dist/lib/changelog.generated.js.map +1 -1
  8. package/dist/prompts/index.js +4 -4
  9. package/dist/prompts/index.js.map +1 -1
  10. package/dist/resources/agent-guide.d.ts +50 -4
  11. package/dist/resources/agent-guide.d.ts.map +1 -1
  12. package/dist/resources/agent-guide.js +109 -18
  13. package/dist/resources/agent-guide.js.map +1 -1
  14. package/dist/resources/index.d.ts.map +1 -1
  15. package/dist/resources/index.js +81 -2
  16. package/dist/resources/index.js.map +1 -1
  17. package/dist/resources/llms-primer.d.ts +1 -1
  18. package/dist/resources/llms-primer.d.ts.map +1 -1
  19. package/dist/resources/llms-primer.js +1 -1
  20. package/dist/resources/required-schemas.generated.d.ts +24 -12
  21. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  22. package/dist/resources/required-schemas.generated.js +31 -18
  23. package/dist/resources/required-schemas.generated.js.map +1 -1
  24. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  25. package/dist/resources/required-schemas.source.js +39 -15
  26. package/dist/resources/required-schemas.source.js.map +1 -1
  27. package/dist/server-instructions.d.ts +2 -2
  28. package/dist/server-instructions.d.ts.map +1 -1
  29. package/dist/server-instructions.js +5 -5
  30. package/dist/server-instructions.js.map +1 -1
  31. package/dist/skills/skills.generated.d.ts.map +1 -1
  32. package/dist/skills/skills.generated.js +23 -14
  33. package/dist/skills/skills.generated.js.map +1 -1
  34. package/dist/tools/agent-identity.d.ts.map +1 -1
  35. package/dist/tools/agent-identity.js +2 -1
  36. package/dist/tools/agent-identity.js.map +1 -1
  37. package/dist/tools/agreement-types.d.ts.map +1 -1
  38. package/dist/tools/agreement-types.js +23 -11
  39. package/dist/tools/agreement-types.js.map +1 -1
  40. package/dist/tools/agreements.d.ts.map +1 -1
  41. package/dist/tools/agreements.js +17 -9
  42. package/dist/tools/agreements.js.map +1 -1
  43. package/dist/tools/analytics.d.ts.map +1 -1
  44. package/dist/tools/analytics.js +6 -3
  45. package/dist/tools/analytics.js.map +1 -1
  46. package/dist/tools/assets.d.ts.map +1 -1
  47. package/dist/tools/assets.js +20 -13
  48. package/dist/tools/assets.js.map +1 -1
  49. package/dist/tools/audio-files.d.ts.map +1 -1
  50. package/dist/tools/audio-files.js +5 -3
  51. package/dist/tools/audio-files.js.map +1 -1
  52. package/dist/tools/bulk.d.ts.map +1 -1
  53. package/dist/tools/bulk.js +15 -9
  54. package/dist/tools/bulk.js.map +1 -1
  55. package/dist/tools/collaborators.d.ts.map +1 -1
  56. package/dist/tools/collaborators.js +41 -16
  57. package/dist/tools/collaborators.js.map +1 -1
  58. package/dist/tools/comparisons.d.ts.map +1 -1
  59. package/dist/tools/comparisons.js +2 -1
  60. package/dist/tools/comparisons.js.map +1 -1
  61. package/dist/tools/credits.d.ts +4 -3
  62. package/dist/tools/credits.d.ts.map +1 -1
  63. package/dist/tools/credits.js +16 -88
  64. package/dist/tools/credits.js.map +1 -1
  65. package/dist/tools/custody.d.ts.map +1 -1
  66. package/dist/tools/custody.js +43 -10
  67. package/dist/tools/custody.js.map +1 -1
  68. package/dist/tools/dashboard.d.ts.map +1 -1
  69. package/dist/tools/dashboard.js +38 -19
  70. package/dist/tools/dashboard.js.map +1 -1
  71. package/dist/tools/deprecations.d.ts +12 -2
  72. package/dist/tools/deprecations.d.ts.map +1 -1
  73. package/dist/tools/deprecations.js +22 -12
  74. package/dist/tools/deprecations.js.map +1 -1
  75. package/dist/tools/directory.d.ts.map +1 -1
  76. package/dist/tools/directory.js +7 -4
  77. package/dist/tools/directory.js.map +1 -1
  78. package/dist/tools/discovery.d.ts +66 -10
  79. package/dist/tools/discovery.d.ts.map +1 -1
  80. package/dist/tools/discovery.js +221 -25
  81. package/dist/tools/discovery.js.map +1 -1
  82. package/dist/tools/disputes.d.ts.map +1 -1
  83. package/dist/tools/disputes.js +3 -0
  84. package/dist/tools/disputes.js.map +1 -1
  85. package/dist/tools/documents.d.ts.map +1 -1
  86. package/dist/tools/documents.js +9 -6
  87. package/dist/tools/documents.js.map +1 -1
  88. package/dist/tools/enrichment.d.ts +14 -0
  89. package/dist/tools/enrichment.d.ts.map +1 -1
  90. package/dist/tools/enrichment.js +217 -16
  91. package/dist/tools/enrichment.js.map +1 -1
  92. package/dist/tools/error-envelope.d.ts +44 -0
  93. package/dist/tools/error-envelope.d.ts.map +1 -0
  94. package/dist/tools/error-envelope.js +17 -0
  95. package/dist/tools/error-envelope.js.map +1 -0
  96. package/dist/tools/exports.d.ts +4 -0
  97. package/dist/tools/exports.d.ts.map +1 -1
  98. package/dist/tools/exports.js +158 -6
  99. package/dist/tools/exports.js.map +1 -1
  100. package/dist/tools/groups.d.ts.map +1 -1
  101. package/dist/tools/groups.js +1 -0
  102. package/dist/tools/groups.js.map +1 -1
  103. package/dist/tools/import-documents.d.ts.map +1 -1
  104. package/dist/tools/import-documents.js +3 -2
  105. package/dist/tools/import-documents.js.map +1 -1
  106. package/dist/tools/import.d.ts.map +1 -1
  107. package/dist/tools/import.js +71 -38
  108. package/dist/tools/import.js.map +1 -1
  109. package/dist/tools/index.d.ts +53 -4
  110. package/dist/tools/index.d.ts.map +1 -1
  111. package/dist/tools/index.js +166 -38
  112. package/dist/tools/index.js.map +1 -1
  113. package/dist/tools/licensing.d.ts.map +1 -1
  114. package/dist/tools/licensing.js +6 -2
  115. package/dist/tools/licensing.js.map +1 -1
  116. package/dist/tools/memory.d.ts.map +1 -1
  117. package/dist/tools/memory.js +8 -4
  118. package/dist/tools/memory.js.map +1 -1
  119. package/dist/tools/metadata.d.ts +7 -1
  120. package/dist/tools/metadata.d.ts.map +1 -1
  121. package/dist/tools/metadata.js +65 -2
  122. package/dist/tools/metadata.js.map +1 -1
  123. package/dist/tools/multimedia.d.ts.map +1 -1
  124. package/dist/tools/multimedia.js +7 -3
  125. package/dist/tools/multimedia.js.map +1 -1
  126. package/dist/tools/notes.d.ts.map +1 -1
  127. package/dist/tools/notes.js +9 -6
  128. package/dist/tools/notes.js.map +1 -1
  129. package/dist/tools/notifications.d.ts.map +1 -1
  130. package/dist/tools/notifications.js +16 -27
  131. package/dist/tools/notifications.js.map +1 -1
  132. package/dist/tools/people.d.ts.map +1 -1
  133. package/dist/tools/people.js +8 -5
  134. package/dist/tools/people.js.map +1 -1
  135. package/dist/tools/projects.d.ts.map +1 -1
  136. package/dist/tools/projects.js +16 -12
  137. package/dist/tools/projects.js.map +1 -1
  138. package/dist/tools/recording-custody.d.ts.map +1 -1
  139. package/dist/tools/recording-custody.js +9 -5
  140. package/dist/tools/recording-custody.js.map +1 -1
  141. package/dist/tools/recording-samples.d.ts.map +1 -1
  142. package/dist/tools/recording-samples.js +25 -6
  143. package/dist/tools/recording-samples.js.map +1 -1
  144. package/dist/tools/recordings.d.ts +10 -0
  145. package/dist/tools/recordings.d.ts.map +1 -1
  146. package/dist/tools/recordings.js +32 -19
  147. package/dist/tools/recordings.js.map +1 -1
  148. package/dist/tools/recovery-hints.d.ts.map +1 -1
  149. package/dist/tools/recovery-hints.js +58 -17
  150. package/dist/tools/recovery-hints.js.map +1 -1
  151. package/dist/tools/release-rich.js +5 -5
  152. package/dist/tools/release-rich.js.map +1 -1
  153. package/dist/tools/releases.d.ts.map +1 -1
  154. package/dist/tools/releases.js +21 -12
  155. package/dist/tools/releases.js.map +1 -1
  156. package/dist/tools/royalties.d.ts.map +1 -1
  157. package/dist/tools/royalties.js +12 -6
  158. package/dist/tools/royalties.js.map +1 -1
  159. package/dist/tools/send.d.ts.map +1 -1
  160. package/dist/tools/send.js +7 -4
  161. package/dist/tools/send.js.map +1 -1
  162. package/dist/tools/sessions.d.ts.map +1 -1
  163. package/dist/tools/sessions.js +8 -4
  164. package/dist/tools/sessions.js.map +1 -1
  165. package/dist/tools/settings.d.ts.map +1 -1
  166. package/dist/tools/settings.js +10 -4
  167. package/dist/tools/settings.js.map +1 -1
  168. package/dist/tools/share-links.d.ts.map +1 -1
  169. package/dist/tools/share-links.js +7 -3
  170. package/dist/tools/share-links.js.map +1 -1
  171. package/dist/tools/share-send.d.ts.map +1 -1
  172. package/dist/tools/share-send.js +15 -5
  173. package/dist/tools/share-send.js.map +1 -1
  174. package/dist/tools/shows.d.ts +31 -0
  175. package/dist/tools/shows.d.ts.map +1 -0
  176. package/dist/tools/shows.js +307 -0
  177. package/dist/tools/shows.js.map +1 -0
  178. package/dist/tools/skills.d.ts.map +1 -1
  179. package/dist/tools/skills.js +7 -0
  180. package/dist/tools/skills.js.map +1 -1
  181. package/dist/tools/split-sheets.d.ts.map +1 -1
  182. package/dist/tools/split-sheets.js +19 -12
  183. package/dist/tools/split-sheets.js.map +1 -1
  184. package/dist/tools/statements.js +2 -2
  185. package/dist/tools/statements.js.map +1 -1
  186. package/dist/tools/storage-config.d.ts.map +1 -1
  187. package/dist/tools/storage-config.js +5 -3
  188. package/dist/tools/storage-config.js.map +1 -1
  189. package/dist/tools/subscription.d.ts +69 -19
  190. package/dist/tools/subscription.d.ts.map +1 -1
  191. package/dist/tools/subscription.js +98 -255
  192. package/dist/tools/subscription.js.map +1 -1
  193. package/dist/tools/sync-placements.d.ts.map +1 -1
  194. package/dist/tools/sync-placements.js +10 -5
  195. package/dist/tools/sync-placements.js.map +1 -1
  196. package/dist/tools/telegram.d.ts.map +1 -1
  197. package/dist/tools/telegram.js +16 -24
  198. package/dist/tools/telegram.js.map +1 -1
  199. package/dist/tools/users.d.ts.map +1 -1
  200. package/dist/tools/users.js +12 -6
  201. package/dist/tools/users.js.map +1 -1
  202. package/dist/tools/works.d.ts.map +1 -1
  203. package/dist/tools/works.js +13 -10
  204. package/dist/tools/works.js.map +1 -1
  205. package/package.json +7 -3
  206. package/server.json +2 -2
package/CHANGELOG.md CHANGED
@@ -11,6 +11,52 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.95.4] - 2026-08-25
15
+
16
+ An agent-readability release. Nothing about auth, tiers or tool behaviour changes; what changes is what a tool **tells** an agent about itself, and the shape of a refusal.
17
+
18
+ ### Added
19
+
20
+ - **`pica_dashboard_briefing` reports what pica is holding.** The `found` block carries `held: { count, entities }` — findings pica produced but is HOLDING because the org is past its free runway or over its allowance (WS-A of the MPP spec, #2027; dormant unless billing enforcement is on).
21
+ - **Every tool now names the sibling it is most confused with.** 141 descriptions across every 3-or-more-member family gained a clause saying which same-family tool to prefer and when — derived from that sibling's own description and schema, not invented. Families with verb-first names (`pica_get_*`, `pica_update_*`) are deliberately exempt: those segments group unrelated tools by verb, so "name a sibling in your family" has no meaning for them. Where a description had to grow, over-long ones were paid for by dropping text the tool's own `inputSchema` or `nextSteps` already carried.
22
+ - **`did_you_mean` on a missed tool name.** An unknown inner tool via `pica_execute` now comes back with ranked candidates plus `next_tool: pica_discover`. Candidates never include a deprecated alias, and on the HTTP surface they are drawn only from tools the caller can actually see.
23
+
24
+ ### Changed
25
+
26
+ - **⚠️ Wire change: an unknown tool now returns `TOOL_NOT_FOUND`, not `UNKNOWN_TOOL`.** The code read `UNKNOWN_TOOL` from 2026-07-03 until now. A client matching on the old literal will stop recognising this refusal — match on `isError` instead, which is set on every refusal. The `suggestions` key is kept alongside the new `did_you_mean` so existing readers keep working.
27
+ - **The HTTP dispatcher's bare `Not found` is now the same typed envelope.** An unregistered inner tool name was refused at the gate-shadow step before the registry's typed envelope could run. A registered-but-hidden name keeps its previous refusal, so the change leaks no information about tools the caller may not see.
28
+ - **Annotations are now derived for every tool on both surfaces.** `pica_tool_details` returned `annotations: null` for 275 of 332 tools because it passed the raw declaration through while `tools/list` derived hints from tier. Both now go through one derivation. Two consequences a client may notice: `openWorldHint` follows `createsExternalSideEffects`, so **24 tools flip `false` → `true` on the flat surface** (they already published that side-effect flag by another name — nothing about their behaviour changed); and a **declared** `idempotentHint` now wins over the derived value, which flips **4 tools**. Treat both as corrections to hints that were previously wrong or absent, not as new capability.
29
+ - **`pica_skill_get` puts the skill body in `structuredContent`.** The methodology travelled only in the text block, so clients that prefer `structuredContent` (claude.ai among them) received frontmatter and nothing to follow.
30
+ - **No live surface recommends a deprecated alias any more.** Server instructions, 7 tool descriptions, 17 recovery-hint `next_tool` values, 2 skills and 2 resources pointed agents at alias names. All now name the canonical tool. The alias names still resolve — the only remaining mentions are the aliases' own registration rows.
31
+ - **Refusals are typed envelopes with a `SCREAMING_SNAKE` code.** The notifications and telegram tools returned _success_ envelopes carrying an `error` key with no `isError`, so an agent read a failure as a success; credits and import returned bare prose. All four now share one error envelope.
32
+ - **The agent guide computes its counts at serve time** from the caller-visible tool set, instead of reciting numbers written down by hand and since drifted. It also drops a `mode:` parameter that never existed on the schema and a `prs_work_id` removed under ADR-282.
33
+ - **`pica_discover` ranking singularises tokens properly.** The old `-es` rule turned `notes` into `not` (a false hit on every query containing "not") and `releases` into `releas` (never matching "release"). Domain segments are now weighted, so a query naming a domain reaches that domain's tools first.
34
+ - Server instructions state what the registry actually enforces for `sections` / `limit` (3,110 / 3,200) instead of a softer claim.
35
+ - **`pica_import_execute` now imports one slice per call and tells you where to continue.** A call runs synchronously under the route's ~2 minute budget, so the server imports at most `row_limit` rows (default 2,000, max 10,000) from `row_offset` (default 0) and returns `rowRange.nextOffset` — call again with `row_offset: nextOffset` until it is null. The old "max 10,000 rows per import" claim was not honourable inside the budget: a call the budget ended committed its batches and reported nothing. For files over ~2,000 rows, upload once with `pica_upload_file` → `pica_upload_complete` and pass `file_id` so the CSV is not re-sent per call. (ADR-314)
36
+
37
+ - **`pica_import_execute` no longer loses a whole batch to one duplicate, and no longer reports a partial commit as a failure.** `conflict_strategy` now defaults to `"skip"` (a row that trips a unique constraint becomes a warning; every other row in its batch still lands) instead of `"error"` (one 23505 discarded the batch). A live run that wrote rows and also carries errors is answered `Import PARTIALLY complete: N created …` with `partial: true` in the payload and an explicit "the created rows are saved, do not re-send the whole file" instruction, because the backing route now returns 200 for a partial commit (400 is reserved for runs that wrote nothing). Observed 2026-08-17: a 2,239-row catalogue import lost a 500-row batch to a single repeated title, was told it had failed while 1,742 rows were already saved, and re-sent the file three times. Pass `conflict_strategy: "error"` explicitly to keep all-or-nothing batches.
38
+ - **`pica_upload_file` / `pica_upload_complete` work on a `write:files` credential again.** The platform's bearer write-scope floor had `/api/admin/storage/**` (the two routes these tools call) floored to `admin`, so every connector — none holds `admin` — was refused "insufficient scope: requires admin". Fixed on the platform side (no package change required); noted here because the tools' declared `write:files` scope was correct all along.
39
+ - **`pica_notifications_recent` / the directory server count.** The `.well-known` directory listing and `pica_discover` count 11 directory tools (was 9 by drift), and the one destructive directory tool no longer wears a write tier — pinned by a parity tripwire (#2024).
40
+
41
+ ### Fixed
42
+
43
+ - **The daily briefing counted one work three times.** `entityIds` were not deduplicated, so a single work touched by three events reported as "3 works". Counts are deduplicated and a `canonical_total` now travels with them.
44
+ - Internal vocabulary left agent-facing copy in bulk: table names, CHECK-constraint names, HTTP status codes, `jsonb`, repository paths, "1 credit each" and internal constant names were removed from descriptions and required-schema copy. An agent handed a repository path cannot open it, and repeats it to the user as if it were vocabulary they should already know.
45
+
46
+ > Patch, not minor, on purpose: `2.96.0` stays reserved for the WS5 deprecated-alias removals, which `src/tools/deprecations.ts` enforces as its removal target. No alias is removed in this release.
47
+
48
+ ## [2.95.3] - 2026-08-18
49
+
50
+ ### Fixed
51
+
52
+ - **`tools/list` no longer publishes this package's own authoring metadata.** `ToolDefinition` is two types wearing one name — the MCP `Tool` a client consumes, and the compile-time declarations our lint reads — and `listTools()` spread the whole object, so every field of the second kind crossed the wire. `vernacular_kind`, `vernacular_reason` and `annotationOverrides` are now stripped at the wire boundary. **Not a breaking change:** none of the three is part of the MCP `Tool` schema, no documented behaviour read them, and everything a client acts on (`name`, `description`, `inputSchema`, `annotations`, `tier`, `scope`, `audiences`, `workflows`) is untouched. The registry's own view is untouched too, so tooling that reads definitions in-process still sees them.
53
+ - **The handshake and the skill bodies no longer cite internal decision records.** `vernacular_reason` on ~30 tools read "Specialist context; not yet covered by the Creator Question Atlas — pending telemetry-driven addition per ADR-226 Phase 4 substrate writes"; five `SKILL.md` bodies, two prompt bodies and the server instructions carried similar citations. An ADR number is a coordinate into a repository the reader cannot open, and an agent handed one repeats it to a user as if it were vocabulary they should already know — which is exactly what happened in a real connector session on 2026-08-18.
54
+ - **The handshake's URI-shape pointer now names something reachable.** It read `docs/mcp-source-uri-conventions.md` — a path in the app repository, handed to agents that have no checkout. It now names `pica_skill_get("enrich-from-peer-mcps")`, the skill that actually carries the scheme table, which an agent can follow in one call.
55
+
56
+ > Patch, not minor, on purpose: `2.96.0` stays reserved for the WS5 deprecated-alias removals, which `src/tools/deprecations.ts` enforces as its removal target. Bumping the minor here would bring that deadline forward by accident.
57
+
58
+ > Scope note for anyone tracing this: the stripped-metadata leak affected the **stdio** surface — this package's flat `tools/list`. The app's HTTP transport serves layered discovery, where `tools/list` returns only the meta tools and `pica_discover` / `pica_tool_details` build responses by picking fields explicitly, so a connector was never reading it. The handshake and skill-body fixes reach both surfaces.
59
+
14
60
  ## [2.95.2] - 2026-07-28
15
61
 
16
62
  ### Added
@@ -0,0 +1,115 @@
1
+ <!--
2
+ Hand-written prose for the two published npm READMEs.
3
+
4
+ `scripts/build-mcp-readmes.mjs` splices each block below onto a generated
5
+ tool inventory and writes `mcp-server/README.md` and
6
+ `mcp-server-directory/README.md`. Edit the prose HERE; never edit the
7
+ generated files, which carry a do-not-edit banner and are checked by
8
+ `node scripts/build-mcp-readmes.mjs --check`.
9
+
10
+ Both intros live in this one file because the generator has one input for
11
+ prose and one for structure. The markers below are load-bearing — the
12
+ generator splits on them.
13
+ -->
14
+
15
+ <!-- readme:mcp-server -->
16
+
17
+ # @withpica/mcp-server
18
+
19
+ MCP server for **withPICA** — music catalog management through conversation. Works, recordings, credits, agreements, rights, royalties, enrichment and registration-ready exports, from Claude, ChatGPT, Cursor, or any MCP-compatible client.
20
+
21
+ > **Not the same product as `@picahq/mcp`.** That is Pica / picaos.com, an unrelated API-integrations tool that happens to share the short name. If your assistant starts talking about integrations it never set up, or asks you to paste credentials into a dashboard, you have the other one installed.
22
+
23
+ ## Install
24
+
25
+ ```bash
26
+ claude mcp add withpica -- npx --yes @withpica/mcp-server@latest
27
+ ```
28
+
29
+ Or, in any client that reads an `mcpServers` config:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "withpica": {
35
+ "command": "npx",
36
+ "args": ["@withpica/mcp-server"]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Signing in
43
+
44
+ **On stdio (this package), no API key is needed up front.** Say _"sign me in to withpica"_ in chat; `pica_sign_in` emails you a magic link, you click it, and your tools unlock. `PICA_API_KEY` in the environment also works and skips the link.
45
+
46
+ **On the hosted HTTP transport** (`https://withpica.com/api/mcp`) there is no in-chat sign-in — `pica_sign_in` and `pica_sign_out` are stdio-only, because the credential file they write would land on an ephemeral filesystem your client never reads. Connect over OAuth 2.1 instead (dynamic client registration + PKCE S256, discovery at `https://withpica.com/.well-known/oauth-protected-resource`), or send an API key as a Bearer token. A Bearer caller should call `pica_introduce_self` first: PICA stamps that declaration onto every audit row that follows, so the owner can later reconstruct what their agent did.
47
+
48
+ API keys are created and revoked at <https://withpica.com/settings?tab=connections>.
49
+
50
+ ## How the tools are surfaced
51
+
52
+ Over HTTP the server advertises a small meta-tool surface by default — `pica_discover` → `pica_tool_details` → `pica_execute` — so a schema-constrained client is not handed the whole registry at once. Every tool stays callable by name. Add `?layered=0` to the endpoint for the eager list.
53
+
54
+ Over stdio the full set is listed directly.
55
+
56
+ `pica_skill_list` / `pica_skill_get` load methodologies (catalog-audit, register-my-works, prepare-for-sync) as needed, rather than at handshake.
57
+
58
+ ## Safety
59
+
60
+ Read tools are annotated read-only and are safe to call freely. Write tools report what changed. Destructive tools (delete, merge) require a two-step confirmation token and an elevated scope that ordinary agent grants cannot hold.
61
+
62
+ ## Environment variables
63
+
64
+ | variable | required | meaning |
65
+ | -------------- | -------- | ------------------------------------------------- |
66
+ | `PICA_API_KEY` | no | skips the magic-link flow |
67
+ | `PICA_API_URL` | no | API base URL (default `https://withpica.com/api`) |
68
+ | `DEBUG` | no | verbose logging to stderr (`true` / `1`) |
69
+
70
+ ## Links
71
+
72
+ - Connect guide: <https://withpica.com/connect>
73
+ - Machine-readable: <https://withpica.com/llms.txt>, <https://withpica.com/connect/llms.txt>
74
+ - Discovery: <https://withpica.com/.well-known/mcp.json>
75
+ - Support: support@withpica.com
76
+
77
+ <!-- readme:mcp-server-directory -->
78
+
79
+ # @withpica/mcp-server-directory
80
+
81
+ 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.
82
+
83
+ ## Install
84
+
85
+ ```bash
86
+ claude mcp add withpica-directory -- npx --yes @withpica/mcp-server-directory@latest
87
+ ```
88
+
89
+ ## What it can answer
90
+
91
+ 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.
92
+
93
+ Every entry is published deliberately by its rights holder, with attested credits and verified identifiers.
94
+
95
+ ## REST, if you would rather not run a process
96
+
97
+ - `GET https://withpica.com/api/public/directory/works`
98
+ - `GET https://withpica.com/api/public/directory/people`
99
+ - `GET https://withpica.com/api/public/directory/search?q={query}`
100
+ - `GET https://withpica.com/api/public/directory/recordings`
101
+ - `GET https://withpica.com/api/public/directory/consent?iswc={iswc}`
102
+
103
+ 100 requests/minute unauthenticated. Licensing keys unlock extended fields and their own limits.
104
+
105
+ ## Before you train on any of this
106
+
107
+ 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.
108
+
109
+ 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.
110
+
111
+ ## Links
112
+
113
+ - Directory: <https://directory.withpica.com>
114
+ - Machine-readable: <https://withpica.com/directory/llms.txt>
115
+ - Support: support@withpica.com