cc0-library-mcp 0.2.3 → 0.2.5

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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # cc0-library
2
2
 
3
3
  **CC0 assets only. With receipts.**
4
- One search across **17 sources** for images, audio, video, HDRIs, textures, 3D models, museum artworks and whole asset collections, plus a hand-verified catalog of **184 CC0 sources**. Every result shows *how* its CC0 status was verified and *who* declared it.
4
+ One search across **17 sources** for images, audio, video, HDRIs, textures, 3D models, museum artworks and whole asset collections, plus a hand-verified catalog of **226 CC0 sources**. Every result shows *how* its CC0 status was verified and *who* declared it.
5
5
 
6
6
  [![ci](https://github.com/sanghyoLe/cc0-library/actions/workflows/ci.yml/badge.svg)](https://github.com/sanghyoLe/cc0-library/actions/workflows/ci.yml)
7
7
  ![license: MIT](https://img.shields.io/badge/code-MIT-blue)
@@ -62,7 +62,7 @@ The web gallery has a "rights holder only" switch that drops `uploader` results.
62
62
 
63
63
  ## The catalog
64
64
 
65
- [`catalog/sources.json`](catalog/sources.json) lists 184 sites and collections that are CC0 (17 of them searchable), each verified on the source's own license page, repository license or README, with the quoted evidence and a date. Browse it on the [web gallery's Browse tab](https://sanghyole.github.io/cc0-library/) (by type, with the evidence for each source) or with the `list_sources` tool.
65
+ [`catalog/sources.json`](catalog/sources.json) lists 226 sites and collections that are CC0 (17 of them searchable), each verified on the source's own license page, repository license or README, with the quoted evidence and a date. Browse it on the [web gallery's Browse tab](https://sanghyole.github.io/cc0-library/) (by type, with the evidence for each source) or with the `list_sources` tool.
66
66
 
67
67
  | Asset type | Sources | Examples |
68
68
  |---|---|---|
@@ -142,10 +142,12 @@ claude mcp add cc0-library -- node "$PWD/dist/index.js"
142
142
 
143
143
  | Tool | Input | Returns |
144
144
  |---|---|---|
145
- | `search_assets` | `query`, `kind` (`image`·`audio`·`video`·`hdri`·`texture`·`model`·`artwork`·`collection`·`any`, default `any`; `any` excludes `collection`), `limit` 1–20, `page` 1–12 | CC0 assets, per-provider totals, per-provider errors |
145
+ | `search_assets` | `query`, `kind` (`image`·`audio`·`video`·`hdri`·`texture`·`model`·`artwork`·`collection`·`any`, default `any`; `any` excludes `collection`), `limit` 1–20, `page` 1–12, optional `providers` (e.g. `["iconify"]` for icons) | CC0 assets ranked by query words in title and tags, per-provider totals, per-provider errors |
146
146
  | `get_asset` | `id` from `search_assets` (`openverse:image:<uuid>`, `openverse:audio:<uuid>`, `polyhaven:<slug>`, `ambientcg:<assetId>`, `cleveland:<number>`, `met:<number>`, `commons:<pageid>`, `archive:<identifier>`, `sketchfab:<uid>`, `wpphotos:<number>`, `inaturalist:<n>`, `gbif:<n>`, `phylopic:<uuid>`, `iconify:<set>:<icon>`, `zenodo:<n>`, `blenderkit:<uuid>`, `github:<owner>/<repo>`, `huggingface:<owner>/<dataset>`) | Details plus download URLs (Poly Haven: up to 60 map/resolution/format files; Sketchfab: model page only, because downloads need the user's own login) |
147
147
  | `list_sources` | `kind` (optional) | Curated catalog, the non-CC0 list, and the pending-verification list |
148
148
 
149
+ Results are ranked by how many query words appear in each item's title (weight 2) or tags (weight 1); ties alternate between providers. Loose matches, such as a GBIF record that mentions the word only in its locality, sink below exact ones.
150
+
149
151
  If one provider fails, `search_assets` still returns results from the other providers and lists the failure in `errors`. Gateway errors (HTTP 502/503/504) are retried once.
150
152
 
151
153
  The Met's search returns object IDs only, so the server fetches each object and drops non-public-domain ones. A Met page can therefore hold fewer items than `limit`.
@@ -245,7 +247,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md). In short:
245
247
  - 웹에서 바로 검색할 수 있습니다: https://sanghyole.github.io/cc0-library/
246
248
  - **CC0 미술관**: 주제어를 넣으면 CC0 그림·조각·바닥·조명·배경음으로 3D 전시실을 만들어 걸어 다닐 수 있습니다. WebGPU로 그리고, WebGPU가 없는 브라우저에서는 WebGL2로 자동 전환합니다. https://sanghyole.github.io/cc0-library/museum.html
247
249
  - `get_asset`은 다운로드 URL을 주기 전에 원본에서 CC0 여부를 다시 확인합니다.
248
- - `list_sources`는 검증한 CC0 자료원 184곳의 목록을 줍니다. 종류별로 이미지 117곳, 오디오 37곳, 3D 28곳, 텍스처 19곳, 미술품 15곳, 데이터 컬렉션 13곳, 영상 11곳, 폰트 9곳, HDRI 5곳입니다. CC0가 아닌 무료 사이트(Unsplash, Pixabay, Pexels, Pixnio, SMK, NASA, Coverr, Burst, Mixkit, Gratisography, Natural Earth)와 그 이유도 줍니다. 아직 검증하지 못한 후보도 따로 줍니다.
250
+ - `list_sources`는 검증한 CC0 자료원 226곳의 목록을 줍니다. 종류별로 이미지 139곳, 오디오 44곳, 3D 31곳, 데이터 컬렉션 30곳, 텍스처 21곳, 미술품 18곳, 영상 12곳, 폰트 11곳, HDRI 6곳입니다. CC0가 아닌 무료 사이트(Unsplash, Pixabay, Pexels, Pixnio, SMK, NASA, Coverr, Burst, Mixkit, Gratisography, Natural Earth)와 그 이유도 줍니다. 아직 검증하지 못한 후보도 따로 줍니다.
249
251
 
250
252
  - 매주 자동 점검이 목록의 라이선스 페이지를 다시 확인하고 새 후보를 찾습니다.
251
253
  - 버전 태그를 올리면 npm과 MCP 공식 레지스트리에 자동으로 배포됩니다.
@@ -3014,6 +3014,694 @@
3014
3014
  "date": "2026-11-23",
3015
3015
  "evidence": "home page: '写真をすべて日本国内で撮影し、CC0またはCC BY(2.0 / 4.0)の下で公開しています'"
3016
3016
  }
3017
+ },
3018
+ {
3019
+ "id": "subspaceaudio",
3020
+ "name": "Juhani Junkala / SubspaceAudio sound and music",
3021
+ "url": "https://opengameart.org/users/subspaceaudio",
3022
+ "kinds": [
3023
+ "audio"
3024
+ ],
3025
+ "scope": "whole-library",
3026
+ "searchable": false,
3027
+ "licensePage": "https://opengameart.org/content/512-sound-effects-8-bit-style",
3028
+ "notes": "512 8-bit sound effects and chiptune music packs; five packs checked, all CC0.",
3029
+ "verified": {
3030
+ "date": "2026-11-23",
3031
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3032
+ }
3033
+ },
3034
+ {
3035
+ "id": "armm1998-zelda-like",
3036
+ "name": "Zelda-like tilesets and sprites (ArMM1998)",
3037
+ "url": "https://opengameart.org/content/zelda-like-tilesets-and-sprites",
3038
+ "kinds": [
3039
+ "image"
3040
+ ],
3041
+ "scope": "whole-library",
3042
+ "searchable": false,
3043
+ "licensePage": "https://opengameart.org/content/zelda-like-tilesets-and-sprites",
3044
+ "notes": "Original top-down RPG tiles and sprites.",
3045
+ "verified": {
3046
+ "date": "2026-11-23",
3047
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3048
+ }
3049
+ },
3050
+ {
3051
+ "id": "dungeon-crawl-tiles",
3052
+ "name": "Dungeon Crawl 32x32 tiles",
3053
+ "url": "https://opengameart.org/content/dungeon-crawl-32x32-tiles",
3054
+ "kinds": [
3055
+ "image"
3056
+ ],
3057
+ "scope": "whole-library",
3058
+ "searchable": false,
3059
+ "licensePage": "https://opengameart.org/content/dungeon-crawl-32x32-tiles",
3060
+ "notes": "The Dungeon Crawl Stone Soup tile set; the supplemental set is also CC0.",
3061
+ "verified": {
3062
+ "date": "2026-11-23",
3063
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3064
+ }
3065
+ },
3066
+ {
3067
+ "id": "artisticdude",
3068
+ "name": "artisticdude sound packs and tiles",
3069
+ "url": "https://opengameart.org/users/artisticdude",
3070
+ "kinds": [
3071
+ "audio",
3072
+ "image",
3073
+ "font"
3074
+ ],
3075
+ "scope": "whole-library",
3076
+ "searchable": false,
3077
+ "licensePage": "https://opengameart.org/content/rpg-sound-pack",
3078
+ "notes": "RPG sound pack, retro sounds, isometric tiles and a bitmap font; five uploads checked, all CC0.",
3079
+ "verified": {
3080
+ "date": "2026-11-23",
3081
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3082
+ }
3083
+ },
3084
+ {
3085
+ "id": "cynicmusic",
3086
+ "name": "cynicmusic game music",
3087
+ "url": "https://opengameart.org/users/cynicmusic",
3088
+ "kinds": [
3089
+ "audio"
3090
+ ],
3091
+ "scope": "filter-only",
3092
+ "searchable": false,
3093
+ "licensePage": "https://opengameart.org/content/battle-theme-a",
3094
+ "notes": "Battle themes, ambient and synthwave loops; check each track's license field.",
3095
+ "verified": {
3096
+ "date": "2026-11-23",
3097
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3098
+ }
3099
+ },
3100
+ {
3101
+ "id": "codemanu-vfx",
3102
+ "name": "CodeManu pixel VFX packs",
3103
+ "url": "https://opengameart.org/content/free-pixel-effects-pack",
3104
+ "kinds": [
3105
+ "image"
3106
+ ],
3107
+ "scope": "filter-only",
3108
+ "searchable": false,
3109
+ "licensePage": "https://opengameart.org/content/free-pixel-effects-pack",
3110
+ "notes": "Only the VFX packs are CC0; this creator's music packs are CC BY 3.0.",
3111
+ "verified": {
3112
+ "date": "2026-11-23",
3113
+ "evidence": "OpenGameArt license field: 'CC0' (links creativecommons.org/publicdomain/zero/1.0/)"
3114
+ }
3115
+ },
3116
+ {
3117
+ "id": "glitch-game-art",
3118
+ "name": "Glitch game art (Tiny Speck)",
3119
+ "url": "https://github.com/tinyspeck/glitch-items",
3120
+ "kinds": [
3121
+ "image",
3122
+ "artwork"
3123
+ ],
3124
+ "scope": "whole-library",
3125
+ "searchable": false,
3126
+ "licensePage": "https://github.com/tinyspeck/glitch-items",
3127
+ "notes": "Items, locations and avatars from the game Glitch (glitch-items, glitch-locations, glitch-avatars). The Glitch name and logo are trademarks.",
3128
+ "verified": {
3129
+ "date": "2026-11-23",
3130
+ "evidence": "README: files provided by Tiny Speck under CC0 (links creativecommons.org/publicdomain/zero/1.0/legalcode)"
3131
+ }
3132
+ },
3133
+ {
3134
+ "id": "ghostpixxells",
3135
+ "name": "Ghostpixxells pixel packs",
3136
+ "url": "https://ghostpixxells.itch.io/",
3137
+ "kinds": [
3138
+ "image"
3139
+ ],
3140
+ "scope": "filter-only",
3141
+ "searchable": false,
3142
+ "licensePage": "https://ghostpixxells.itch.io/pixelfood",
3143
+ "notes": "Pixel food and shop items; some packs show no license.",
3144
+ "verified": {
3145
+ "date": "2026-11-23",
3146
+ "evidence": "itch.io asset license field on Free Pixel Foods: 'Creative Commons Zero v1.0 Universal'"
3147
+ }
3148
+ },
3149
+ {
3150
+ "id": "henry-software",
3151
+ "name": "Henry Software pixel packs",
3152
+ "url": "https://henrysoftware.itch.io/",
3153
+ "kinds": [
3154
+ "image"
3155
+ ],
3156
+ "scope": "whole-library",
3157
+ "searchable": false,
3158
+ "licensePage": "https://henrysoftware.itch.io/pixel-food",
3159
+ "notes": "Pixel food, mobs and effects; three free packs checked, all CC0.",
3160
+ "verified": {
3161
+ "date": "2026-11-23",
3162
+ "evidence": "itch.io asset license field on Pixel Food: 'Creative Commons Zero v1.0 Universal'"
3163
+ }
3164
+ },
3165
+ {
3166
+ "id": "urizen-tileset",
3167
+ "name": "Urizen 1Bit Tileset (vurmux)",
3168
+ "url": "https://vurmux.itch.io/urizen-onebit-tileset",
3169
+ "kinds": [
3170
+ "image"
3171
+ ],
3172
+ "scope": "whole-library",
3173
+ "searchable": false,
3174
+ "licensePage": "https://vurmux.itch.io/urizen-onebit-tileset",
3175
+ "notes": "5,500+ 12x12 one-bit tiles.",
3176
+ "verified": {
3177
+ "date": "2026-11-23",
3178
+ "evidence": "itch.io asset license field on Urizen 1Bit Tileset: 'Creative Commons Zero v1.0 Universal'"
3179
+ }
3180
+ },
3181
+ {
3182
+ "id": "merchant-shade",
3183
+ "name": "Merchant Shade 16x16 packs",
3184
+ "url": "https://merchant-shade.itch.io/",
3185
+ "kinds": [
3186
+ "image"
3187
+ ],
3188
+ "scope": "filter-only",
3189
+ "searchable": false,
3190
+ "licensePage": "https://merchant-shade.itch.io/16x16-mixed-rpg-icons",
3191
+ "notes": "RPG icons, Puny World and Puny Characters are CC0; Puny Dungeon is CC BY 4.0.",
3192
+ "verified": {
3193
+ "date": "2026-11-23",
3194
+ "evidence": "itch.io asset license field on 16x16 Mixed RPG Icons: 'Creative Commons Zero v1.0 Universal'"
3195
+ }
3196
+ },
3197
+ {
3198
+ "id": "fertile-soil",
3199
+ "name": "Fertile Soil Productions packs",
3200
+ "url": "https://fertile-soil-productions.itch.io/",
3201
+ "kinds": [
3202
+ "model",
3203
+ "image"
3204
+ ],
3205
+ "scope": "filter-only",
3206
+ "searchable": false,
3207
+ "licensePage": "https://fertile-soil-productions.itch.io/modular-village-pack",
3208
+ "notes": "PSX-style 3D packs, blocks and sprites; some packs show no license.",
3209
+ "verified": {
3210
+ "date": "2026-11-23",
3211
+ "evidence": "itch.io asset license field on Modular Village Pack: 'Creative Commons Zero v1.0 Universal'"
3212
+ }
3213
+ },
3214
+ {
3215
+ "id": "binbun3d",
3216
+ "name": "Binbun3D skies and VFX",
3217
+ "url": "https://binbun3d.itch.io/",
3218
+ "kinds": [
3219
+ "texture",
3220
+ "image",
3221
+ "hdri"
3222
+ ],
3223
+ "scope": "whole-library",
3224
+ "searchable": false,
3225
+ "licensePage": "https://binbun3d.itch.io/godot-skies",
3226
+ "notes": "Sky textures and effect sprites; three packs checked, all CC0.",
3227
+ "verified": {
3228
+ "date": "2026-11-23",
3229
+ "evidence": "itch.io asset license field on Godot Skies: 'Creative Commons Zero v1.0 Universal'"
3230
+ }
3231
+ },
3232
+ {
3233
+ "id": "foxtex",
3234
+ "name": "Foxtex texture packs (foxh3ad)",
3235
+ "url": "https://foxh3ad.itch.io/",
3236
+ "kinds": [
3237
+ "texture",
3238
+ "model"
3239
+ ],
3240
+ "scope": "whole-library",
3241
+ "searchable": false,
3242
+ "licensePage": "https://foxh3ad.itch.io/foxtexcom",
3243
+ "notes": "Texture packs and a few weapon models; real-world product names may appear.",
3244
+ "verified": {
3245
+ "date": "2026-11-23",
3246
+ "evidence": "itch.io asset license field on Foxtex: 'Creative Commons Zero v1.0 Universal'"
3247
+ }
3248
+ },
3249
+ {
3250
+ "id": "caffinate-fonts",
3251
+ "name": "Caffinate pixel fonts",
3252
+ "url": "https://caffinate.itch.io/",
3253
+ "kinds": [
3254
+ "font"
3255
+ ],
3256
+ "scope": "filter-only",
3257
+ "searchable": false,
3258
+ "licensePage": "https://caffinate.itch.io/abaddon",
3259
+ "notes": "Abaddon and Snide Asides fonts; the creator's other pages are games.",
3260
+ "verified": {
3261
+ "date": "2026-11-23",
3262
+ "evidence": "itch.io asset license field on Abaddon: 'Creative Commons Zero v1.0 Universal'"
3263
+ }
3264
+ },
3265
+ {
3266
+ "id": "kevins-moms-house",
3267
+ "name": "Kevin's Mom's House pixel tilesets",
3268
+ "url": "https://kevins-moms-house.itch.io/",
3269
+ "kinds": [
3270
+ "image"
3271
+ ],
3272
+ "scope": "filter-only",
3273
+ "searchable": false,
3274
+ "licensePage": "https://kevins-moms-house.itch.io/four-seasons-platformer-tileset",
3275
+ "notes": "Four Seasons Platformer and BitByBit are CC0; some packs show no license.",
3276
+ "verified": {
3277
+ "date": "2026-11-23",
3278
+ "evidence": "itch.io asset license field on Four Seasons Platformer Tileset: 'Creative Commons Zero v1.0 Universal'"
3279
+ }
3280
+ },
3281
+ {
3282
+ "id": "shackhal-multi-platformer",
3283
+ "name": "Multi Platformer Tileset (Shackhal)",
3284
+ "url": "https://shackhal.itch.io/multi-platformer-tileset",
3285
+ "kinds": [
3286
+ "image"
3287
+ ],
3288
+ "scope": "whole-library",
3289
+ "searchable": false,
3290
+ "licensePage": "https://shackhal.itch.io/multi-platformer-tileset",
3291
+ "notes": "Platformer tiles; this creator's minisprites pack is CC BY 4.0.",
3292
+ "verified": {
3293
+ "date": "2026-11-23",
3294
+ "evidence": "itch.io asset license field on Multi Platformer Tileset: 'Creative Commons Zero v1.0 Universal'"
3295
+ }
3296
+ },
3297
+ {
3298
+ "id": "moma-collection-data",
3299
+ "name": "MoMA collection data",
3300
+ "url": "https://github.com/MuseumofModernArt/collection",
3301
+ "kinds": [
3302
+ "collection"
3303
+ ],
3304
+ "scope": "whole-library",
3305
+ "searchable": false,
3306
+ "licensePage": "https://github.com/MuseumofModernArt/collection",
3307
+ "notes": "Metadata only (CSV/JSON); no images are included and images are not covered.",
3308
+ "verified": {
3309
+ "date": "2026-11-23",
3310
+ "evidence": "README: 'This datasets are placed in the public domain using a CC0 License'"
3311
+ }
3312
+ },
3313
+ {
3314
+ "id": "tate-collection-data",
3315
+ "name": "Tate collection metadata",
3316
+ "url": "https://github.com/tategallery/collection",
3317
+ "kinds": [
3318
+ "collection"
3319
+ ],
3320
+ "scope": "whole-library",
3321
+ "searchable": false,
3322
+ "licensePage": "https://github.com/tategallery/collection",
3323
+ "notes": "Metadata only (CSV/JSON); no images are included and images are not covered.",
3324
+ "verified": {
3325
+ "date": "2026-11-23",
3326
+ "evidence": "README: 'The metadata here is released under the Creative Commons Public Domain CC0 licence.'"
3327
+ }
3328
+ },
3329
+ {
3330
+ "id": "whitney-open-access-data",
3331
+ "name": "Whitney Museum open-access datasets",
3332
+ "url": "https://github.com/whitneymuseum/open-access",
3333
+ "kinds": [
3334
+ "collection"
3335
+ ],
3336
+ "scope": "whole-library",
3337
+ "searchable": false,
3338
+ "licensePage": "https://github.com/whitneymuseum/open-access",
3339
+ "notes": "Metadata only (CSV/JSON); no images are included and images are not covered.",
3340
+ "verified": {
3341
+ "date": "2026-11-23",
3342
+ "evidence": "README: 'These datasets are placed in the public domain using a CC0 License'"
3343
+ }
3344
+ },
3345
+ {
3346
+ "id": "mia-collection-data",
3347
+ "name": "Minneapolis Institute of Art collection metadata",
3348
+ "url": "https://github.com/artsmia/collection",
3349
+ "kinds": [
3350
+ "collection"
3351
+ ],
3352
+ "scope": "whole-library",
3353
+ "searchable": false,
3354
+ "licensePage": "https://github.com/artsmia/collection",
3355
+ "notes": "Metadata only (CSV/JSON); no images are included and images are not covered.",
3356
+ "verified": {
3357
+ "date": "2026-11-23",
3358
+ "evidence": "readme: 'we've published metadata for our artworks as JSON under a CC0 license'"
3359
+ }
3360
+ },
3361
+ {
3362
+ "id": "nga-opendata",
3363
+ "name": "National Gallery of Art open data",
3364
+ "url": "https://github.com/NationalGalleryOfArt/opendata",
3365
+ "kinds": [
3366
+ "collection"
3367
+ ],
3368
+ "scope": "whole-library",
3369
+ "searchable": false,
3370
+ "licensePage": "https://github.com/NationalGalleryOfArt/opendata",
3371
+ "notes": "Metadata only (CSV/JSON); no images are included and images are not covered. Image licensing is listed separately as pending.",
3372
+ "verified": {
3373
+ "date": "2026-11-23",
3374
+ "evidence": "README: released 'under the Creative Commons Zero designation'"
3375
+ }
3376
+ },
3377
+ {
3378
+ "id": "wikidata",
3379
+ "name": "Wikidata",
3380
+ "url": "https://www.wikidata.org",
3381
+ "kinds": [
3382
+ "collection"
3383
+ ],
3384
+ "scope": "whole-library",
3385
+ "searchable": false,
3386
+ "licensePage": "https://www.wikidata.org/wiki/Wikidata:Licensing",
3387
+ "notes": "Structured data only; linked Commons media keep their own licenses.",
3388
+ "verified": {
3389
+ "date": "2026-11-23",
3390
+ "evidence": "licensing page: 'All structured data ... is released into the public domain under Creative Commons Zero'"
3391
+ }
3392
+ },
3393
+ {
3394
+ "id": "musicbrainz-core",
3395
+ "name": "MusicBrainz core data",
3396
+ "url": "https://musicbrainz.org",
3397
+ "kinds": [
3398
+ "collection"
3399
+ ],
3400
+ "scope": "filter-only",
3401
+ "searchable": false,
3402
+ "licensePage": "https://musicbrainz.org/doc/About/Data_License",
3403
+ "notes": "Music metadata. Only the core data is CC0; supplementary data is CC BY-NC-SA. No audio.",
3404
+ "verified": {
3405
+ "date": "2026-11-23",
3406
+ "evidence": "data license page: 'The core data of the database is licensed under the CC0'"
3407
+ }
3408
+ },
3409
+ {
3410
+ "id": "discogs-dumps",
3411
+ "name": "Discogs monthly data dumps",
3412
+ "url": "https://data.discogs.com/",
3413
+ "kinds": [
3414
+ "collection"
3415
+ ],
3416
+ "scope": "whole-library",
3417
+ "searchable": false,
3418
+ "licensePage": "https://data.discogs.com/",
3419
+ "notes": "Release, artist and label XML dumps. Cover images are not included and are not CC0.",
3420
+ "verified": {
3421
+ "date": "2026-11-23",
3422
+ "evidence": "page: 'This data is made available under the CC0 No Rights Reserved license'"
3423
+ }
3424
+ },
3425
+ {
3426
+ "id": "openalex",
3427
+ "name": "OpenAlex",
3428
+ "url": "https://openalex.org",
3429
+ "kinds": [
3430
+ "collection"
3431
+ ],
3432
+ "scope": "whole-library",
3433
+ "searchable": false,
3434
+ "licensePage": "https://github.com/ourresearch/openalex-docs",
3435
+ "notes": "Scholarly works metadata; no media.",
3436
+ "verified": {
3437
+ "date": "2026-11-23",
3438
+ "evidence": "docs README: 'Our complete dataset is free under the CC0 license'"
3439
+ }
3440
+ },
3441
+ {
3442
+ "id": "borealis",
3443
+ "name": "Borealis (Canadian Dataverse Repository)",
3444
+ "url": "https://borealisdata.ca",
3445
+ "kinds": [
3446
+ "collection"
3447
+ ],
3448
+ "scope": "filter-only",
3449
+ "searchable": false,
3450
+ "licensePage": "https://borealisdata.ca/api/licenses",
3451
+ "notes": "Research datasets; CC0 1.0 is the default license. Filter with license \"CC0 1.0\".",
3452
+ "verified": {
3453
+ "date": "2026-11-23",
3454
+ "evidence": "licenses API: 'CC0 1.0' 'Creative Commons CC0 1.0 Universal Public Domain Dedication.' marked isDefault"
3455
+ }
3456
+ },
3457
+ {
3458
+ "id": "dataversenl",
3459
+ "name": "DataverseNL",
3460
+ "url": "https://dataverse.nl",
3461
+ "kinds": [
3462
+ "collection"
3463
+ ],
3464
+ "scope": "filter-only",
3465
+ "searchable": false,
3466
+ "licensePage": "https://dataverse.nl/api/licenses",
3467
+ "notes": "Dutch research datasets; CC0-1.0 is the default license. Filter with license \"CC0-1.0\".",
3468
+ "verified": {
3469
+ "date": "2026-11-23",
3470
+ "evidence": "licenses API: 'CC0-1.0' 'Creative Commons CC0 1.0 Universal Public Domain Dedication.'"
3471
+ }
3472
+ },
3473
+ {
3474
+ "id": "osf",
3475
+ "name": "OSF (Open Science Framework)",
3476
+ "url": "https://osf.io/search",
3477
+ "kinds": [
3478
+ "collection"
3479
+ ],
3480
+ "scope": "filter-only",
3481
+ "searchable": false,
3482
+ "licensePage": "https://help.osf.io/article/148-licensing",
3483
+ "notes": "Research projects and files; use the License facet for CC0 1.0 Universal.",
3484
+ "verified": {
3485
+ "date": "2026-11-23",
3486
+ "evidence": "licensing help page lists 'CC0 1.0 Universal'"
3487
+ }
3488
+ },
3489
+ {
3490
+ "id": "kaggle-cc0",
3491
+ "name": "Kaggle datasets (CC0: Public Domain)",
3492
+ "url": "https://www.kaggle.com/datasets",
3493
+ "kinds": [
3494
+ "collection",
3495
+ "image",
3496
+ "audio",
3497
+ "video"
3498
+ ],
3499
+ "scope": "filter-only",
3500
+ "searchable": false,
3501
+ "licensePage": "https://www.kaggle.com/datasets",
3502
+ "notes": "Uploaders choose the label and some scraped datasets are mislabeled; check each dataset's license and source.",
3503
+ "verified": {
3504
+ "date": "2026-11-23",
3505
+ "evidence": "datasets API returns per-dataset license 'CC0: Public Domain'"
3506
+ }
3507
+ },
3508
+ {
3509
+ "id": "openscore-string-quartets",
3510
+ "name": "OpenScore String Quartet Corpus",
3511
+ "url": "https://github.com/OpenScore/StringQuartets",
3512
+ "kinds": [
3513
+ "collection",
3514
+ "audio"
3515
+ ],
3516
+ "scope": "whole-library",
3517
+ "searchable": false,
3518
+ "licensePage": "https://github.com/OpenScore/StringQuartets",
3519
+ "notes": "String quartet scores in MuseScore/MusicXML.",
3520
+ "verified": {
3521
+ "date": "2026-11-23",
3522
+ "evidence": "README: 'These scores are released under Creative Commons Zero (CC0). See LICENSE.txt.'"
3523
+ }
3524
+ },
3525
+ {
3526
+ "id": "adafruit-sound-samples",
3527
+ "name": "Adafruit Sound Samples",
3528
+ "url": "https://github.com/adafruit/Adafruit-Sound-Samples",
3529
+ "kinds": [
3530
+ "audio"
3531
+ ],
3532
+ "scope": "whole-library",
3533
+ "searchable": false,
3534
+ "licensePage": "https://github.com/adafruit/Adafruit-Sound-Samples",
3535
+ "notes": "Short 22 kHz WAV clips.",
3536
+ "verified": {
3537
+ "date": "2026-11-23",
3538
+ "evidence": "README: each folder marked 'CC0 / Public Domain'"
3539
+ }
3540
+ },
3541
+ {
3542
+ "id": "diffusiondb",
3543
+ "name": "DiffusionDB",
3544
+ "url": "https://github.com/poloclub/diffusiondb",
3545
+ "kinds": [
3546
+ "image",
3547
+ "collection"
3548
+ ],
3549
+ "scope": "whole-library",
3550
+ "searchable": false,
3551
+ "licensePage": "https://github.com/poloclub/diffusiondb",
3552
+ "notes": "14 million AI-generated (Stable Diffusion) images with prompts.",
3553
+ "verified": {
3554
+ "date": "2026-11-23",
3555
+ "evidence": "README: 'The DiffusionDB dataset is available under the CC0 1.0 License'"
3556
+ }
3557
+ },
3558
+ {
3559
+ "id": "voxpopuli",
3560
+ "name": "VoxPopuli speech corpus",
3561
+ "url": "https://github.com/facebookresearch/voxpopuli",
3562
+ "kinds": [
3563
+ "audio",
3564
+ "collection"
3565
+ ],
3566
+ "scope": "whole-library",
3567
+ "searchable": false,
3568
+ "licensePage": "https://github.com/facebookresearch/voxpopuli",
3569
+ "notes": "European Parliament speech recordings. The README also points to the European Parliament legal notice.",
3570
+ "verified": {
3571
+ "date": "2026-11-23",
3572
+ "evidence": "README license table: 'VoxPopuli Data | CC0'"
3573
+ }
3574
+ },
3575
+ {
3576
+ "id": "keenan-crane-models",
3577
+ "name": "Keenan Crane 3D Model Repository",
3578
+ "url": "https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/",
3579
+ "kinds": [
3580
+ "model"
3581
+ ],
3582
+ "scope": "filter-only",
3583
+ "searchable": false,
3584
+ "licensePage": "https://www.cs.cmu.edu/~kmcrane/Projects/ModelRepository/",
3585
+ "notes": "Test meshes for geometry processing; at least one model is CC BY 4.0, so check each model's notice.",
3586
+ "verified": {
3587
+ "date": "2026-11-23",
3588
+ "evidence": "page: 'Model and associated data is dedicated under CC0 1.0 Universal.'"
3589
+ }
3590
+ },
3591
+ {
3592
+ "id": "lantmateriet-open-data",
3593
+ "name": "Lantmäteriet open geodata (Sweden)",
3594
+ "url": "https://www.lantmateriet.se/en/geodata/our-products/open-data/",
3595
+ "kinds": [
3596
+ "image",
3597
+ "collection"
3598
+ ],
3599
+ "scope": "filter-only",
3600
+ "searchable": false,
3601
+ "licensePage": "https://www.lantmateriet.se/en/geodata/our-products/open-data/",
3602
+ "notes": "Orthophotos, historical maps and other open data products; only products listed as open data are CC0. Downloads need a free Geotorget account.",
3603
+ "verified": {
3604
+ "date": "2026-11-23",
3605
+ "evidence": "open data page: 'Our open spatial data is available under the open data license Creative Commons, CC0'"
3606
+ }
3607
+ },
3608
+ {
3609
+ "id": "bdcyl",
3610
+ "name": "Biblioteca Digital de Castilla y León",
3611
+ "url": "https://bibliotecadigital.jcyl.es/",
3612
+ "kinds": [
3613
+ "image"
3614
+ ],
3615
+ "scope": "whole-library",
3616
+ "searchable": false,
3617
+ "licensePage": "https://bibliotecadigital.jcyl.es/es/consulta/registro.do?id=3",
3618
+ "notes": "Digitized books, maps and prints; item rights fields link to CC0.",
3619
+ "verified": {
3620
+ "date": "2026-11-23",
3621
+ "evidence": "item page rights field links http://creativecommons.org/publicdomain/zero/1.0/"
3622
+ }
3623
+ },
3624
+ {
3625
+ "id": "museum-wales",
3626
+ "name": "Amgueddfa Cymru – Museum Wales images",
3627
+ "url": "https://imagelibrary.museumwales.ac.uk/",
3628
+ "kinds": [
3629
+ "artwork",
3630
+ "image"
3631
+ ],
3632
+ "scope": "filter-only",
3633
+ "searchable": false,
3634
+ "licensePage": "https://museum.wales/news/1417/Access-to-Wales-national-collection-extended-with-launch-of-digital-image-library----",
3635
+ "notes": "Images are labelled CC0 or CC BY-SA; use those labelled CC0.",
3636
+ "verified": {
3637
+ "date": "2026-11-23",
3638
+ "evidence": "announcement: 'make images of its out-of-copyright collections freely available under a Creative Commons CC0 Universal Public Domain Dedication'"
3639
+ }
3640
+ },
3641
+ {
3642
+ "id": "folger-reference-images",
3643
+ "name": "Folger Shakespeare Library Reference Image Collection",
3644
+ "url": "https://luna.folger.edu/luna/servlet/FOLGER~5~5",
3645
+ "kinds": [
3646
+ "image"
3647
+ ],
3648
+ "scope": "filter-only",
3649
+ "searchable": false,
3650
+ "licensePage": "https://folger.edu/blogs/collation/reference-image-collection",
3651
+ "notes": "Only the Reference Image Collection and items whose Rights field says CC0; the main Digital Image Collection is mostly CC BY-SA.",
3652
+ "verified": {
3653
+ "date": "2026-11-23",
3654
+ "evidence": "Folger page: 'These images are shared under the CC0 1.0 Universal Public Domain Dedication License (CC0 1.0)'"
3655
+ }
3656
+ },
3657
+ {
3658
+ "id": "tu-berlin-architekturmuseum",
3659
+ "name": "Architekturmuseum der TU Berlin",
3660
+ "url": "https://architekturmuseum.ub.tu-berlin.de/",
3661
+ "kinds": [
3662
+ "artwork",
3663
+ "image"
3664
+ ],
3665
+ "scope": "filter-only",
3666
+ "searchable": false,
3667
+ "licensePage": "https://architekturmuseum.ub.tu-berlin.de/P/160419.php",
3668
+ "notes": "Architectural drawings and photos; each item states its rights.",
3669
+ "verified": {
3670
+ "date": "2026-11-23",
3671
+ "evidence": "item page: 'Werk und Digitalisat sind gemeinfrei (CC0 1.0 Universal, https://creativecommons.org/publicdomain/zero/1.0/)'"
3672
+ }
3673
+ },
3674
+ {
3675
+ "id": "digitalna-nbs",
3676
+ "name": "National Library of Serbia Digital Library",
3677
+ "url": "https://www.digitalna.nb.rs/",
3678
+ "kinds": [
3679
+ "image"
3680
+ ],
3681
+ "scope": "filter-only",
3682
+ "searchable": false,
3683
+ "licensePage": "https://www.digitalna.nb.rs/",
3684
+ "notes": "Each item has a usage-rights field (Право коришћења); use items marked CC0.",
3685
+ "verified": {
3686
+ "date": "2026-11-23",
3687
+ "evidence": "item 'Fotografije o migracijama 20': 'Право коришћења CC0'"
3688
+ }
3689
+ },
3690
+ {
3691
+ "id": "smithsonian-libraries",
3692
+ "name": "Smithsonian Libraries and Archives",
3693
+ "url": "https://library.si.edu/",
3694
+ "kinds": [
3695
+ "image"
3696
+ ],
3697
+ "scope": "filter-only",
3698
+ "searchable": false,
3699
+ "licensePage": "https://library.si.edu/copyright",
3700
+ "notes": "Public-domain items carry a CC0 marker; others use 'No Copyright - United States' or other statements.",
3701
+ "verified": {
3702
+ "date": "2026-11-23",
3703
+ "evidence": "copyright page: 'the Smithsonian Institution has adopted the use of a CC0 marker for public domain material.'"
3704
+ }
3017
3705
  }
3018
3706
  ],
