@withpica/mcp-server 2.95.3 → 2.96.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.
Files changed (206) hide show
  1. package/CHANGELOG.md +72 -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/creator-question-atlas.d.ts.map +1 -1
  9. package/dist/prompts/creator-question-atlas.js +11 -0
  10. package/dist/prompts/creator-question-atlas.js.map +1 -1
  11. package/dist/prompts/index.js +2 -2
  12. package/dist/resources/agent-guide.d.ts +50 -4
  13. package/dist/resources/agent-guide.d.ts.map +1 -1
  14. package/dist/resources/agent-guide.js +109 -18
  15. package/dist/resources/agent-guide.js.map +1 -1
  16. package/dist/resources/index.d.ts.map +1 -1
  17. package/dist/resources/index.js +81 -2
  18. package/dist/resources/index.js.map +1 -1
  19. package/dist/resources/llms-primer.d.ts +1 -1
  20. package/dist/resources/llms-primer.d.ts.map +1 -1
  21. package/dist/resources/llms-primer.js +1 -1
  22. package/dist/resources/required-schemas.generated.d.ts +3 -12
  23. package/dist/resources/required-schemas.generated.d.ts.map +1 -1
  24. package/dist/resources/required-schemas.generated.js +3 -18
  25. package/dist/resources/required-schemas.generated.js.map +1 -1
  26. package/dist/resources/required-schemas.source.d.ts.map +1 -1
  27. package/dist/resources/required-schemas.source.js +13 -15
  28. package/dist/resources/required-schemas.source.js.map +1 -1
  29. package/dist/server-instructions.d.ts +2 -2
  30. package/dist/server-instructions.d.ts.map +1 -1
  31. package/dist/server-instructions.js +3 -3
  32. package/dist/skills/skills.generated.d.ts.map +1 -1
  33. package/dist/skills/skills.generated.js +18 -9
  34. package/dist/skills/skills.generated.js.map +1 -1
  35. package/dist/tools/agent-identity.d.ts.map +1 -1
  36. package/dist/tools/agent-identity.js +2 -1
  37. package/dist/tools/agent-identity.js.map +1 -1
  38. package/dist/tools/agreement-types.d.ts.map +1 -1
  39. package/dist/tools/agreement-types.js +23 -11
  40. package/dist/tools/agreement-types.js.map +1 -1
  41. package/dist/tools/agreements.d.ts.map +1 -1
  42. package/dist/tools/agreements.js +17 -9
  43. package/dist/tools/agreements.js.map +1 -1
  44. package/dist/tools/analytics.d.ts.map +1 -1
  45. package/dist/tools/analytics.js +6 -3
  46. package/dist/tools/analytics.js.map +1 -1
  47. package/dist/tools/assets.d.ts.map +1 -1
  48. package/dist/tools/assets.js +20 -13
  49. package/dist/tools/assets.js.map +1 -1
  50. package/dist/tools/audio-files.d.ts.map +1 -1
  51. package/dist/tools/audio-files.js +5 -3
  52. package/dist/tools/audio-files.js.map +1 -1
  53. package/dist/tools/bulk.d.ts.map +1 -1
  54. package/dist/tools/bulk.js +15 -9
  55. package/dist/tools/bulk.js.map +1 -1
  56. package/dist/tools/collaborators.d.ts.map +1 -1
  57. package/dist/tools/collaborators.js +41 -16
  58. package/dist/tools/collaborators.js.map +1 -1
  59. package/dist/tools/comparisons.d.ts.map +1 -1
  60. package/dist/tools/comparisons.js +2 -1
  61. package/dist/tools/comparisons.js.map +1 -1
  62. package/dist/tools/credits.d.ts +4 -3
  63. package/dist/tools/credits.d.ts.map +1 -1
  64. package/dist/tools/credits.js +16 -88
  65. package/dist/tools/credits.js.map +1 -1
  66. package/dist/tools/custody.d.ts.map +1 -1
  67. package/dist/tools/custody.js +43 -10
  68. package/dist/tools/custody.js.map +1 -1
  69. package/dist/tools/dashboard.d.ts.map +1 -1
  70. package/dist/tools/dashboard.js +24 -20
  71. package/dist/tools/dashboard.js.map +1 -1
  72. package/dist/tools/deprecations.d.ts +14 -7
  73. package/dist/tools/deprecations.d.ts.map +1 -1
  74. package/dist/tools/deprecations.js +24 -17
  75. package/dist/tools/deprecations.js.map +1 -1
  76. package/dist/tools/directory.d.ts.map +1 -1
  77. package/dist/tools/directory.js +7 -4
  78. package/dist/tools/directory.js.map +1 -1
  79. package/dist/tools/discovery.d.ts +120 -11
  80. package/dist/tools/discovery.d.ts.map +1 -1
  81. package/dist/tools/discovery.js +414 -38
  82. package/dist/tools/discovery.js.map +1 -1
  83. package/dist/tools/disputes.d.ts.map +1 -1
  84. package/dist/tools/disputes.js +3 -0
  85. package/dist/tools/disputes.js.map +1 -1
  86. package/dist/tools/documents.d.ts.map +1 -1
  87. package/dist/tools/documents.js +9 -6
  88. package/dist/tools/documents.js.map +1 -1
  89. package/dist/tools/enrichment.d.ts.map +1 -1
  90. package/dist/tools/enrichment.js +92 -14
  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.map +1 -1
  97. package/dist/tools/exports.js +24 -9
  98. package/dist/tools/exports.js.map +1 -1
  99. package/dist/tools/groups.d.ts.map +1 -1
  100. package/dist/tools/groups.js +1 -0
  101. package/dist/tools/groups.js.map +1 -1
  102. package/dist/tools/import-documents.d.ts.map +1 -1
  103. package/dist/tools/import-documents.js +3 -2
  104. package/dist/tools/import-documents.js.map +1 -1
  105. package/dist/tools/import.d.ts.map +1 -1
  106. package/dist/tools/import.js +71 -38
  107. package/dist/tools/import.js.map +1 -1
  108. package/dist/tools/index.d.ts +71 -4
  109. package/dist/tools/index.d.ts.map +1 -1
  110. package/dist/tools/index.js +160 -41
  111. package/dist/tools/index.js.map +1 -1
  112. package/dist/tools/licensing.d.ts.map +1 -1
  113. package/dist/tools/licensing.js +6 -2
  114. package/dist/tools/licensing.js.map +1 -1
  115. package/dist/tools/memory.d.ts.map +1 -1
  116. package/dist/tools/memory.js +8 -4
  117. package/dist/tools/memory.js.map +1 -1
  118. package/dist/tools/metadata.d.ts +7 -1
  119. package/dist/tools/metadata.d.ts.map +1 -1
  120. package/dist/tools/metadata.js +61 -12
  121. package/dist/tools/metadata.js.map +1 -1
  122. package/dist/tools/multimedia.d.ts.map +1 -1
  123. package/dist/tools/multimedia.js +7 -3
  124. package/dist/tools/multimedia.js.map +1 -1
  125. package/dist/tools/notes.d.ts.map +1 -1
  126. package/dist/tools/notes.js +9 -6
  127. package/dist/tools/notes.js.map +1 -1
  128. package/dist/tools/notifications.d.ts.map +1 -1
  129. package/dist/tools/notifications.js +16 -27
  130. package/dist/tools/notifications.js.map +1 -1
  131. package/dist/tools/people.d.ts.map +1 -1
  132. package/dist/tools/people.js +8 -5
  133. package/dist/tools/people.js.map +1 -1
  134. package/dist/tools/projects.d.ts.map +1 -1
  135. package/dist/tools/projects.js +16 -12
  136. package/dist/tools/projects.js.map +1 -1
  137. package/dist/tools/recording-custody.d.ts.map +1 -1
  138. package/dist/tools/recording-custody.js +9 -5
  139. package/dist/tools/recording-custody.js.map +1 -1
  140. package/dist/tools/recording-samples.d.ts.map +1 -1
  141. package/dist/tools/recording-samples.js +25 -6
  142. package/dist/tools/recording-samples.js.map +1 -1
  143. package/dist/tools/recordings.d.ts +10 -0
  144. package/dist/tools/recordings.d.ts.map +1 -1
  145. package/dist/tools/recordings.js +32 -19
  146. package/dist/tools/recordings.js.map +1 -1
  147. package/dist/tools/recovery-hints.d.ts.map +1 -1
  148. package/dist/tools/recovery-hints.js +58 -18
  149. package/dist/tools/recovery-hints.js.map +1 -1
  150. package/dist/tools/release-rich.js +5 -5
  151. package/dist/tools/release-rich.js.map +1 -1
  152. package/dist/tools/releases.d.ts.map +1 -1
  153. package/dist/tools/releases.js +21 -12
  154. package/dist/tools/releases.js.map +1 -1
  155. package/dist/tools/royalties.d.ts.map +1 -1
  156. package/dist/tools/royalties.js +12 -6
  157. package/dist/tools/royalties.js.map +1 -1
  158. package/dist/tools/send.d.ts.map +1 -1
  159. package/dist/tools/send.js +7 -4
  160. package/dist/tools/send.js.map +1 -1
  161. package/dist/tools/sessions.d.ts.map +1 -1
  162. package/dist/tools/sessions.js +8 -4
  163. package/dist/tools/sessions.js.map +1 -1
  164. package/dist/tools/settings.d.ts.map +1 -1
  165. package/dist/tools/settings.js +13 -6
  166. package/dist/tools/settings.js.map +1 -1
  167. package/dist/tools/share-links.d.ts.map +1 -1
  168. package/dist/tools/share-links.js +7 -3
  169. package/dist/tools/share-links.js.map +1 -1
  170. package/dist/tools/share-send.d.ts.map +1 -1
  171. package/dist/tools/share-send.js +15 -5
  172. package/dist/tools/share-send.js.map +1 -1
  173. package/dist/tools/shows.d.ts +31 -0
  174. package/dist/tools/shows.d.ts.map +1 -0
  175. package/dist/tools/shows.js +307 -0
  176. package/dist/tools/shows.js.map +1 -0
  177. package/dist/tools/skills.d.ts.map +1 -1
  178. package/dist/tools/skills.js +7 -0
  179. package/dist/tools/skills.js.map +1 -1
  180. package/dist/tools/split-sheets.d.ts.map +1 -1
  181. package/dist/tools/split-sheets.js +19 -12
  182. package/dist/tools/split-sheets.js.map +1 -1
  183. package/dist/tools/statements.js +2 -2
  184. package/dist/tools/statements.js.map +1 -1
  185. package/dist/tools/storage-config.d.ts.map +1 -1
  186. package/dist/tools/storage-config.js +5 -3
  187. package/dist/tools/storage-config.js.map +1 -1
  188. package/dist/tools/subscription.d.ts +162 -26
  189. package/dist/tools/subscription.d.ts.map +1 -1
  190. package/dist/tools/subscription.js +479 -241
  191. package/dist/tools/subscription.js.map +1 -1
  192. package/dist/tools/sync-placements.d.ts.map +1 -1
  193. package/dist/tools/sync-placements.js +10 -5
  194. package/dist/tools/sync-placements.js.map +1 -1
  195. package/dist/tools/telegram.d.ts.map +1 -1
  196. package/dist/tools/telegram.js +16 -24
  197. package/dist/tools/telegram.js.map +1 -1
  198. package/dist/tools/users.d.ts.map +1 -1
  199. package/dist/tools/users.js +12 -6
  200. package/dist/tools/users.js.map +1 -1
  201. package/dist/tools/works.d.ts.map +1 -1
  202. package/dist/tools/works.js +13 -10
  203. package/dist/tools/works.js.map +1 -1
  204. package/package.json +8 -4
  205. package/server.json +2 -2
  206. package/.claude/settings.local.json +0 -5
package/CHANGELOG.md CHANGED
@@ -11,6 +11,78 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
 
12
12
  ## [Unreleased]
13
13
 
14
+ ## [2.96.0] - 2026-08-26
15
+
16
+ The MPP pay rail (spec 2026-08-24 WS-B): a new tool that mints a pay link,
17
+ and `pica_subscription_status` learns to say what pica costs and what it is
18
+ holding. Depends on `@withpica/mcp-sdk` 3.13.0 (`BillingResource`) — publish
19
+ order matters, see `docs/releases/2026-08-26-mcp-release.md`.
20
+
21
+ ### Added
22
+
23
+ - **`pica_billing_pay`** — new tool, `scope: read:catalog`, `tier: read`
24
+ (minting a link mints a capability, not a charge — nothing is billed until
25
+ the link is paid). Wraps `POST /api/admin/billing/pay-link` via
26
+ `PicaClient.billing.mintPayLink()`. Takes `offer` (`resident_month` | `unlock`
27
+ | `settle`, required) and `entity_id` (required for `unlock`). Route
28
+ refusals — billing disabled, nothing held on that work, offer no longer
29
+ applies — come back as structured `isError` results with a `next_tool`
30
+ pointer, not thrown errors. Added to the `subscription` tool category
31
+ (renamed description: "what does pica cost, how do I pay, and what is pica
32
+ holding — read your billing state and get a pay link"), the atlas
33
+ (`"how do i pay pica?"` and its synonyms), and `RECOVERY_HINTS`.
34
+ - **`pica_subscription_status` carries `pricing` and `held` when the route
35
+ measured them.** `SubscriptionStatusFlat` gains optional `pricing` and
36
+ `held` fields (omitted, not `null`, when absent — a `null` price would read
37
+ as "free"). The composed `summary` sentence appends one further clause
38
+ naming the free-runway/resident-included song counts and, when
39
+ `held.count > 0`, how many findings across how many works are held pending
40
+ payment.
41
+ - **`pica_dashboard_briefing`'s `found` block description gains a `billing`
42
+ clause**: when `billing.tab` is a string, state the tab total once and say
43
+ that settling it clears what pica is holding; when `billing.pay` names a
44
+ tool, offer to call it — mint a pay link, never charge unprompted.
45
+
46
+ ### Changed
47
+
48
+ - **`pica_discover({ query })` no longer scores the asker's own words as the entity.** Determiners, pronouns, prepositions and light verbs (`my`, `the`, `get`, `list`, `find` …) are dropped before ranking. "start my music catalogue and import my songs" led with three `pica_my_*` tools because "my" matched their domain segment; it now leads with the import tools. A query made only of such words matches nothing.
49
+ - **Query mode carries the fresh-org import line.** The ADR-294 hint ("on a fresh or empty org, run `pica_dashboard_briefing` first … paste a spotify album or playlist link") was only on the no-args category map; it is now on every query response, hit or miss.
50
+ - **Tools the caller cannot run on this connection rank last and are flagged.** Shortlist rows and `pica_tool_details` gain `callable_on_this_surface: false` plus a `surface_note` when the tool is on another surface (stdio / lobby) or needs a scope the connection does not hold — the judgement the HTTP dispatcher enforces at `pica_execute` time (installed only while the inner gate is in enforce mode). An existing scope or destructive-tier `callable_note` is kept beside it, and the `invoke` line on a flagged detail says the call will be refused instead of "pica_execute executes every tool returned here". Rows for callable tools are unchanged (no new keys). A capped shortlist keeps at least five tail rows for flagged tools and lets them fill what visible rows leave, so a gated capability reads as gated, not missing, and a narrow scope never shrinks the list. Query-mode `cache_until` is now one hour (the rows are per-connection); the full map keeps its day.
51
+
52
+ ## [2.95.4] - 2026-08-25
53
+
54
+ 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.
55
+
56
+ ### Added
57
+
58
+ - **`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).
59
+ - **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.
60
+ - **`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.
61
+
62
+ ### Changed
63
+
64
+ - **⚠️ 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.
65
+ - **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.
66
+ - **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.
67
+ - **`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.
68
+ - **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.
69
+ - **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.
70
+ - **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.
71
+ - **`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.
72
+ - Server instructions state what the registry actually enforces for `sections` / `limit` (3,110 / 3,200) instead of a softer claim.
73
+ - **`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)
74
+
75
+ - **`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.
76
+ - **`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.
77
+ - **`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).
78
+
79
+ ### Fixed
80
+
81
+ - **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.
82
+ - 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.
83
+
84
+ > 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.
85
+
14
86
  ## [2.95.3] - 2026-08-18
15
87
 
16
88
  ### Fixed
@@ -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