3019
3707
  "excluded": [
@@ -3121,6 +3809,21 @@
3121
3809
  "name": "Web umenia (Slovak National Gallery)",
3122
3810
  "url": "https://www.webumenia.sk/en",
3123
3811
  "reason": "Open-art lists call it CC0, but item pages link the Public Domain Mark 1.0, not CC0."
3812
+ },
3813
+ {
3814
+ "name": "Royal Botanic Garden Edinburgh Herbarium images",
3815
+ "url": "https://data.rbge.org.uk/herb",
3816
+ "reason": "Aggregators count its records as CC0, but the herbarium page says 'Data: CC0 1.0 Images CC BY 4.0'."
3817
+ },
3818
+ {
3819
+ "name": "MuIS (Estonian museums)",
3820
+ "url": "https://www.muis.ee/",
3821
+ "reason": "Aggregators mark many items CC0, but MuIS applies CC0 to metadata only; images may be restricted."
3822
+ },
3823
+ {
3824
+ "name": "Rijkswaterstaat images",
3825
+ "url": "https://www.rijkswaterstaat.nl/copyright",
3826
+ "reason": "Site text is CC0, but the copyright page says 'De CC0-verklaring geldt niet voor beeld.'"
3124
3827
  }
3125
3828
  ],
3126
3829
  "pending": [
@@ -3458,6 +4161,56 @@
3458
4161
  "name": "Pickupimage",
3459
4162
  "url": "https://www.pickupimage.com/",
3460
4163
  "reason": "Often listed as CC0, but the site returned HTTP 403."
4164
+ },
4165
+ {
4166
+ "name": "Figshare",
4167
+ "url": "https://figshare.com",
4168
+ "reason": "CC0 is a license option, but no working CC0 search filter was found and the search page returned a challenge."
4169
+ },
4170
+ {
4171
+ "name": "Mendeley Data",
4172
+ "url": "https://data.mendeley.com",
4173
+ "reason": "CC0 is a deposit option, but the site renders with JavaScript and no license filter was confirmed."
4174
+ },
4175
+ {
4176
+ "name": "National Library of Scotland digitisations",
4177
+ "url": "https://digital.nls.uk/",
4178
+ "reason": "The copyright page reportedly waives rights in digitisations with CC0, but it returned HTTP 403."
4179
+ },
4180
+ {
4181
+ "name": "museum-digital (CC0 image filter)",
4182
+ "url": "https://global.museum-digital.org/",
4183
+ "reason": "Has a CC0 image-license filter across German museums, but the site's TLS certificate failed verification."
4184
+ },
4185
+ {
4186
+ "name": "Naturalis BioPortal",
4187
+ "url": "https://bioportal.naturalis.nl/",
4188
+ "reason": "Reported to apply CC0 unless stated otherwise; the page renders with JavaScript and returned HTTP 403."
4189
+ },
4190
+ {
4191
+ "name": "Digital Repository of Ireland",
4192
+ "url": "https://repository.dri.ie/",
4193
+ "reason": "Has a CC0 licence facet, but the site returned a Cloudflare challenge."
4194
+ },
4195
+ {
4196
+ "name": "National Library of Wales",
4197
+ "url": "https://www.library.wales/",
4198
+ "reason": "The copyright page returned HTTP 403."
4199
+ },
4200
+ {
4201
+ "name": "Het Utrechts Archief",
4202
+ "url": "https://hetutrechtsarchief.nl/",
4203
+ "reason": "Europeana lists CC0 items, but the archive's site returned HTTP 403."
4204
+ },
4205
+ {
4206
+ "name": "Brandenburgisches Landeshauptarchiv",
4207
+ "url": "https://blha-recherche.brandenburg.de/",
4208
+ "reason": "Digitized items are CC0 in Europeana/DDB, but the archive's own pages show no license text."
4209
+ },
4210
+ {
4211
+ "name": "Erfgoed Leiden Beeldbank",
4212
+ "url": "https://www.erfgoedleiden.nl/",
4213
+ "reason": "CC0 appears only on the national data portal record; it may cover metadata only."
3461
4214
  }
3462
4215
  ]
3463
4216
  }
package/dist/http.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * Poly Haven's API terms require a User-Agent that names the calling app.
3
3
  * Openverse also asks clients to identify themselves.
4
4
  */
5
- export const USER_AGENT = "cc0-library-mcp/0.2.3 (+https://github.com/sanghyoLe/cc0-library)";
5
+ export const USER_AGENT = "cc0-library-mcp/0.2.5 (+https://github.com/sanghyoLe/cc0-library)";
6
6
  const TIMEOUT_MS = 15_000;
7
7
  export class UpstreamError extends Error {
8
8
  provider;
package/dist/library.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { readFileSync } from "node:fs";
2
2
  import { fileURLToPath } from "node:url";
3
- export { search, getAsset, interleave } from "./search.js";
3
+ export { search, getAsset, interleave, rank, relevance } from "./search.js";
4
4
  const CATALOG_PATH = fileURLToPath(new URL("../catalog/sources.json", import.meta.url));
5
5
  export function loadCatalog() {
6
6
  return JSON.parse(readFileSync(CATALOG_PATH, "utf8"));
@@ -21,6 +21,13 @@ const list = (v) => (Array.isArray(v) ? v : v ? [v] : []);
21
21
  export function sanitizeQuery(q) {
22
22
  return q.replace(/[^\p{L}\p{N}\s]/gu, " ").replace(/\b(AND|OR|NOT|TO)\b/g, " ").replace(/\s+/g, " ").trim();
23
23
  }
24
+ /**
25
+ * Items titled like an archive or disk image (e.g. "pack 2026.7z") have no
26
+ * viewable media of their own, even when filed under an image or audio mediatype.
27
+ */
28
+ export function isPackedFile(doc) {
29
+ return /\.(7z|zip|rar|tar|gz|tgz|bz2|xz|iso|img|exe|dmg|bin)$/i.test((first(doc.title) ?? "").trim());
30
+ }
24
31
  export function isCc0(doc) {
25
32
  return !!doc.licenseurl && CC0_URL_RE.test(doc.licenseurl);
26
33
  }
@@ -56,7 +63,8 @@ export async function searchArchive(fetchImpl, kind, params) {
56
63
  for (const f of ["identifier", "title", "creator", "mediatype", "licenseurl", "subject"])
57
64
  qs.append("fl[]", f);
58
65
  const data = await getJson(fetchImpl, "Internet Archive", `${BASE}/advancedsearch.php?${qs}`);
59
- return { total: data.response.numFound, assets: data.response.docs.filter(isCc0).map(toAsset) };
66
+ const assets = data.response.docs.filter((d) => isCc0(d) && !isPackedFile(d)).map(toAsset);
67
+ return { total: data.response.numFound, assets };
60
68
  }
61
69
  export async function getArchive(fetchImpl, identifier) {
62
70
  if (!/^[A-Za-z0-9._-]+$/.test(identifier))
@@ -1,4 +1,4 @@
1
- import { getJson } from "../http.js";
1
+ import { UpstreamError, getJson } from "../http.js";
2
2
  import { CC0_LICENSE_URL } from "../types.js";
3
3
  /**
4
4
  * PhyloPic silhouettes of organisms (https://api.phylopic.org, no key).
@@ -69,7 +69,16 @@ export async function searchPhylopic(fetchImpl, params) {
69
69
  page: String(params.page - 1),
70
70
  embed_items: "true",
71
71
  });
72
- const data = await getJson(fetchImpl, "PhyloPic", `${BASE}/images?${qs}`, ACCEPT);
72
+ let data;
73
+ try {
74
+ data = await getJson(fetchImpl, "PhyloPic", `${BASE}/images?${qs}`, ACCEPT);
75
+ }
76
+ catch (e) {
77
+ // The API answers 404 when no taxon has this name: that is "no results", not a failure.
78
+ if (e instanceof UpstreamError && e.status === 404)
79
+ return { total: 0, assets: [] };
80
+ throw e;
81
+ }
73
82
  const items = (data._embedded?.items ?? []).filter(isCc0).slice(0, params.limit);
74
83
  return { total: data.totalItems ?? items.length, assets: items.map(toAsset) };
75
84
  }
package/dist/search.js CHANGED
@@ -19,9 +19,12 @@ import { getZenodo, searchZenodo } from "./providers/zenodo.js";
19
19
  import { getGithub, getHuggingface, searchGithub, searchHuggingface } from "./providers/collections.js";
20
20
  import { getBlenderkit, searchBlenderkit } from "./providers/blenderkit.js";
21
21
  /**
22
- * Runs one search across the providers that serve `kind`. With kind "any",
23
- * results from each provider are interleaved so one provider cannot crowd
24
- * out the others.
22
+ * Runs one search across the providers that serve `kind`. Results are first
23
+ * interleaved by provider, so one provider cannot crowd out the others, and
24
+ * then stably sorted by `relevance`: items whose title or tags contain the
25
+ * query words come first. Providers that match loosely (taxon or full-text
26
+ * search) return items that share no word with the query; those sink to the
27
+ * end instead of filling the first page.
25
28
  */
26
29
  export async function search(fetchImpl, query, kind, limit, page, options = {}) {
27
30
  const all = [];
@@ -68,7 +71,11 @@ export async function search(fetchImpl, query, kind, limit, page, options = {})
68
71
  all.push({ name: "huggingface", run: () => searchHuggingface(fetchImpl, params) });
69
72
  }
70
73
  const skip = new Set(options.skip ?? []);
71
- const run = all.filter((j) => !skip.has(j.name.split(":")[0]));
74
+ const only = options.providers?.length ? new Set(options.providers) : null;
75
+ const run = all.filter((j) => {
76
+ const id = j.name.split(":")[0];
77
+ return !skip.has(id) && (!only || only.has(id));
78
+ });
72
79
  const settled = await Promise.allSettled(run.map((j) => j.run()));
73
80
  const totals = {};
74
81
  const errors = [];
@@ -82,7 +89,45 @@ export async function search(fetchImpl, query, kind, limit, page, options = {})
82
89
  errors.push(`${run[i].name}: ${s.reason instanceof Error ? s.reason.message : String(s.reason)}`);
83
90
  }
84
91
  });
85
- return { query, kind, page, assets: interleave(lists).slice(0, limit), totals, errors };
92
+ return { query, kind, page, assets: rank(query, interleave(lists)).slice(0, limit), totals, errors };
93
+ }
94
+ /** Words of two or more letters or digits, lowercased; works for any script. */
95
+ function words(text) {
96
+ return text.toLowerCase().match(/[\p{L}\p{N}]{2,}/gu) ?? [];
97
+ }
98
+ /** Drops a plural "s"/"es" so "footsteps" matches "footstep" and "boxes" matches "box". */
99
+ function stem(w) {
100
+ if (w.length > 4 && w.endsWith("es"))
101
+ return w.slice(0, -2);
102
+ if (w.length > 3 && w.endsWith("s") && !w.endsWith("ss"))
103
+ return w.slice(0, -1);
104
+ return w;
105
+ }
106
+ const STOPWORDS = new Set(["a", "an", "and", "the", "of", "for", "with", "in", "on", "to", "or"]);
107
+ /**
108
+ * Share of the query's words found in the asset's title (weight 2) or tags
109
+ * (weight 1), from 0 to 2. A word matches when an asset word starts with its
110
+ * stem, so "sprite" matches "sprites" and "pixel" matches "pixelart".
111
+ * Scripts without spaces (e.g. Korean "고양이") also match as substrings.
112
+ */
113
+ export function relevance(query, asset) {
114
+ const q = [...new Set(words(query).filter((w) => !STOPWORDS.has(w)).map(stem))];
115
+ if (!q.length)
116
+ return 0;
117
+ const title = words(asset.title);
118
+ const tags = words(asset.tags.join(" "));
119
+ const hit = (list, w) => list.some((t) => t.startsWith(w) || (w.length >= 2 && !/^[a-z0-9]+$/.test(w) && t.includes(w)));
120
+ let score = 0;
121
+ for (const w of q)
122
+ score += hit(title, w) ? 2 : hit(tags, w) ? 1 : 0;
123
+ return score / q.length;
124
+ }
125
+ /** Stable sort by relevance; ties keep the interleaved provider order. */
126
+ export function rank(query, assets) {
127
+ return assets
128
+ .map((a, i) => ({ a, i, s: relevance(query, a) }))
129
+ .sort((x, y) => y.s - x.s || x.i - y.i)
130
+ .map((x) => x.a);
86
131
  }
87
132
  export function interleave(lists) {
88
133
  const out = [];
package/dist/server.js CHANGED
@@ -88,7 +88,7 @@ const result = (value) => ({
88
88
  });
89
89
  const fail = (message) => ({ content: [{ type: "text", text: message }], isError: true });
90
90
  export function createServer(fetchImpl = defaultFetch) {
91
- const server = new McpServer({ name: "cc0-library", version: "0.2.3" });
91
+ const server = new McpServer({ name: "cc0-library", version: "0.2.5" });
92
92
  server.registerTool("search_assets", {
93
93
  title: "Search CC0 assets across 17 sources",
94
94
  description: "Find CC0 1.0 (public-domain dedication) images, audio, video, HDRIs, textures, 3D models and museum artworks by keyword, " +
@@ -107,7 +107,7 @@ export function createServer(fetchImpl = defaultFetch) {
107
107
  .min(1)
108
108
  .max(20)
109
109
  .default(10)
110
- .describe("Maximum results to return, 1-20. With kind 'any' the sources are interleaved, so each contributes a few"),
110
+ .describe("Maximum results to return, 1-20. Results are ranked by how many query words appear in the title or tags; ties alternate between sources"),
111
111
  page: z
112
112
  .number()
113
113
  .int()
@@ -115,10 +115,18 @@ export function createServer(fetchImpl = defaultFetch) {
115
115
  .max(12)
116
116
  .default(1)
117
117
  .describe("1-based page; each source paginates independently. Request page 2+ only if `totals` shows more matches"),
118
+ providers: z
119
+ .array(z.enum(PROVIDER_IDS))
120
+ .min(1)
121
+ .max(PROVIDER_IDS.length)
122
+ .optional()
123
+ .describe("Search only these sources. Leave out to search every source for `kind`. Useful picks: ['iconify'] for icons, " +
124
+ "['polyhaven','ambientcg'] for studio-made textures and HDRIs, ['inaturalist','gbif'] for wildlife and specimens, " +
125
+ "['cleveland','met'] for museum art, ['openverse'] for sound effects"),
118
126
  },
119
127
  outputSchema: searchOutput,
120
128
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
121
- }, async ({ query, kind, limit, page }) => result(await search(fetchImpl, query, kind, limit, page)));
129
+ }, async ({ query, kind, limit, page, providers }) => result(await search(fetchImpl, query, kind, limit, page, { providers })));
122
130
  server.registerTool("get_asset", {
123
131
  title: "Get one CC0 asset with download files",
124
132
  description: "Fetch one asset's details and download files by an id from search_assets, re-checking at the source that it is still CC0. " +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc0-library-mcp",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "mcpName": "io.github.sanghyoLe/cc0-library",
5
5
  "description": "MCP server and web gallery for CC0-only assets (images, audio, video, HDRIs, textures, 3D models, museum art) from 8 sources, with license evidence per result.",
6
6
  "license": "MIT",