arcane-assets-mcp 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/QUICKSTART.md +209 -0
- package/README.md +247 -0
- package/TESTING.md +161 -0
- package/USAGE_EXAMPLE.md +284 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +245 -0
- package/dist/kenney-catalog.d.ts +8 -0
- package/dist/kenney-catalog.js +304 -0
- package/dist/kenney.d.ts +25 -0
- package/dist/kenney.js +239 -0
- package/dist/types.d.ts +46 -0
- package/dist/types.js +1 -0
- package/mcp-config-example.json +11 -0
- package/package.json +27 -0
- package/src/index.ts +292 -0
- package/src/kenney-catalog.ts +316 -0
- package/src/kenney.ts +296 -0
- package/src/types.ts +59 -0
- package/test-search.js +94 -0
- package/tsconfig.json +17 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.2.0] - 2026-02-10
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Smart synonym search** - Automatically understands related terms (e.g., "kitty" → "cat", "unicorn" → "horse")
|
|
7
|
+
- **Content-aware search** - Searches inside packs for specific sprites and assets
|
|
8
|
+
- **Search suggestions** - Provides helpful recommendations when no results found
|
|
9
|
+
- **Content metadata** - Added `contents` field to asset packs listing specific sprites inside
|
|
10
|
+
- **Relevance scoring** - Search results now sorted by relevance (exact matches rank higher)
|
|
11
|
+
- **5 new asset packs:**
|
|
12
|
+
- `animal-pack-redux` - 160 cute cartoon animals (cats, dogs, farm animals)
|
|
13
|
+
- `creature-mixer` - 100 mix-and-match monster parts
|
|
14
|
+
- `tiny-battle` - 234 medieval battle units and fantasy creatures
|
|
15
|
+
- `fish-pack` - 48 underwater creatures
|
|
16
|
+
- `toon-characters-1` - 16 cartoon characters
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
- Expanded catalog from 24 to 25+ packs
|
|
20
|
+
- Search algorithm now prioritizes content matches over description matches
|
|
21
|
+
- Improved search response format with helpful messages for empty results
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- Searches like "kitty", "unicorn", "wizard" now return relevant results
|
|
25
|
+
- Search no longer limited to exact keyword matches in pack names
|
|
26
|
+
|
|
27
|
+
## [0.1.0] - 2026-01-XX
|
|
28
|
+
|
|
29
|
+
### Added
|
|
30
|
+
- Initial release with 24 curated Kenney.nl asset packs
|
|
31
|
+
- 6 MCP tools: list, search, get, download, types, tags
|
|
32
|
+
- CC0 licensed assets (public domain)
|
|
33
|
+
- HTTP download support with redirect handling
|
package/QUICKSTART.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Quick Start: Asset MCP Server v0.2.0
|
|
2
|
+
|
|
3
|
+
## What Changed
|
|
4
|
+
|
|
5
|
+
The asset MCP server now reliably finds assets even when you use informal terms like "kitty" or "unicorn".
|
|
6
|
+
|
|
7
|
+
### Before (v0.1.0)
|
|
8
|
+
```
|
|
9
|
+
Search "kitty" → No results ❌
|
|
10
|
+
Search "unicorn" → No results ❌
|
|
11
|
+
Search "xyz123" → Empty result, no help ❌
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### After (v0.2.0)
|
|
15
|
+
```
|
|
16
|
+
Search "kitty" → Animal Pack Redux (contains cats) ✅
|
|
17
|
+
Search "unicorn" → Animal Pack Redux (contains horses) ✅
|
|
18
|
+
Search "xyz123" → Helpful suggestions ✅
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
1. **Rebuild the server** (if you haven't already):
|
|
24
|
+
```bash
|
|
25
|
+
cd mcp/arcane-assets
|
|
26
|
+
npm install
|
|
27
|
+
npm run build
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. **Configure in Claude Code** (`~/.claude/mcp.json`):
|
|
31
|
+
```json
|
|
32
|
+
{
|
|
33
|
+
"mcpServers": {
|
|
34
|
+
"arcane-assets": {
|
|
35
|
+
"command": "node",
|
|
36
|
+
"args": ["/Users/arkham/project/arcane/mcp/arcane-assets/dist/index.js"],
|
|
37
|
+
"disabled": false
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
3. **Restart Claude Code** to load the updated server
|
|
44
|
+
|
|
45
|
+
## Example Usage
|
|
46
|
+
|
|
47
|
+
### Searching for Animals
|
|
48
|
+
|
|
49
|
+
**You say:** "I want to add kitty and unicorn sprites to my game"
|
|
50
|
+
|
|
51
|
+
**Claude Code will:**
|
|
52
|
+
```typescript
|
|
53
|
+
// 1. Search for kitty sprites
|
|
54
|
+
search_kenney_assets({ query: "kitty" })
|
|
55
|
+
// → Finds Animal Pack Redux with cats
|
|
56
|
+
|
|
57
|
+
// 2. Search for unicorn sprites
|
|
58
|
+
search_kenney_assets({ query: "unicorn" })
|
|
59
|
+
// → Finds Animal Pack Redux with horses (unicorns are fantasy horses)
|
|
60
|
+
|
|
61
|
+
// 3. Download the pack
|
|
62
|
+
download_kenney_asset({
|
|
63
|
+
id: "animal-pack-redux",
|
|
64
|
+
destination: "./assets"
|
|
65
|
+
})
|
|
66
|
+
// → Downloads animalpackredux.zip to ./assets/
|
|
67
|
+
|
|
68
|
+
// 4. Extract and integrate
|
|
69
|
+
// Claude extracts the ZIP and updates your game code
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Searching for Game Elements
|
|
73
|
+
|
|
74
|
+
**You say:** "Add wizard and dragon sprites"
|
|
75
|
+
|
|
76
|
+
**Claude Code will:**
|
|
77
|
+
```typescript
|
|
78
|
+
search_kenney_assets({ query: "wizard" })
|
|
79
|
+
// → Finds: Tiny Battle, Roguelike RPG Pack
|
|
80
|
+
|
|
81
|
+
search_kenney_assets({ query: "dragon" })
|
|
82
|
+
// → Finds: Tiny Battle (highest relevance)
|
|
83
|
+
|
|
84
|
+
download_kenney_asset({
|
|
85
|
+
id: "tiny-battle",
|
|
86
|
+
destination: "./assets"
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Exploring the Catalog
|
|
91
|
+
|
|
92
|
+
**You say:** "Show me all animal packs"
|
|
93
|
+
|
|
94
|
+
**Claude Code will:**
|
|
95
|
+
```typescript
|
|
96
|
+
search_kenney_assets({ query: "animal" })
|
|
97
|
+
// → Returns 4 packs:
|
|
98
|
+
// - Animal Pack Redux (160 assets)
|
|
99
|
+
// - Creature Mixer (100 assets)
|
|
100
|
+
// - Tiny Battle (234 assets)
|
|
101
|
+
// - Fish Pack (48 assets)
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## What's Inside Packs
|
|
105
|
+
|
|
106
|
+
The server now knows what's inside each pack:
|
|
107
|
+
|
|
108
|
+
### Animal Pack Redux (160 assets)
|
|
109
|
+
**Contains:** cat, dog, bird, chicken, cow, pig, sheep, horse, rabbit, mouse, bear, fox
|
|
110
|
+
|
|
111
|
+
### Tiny Battle (234 assets)
|
|
112
|
+
**Contains:** knight, archer, cavalry, wizard, dragon, skeleton, orc
|
|
113
|
+
|
|
114
|
+
### Roguelike RPG Pack (1366 assets)
|
|
115
|
+
**Contains:** knight, wizard, skeleton, orc, chest, potion, weapon, armor, tiles, ui
|
|
116
|
+
|
|
117
|
+
### Platformer Pack Redux (360 assets)
|
|
118
|
+
**Contains:** player, enemies, slime, bee, snail, tiles, coins, gems, spikes
|
|
119
|
+
|
|
120
|
+
## Synonym Support
|
|
121
|
+
|
|
122
|
+
The server understands these related terms:
|
|
123
|
+
|
|
124
|
+
| You search for | Server understands as |
|
|
125
|
+
|----------------|----------------------|
|
|
126
|
+
| kitty, kitten | cat |
|
|
127
|
+
| puppy | dog |
|
|
128
|
+
| pony, unicorn | horse |
|
|
129
|
+
| mage, sorcerer | wizard |
|
|
130
|
+
| warrior, paladin | knight |
|
|
131
|
+
| creature, beast | monster |
|
|
132
|
+
| treasure, money | coin |
|
|
133
|
+
| jewel, crystal | gem |
|
|
134
|
+
|
|
135
|
+
## Helpful Suggestions
|
|
136
|
+
|
|
137
|
+
When searches fail, you get guidance:
|
|
138
|
+
|
|
139
|
+
```typescript
|
|
140
|
+
search_kenney_assets({ query: "nonexistent" })
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Response:**
|
|
144
|
+
```
|
|
145
|
+
No results found for "nonexistent".
|
|
146
|
+
|
|
147
|
+
Suggestions:
|
|
148
|
+
• Try browsing by type: 2d-sprites, audio, fonts, tilesets, ui, vfx
|
|
149
|
+
• Popular packs: platformer-pack-redux, tiny-dungeon, animal-pack-redux, ui-pack
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
## Testing
|
|
153
|
+
|
|
154
|
+
Run the validation script to verify everything works:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
cd mcp/arcane-assets
|
|
158
|
+
node test-search.js
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
Expected output:
|
|
162
|
+
```
|
|
163
|
+
✅ PASS - Found packs containing cats/kitties
|
|
164
|
+
✅ PASS - Found packs containing horses/unicorns
|
|
165
|
+
✅ PASS - Found animal packs
|
|
166
|
+
✅ PASS - Provided helpful suggestions when no results found
|
|
167
|
+
|
|
168
|
+
Total packs: 25
|
|
169
|
+
Packs with content metadata: 10
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## New Asset Packs
|
|
173
|
+
|
|
174
|
+
Five new packs added in this version:
|
|
175
|
+
|
|
176
|
+
1. **Animal Pack Redux** - Cute cartoon animals (cats, dogs, farm animals)
|
|
177
|
+
2. **Creature Mixer** - Mix-and-match monster parts
|
|
178
|
+
3. **Tiny Battle** - Medieval units and fantasy creatures
|
|
179
|
+
4. **Fish Pack** - Underwater creatures
|
|
180
|
+
5. **Toon Characters 1** - Cartoon character sprites
|
|
181
|
+
|
|
182
|
+
## Troubleshooting
|
|
183
|
+
|
|
184
|
+
### "MCP server not found"
|
|
185
|
+
- Make sure the path in `mcp.json` points to the correct location
|
|
186
|
+
- Restart Claude Code after config changes
|
|
187
|
+
|
|
188
|
+
### "No results for [query]"
|
|
189
|
+
- Check the suggestions provided in the response
|
|
190
|
+
- Try browsing all packs: `list_kenney_assets()`
|
|
191
|
+
- Try searching by type: `search_kenney_assets({ query: "ui", type: "ui" })`
|
|
192
|
+
|
|
193
|
+
### "Download failed"
|
|
194
|
+
- Check destination directory exists and is writable
|
|
195
|
+
- Verify internet connection (downloads from kenney.nl)
|
|
196
|
+
- Check disk space
|
|
197
|
+
|
|
198
|
+
## Next Steps
|
|
199
|
+
|
|
200
|
+
1. Try searching for assets you need
|
|
201
|
+
2. Download packs to your game's assets directory
|
|
202
|
+
3. Extract ZIP files and integrate sprites into your game
|
|
203
|
+
4. Share feedback on what works and what doesn't
|
|
204
|
+
|
|
205
|
+
## Support
|
|
206
|
+
|
|
207
|
+
- Documentation: `mcp/arcane-assets/README.md`
|
|
208
|
+
- Testing guide: `mcp/arcane-assets/TESTING.md`
|
|
209
|
+
- Changelog: `mcp/arcane-assets/CHANGELOG.md`
|
package/README.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# Arcane Assets MCP Server
|
|
2
|
+
|
|
3
|
+
MCP server for discovering and downloading game assets for the Arcane game engine.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
### Kenney.nl Integration ✅
|
|
8
|
+
|
|
9
|
+
- **25+ curated asset packs** covering platformers, RPGs, shooters, puzzles, UI, audio, animals, and more
|
|
10
|
+
- **CC0 (public domain)** - no attribution required, use in any project
|
|
11
|
+
- **6 MCP tools** for browsing, searching, and downloading assets
|
|
12
|
+
- **60,000+ total assets** across all packs
|
|
13
|
+
- **Smart search** with synonym support (e.g., "kitty" finds cat assets, "unicorn" finds horse assets)
|
|
14
|
+
- **Content-aware search** - searches inside packs for specific sprites (cat, dog, wizard, etc.)
|
|
15
|
+
- **Helpful suggestions** when searches return no results
|
|
16
|
+
|
|
17
|
+
### Coming Soon
|
|
18
|
+
|
|
19
|
+
- Freesound.org integration (sound effects with API)
|
|
20
|
+
- itch.io integration (community assets)
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
From the `mcp/arcane-assets` directory:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm install
|
|
28
|
+
npm run build
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Configuration
|
|
32
|
+
|
|
33
|
+
Add to your Claude Code MCP settings (`~/.claude/mcp.json` or project-specific `.claude/mcp.json`):
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"mcpServers": {
|
|
38
|
+
"arcane-assets": {
|
|
39
|
+
"command": "node",
|
|
40
|
+
"args": ["/absolute/path/to/arcane/mcp/arcane-assets/dist/index.js"],
|
|
41
|
+
"disabled": false
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Replace `/absolute/path/to/arcane` with the actual path to your Arcane repository.
|
|
48
|
+
|
|
49
|
+
## Available Tools
|
|
50
|
+
|
|
51
|
+
### `list_kenney_assets`
|
|
52
|
+
|
|
53
|
+
List all available Kenney.nl asset packs.
|
|
54
|
+
|
|
55
|
+
**Returns:** Array of asset packs with metadata (name, description, type, license, download URL, tags)
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
```typescript
|
|
59
|
+
// Lists all 24 curated packs
|
|
60
|
+
list_kenney_assets()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### `search_kenney_assets`
|
|
64
|
+
|
|
65
|
+
Search Kenney.nl asset packs by keyword.
|
|
66
|
+
|
|
67
|
+
**Parameters:**
|
|
68
|
+
- `query` (string, required): Search query
|
|
69
|
+
- `type` (string, optional): Filter by asset type (`2d-sprites`, `ui`, `audio`, `fonts`, `vfx`, `tilesets`, `textures`)
|
|
70
|
+
|
|
71
|
+
**Returns:** Search results with matching packs
|
|
72
|
+
|
|
73
|
+
**Examples:**
|
|
74
|
+
```typescript
|
|
75
|
+
// Find platformer assets
|
|
76
|
+
search_kenney_assets({ query: "platformer" })
|
|
77
|
+
|
|
78
|
+
// Find UI elements
|
|
79
|
+
search_kenney_assets({ query: "button", type: "ui" })
|
|
80
|
+
|
|
81
|
+
// Find audio
|
|
82
|
+
search_kenney_assets({ query: "impact", type: "audio" })
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### `get_kenney_asset`
|
|
86
|
+
|
|
87
|
+
Get detailed information about a specific asset pack.
|
|
88
|
+
|
|
89
|
+
**Parameters:**
|
|
90
|
+
- `id` (string, required): Asset pack ID
|
|
91
|
+
|
|
92
|
+
**Returns:** Asset pack metadata
|
|
93
|
+
|
|
94
|
+
**Example:**
|
|
95
|
+
```typescript
|
|
96
|
+
get_kenney_asset({ id: "tiny-dungeon" })
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### `download_kenney_asset`
|
|
100
|
+
|
|
101
|
+
Download an asset pack to a local directory.
|
|
102
|
+
|
|
103
|
+
**Parameters:**
|
|
104
|
+
- `id` (string, required): Asset pack ID
|
|
105
|
+
- `destination` (string, required): Destination directory path
|
|
106
|
+
|
|
107
|
+
**Returns:** Download result with success status and file path
|
|
108
|
+
|
|
109
|
+
**Example:**
|
|
110
|
+
```typescript
|
|
111
|
+
// Download to project assets directory
|
|
112
|
+
download_kenney_asset({
|
|
113
|
+
id: "platformer-pack-redux",
|
|
114
|
+
destination: "./assets"
|
|
115
|
+
})
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### `get_asset_types`
|
|
119
|
+
|
|
120
|
+
Get all asset types available in the catalog.
|
|
121
|
+
|
|
122
|
+
**Returns:** Array of asset type strings
|
|
123
|
+
|
|
124
|
+
### `get_tags`
|
|
125
|
+
|
|
126
|
+
Get all tags used in the catalog (useful for discovering search keywords).
|
|
127
|
+
|
|
128
|
+
**Returns:** Array of tag strings
|
|
129
|
+
|
|
130
|
+
## Search Features
|
|
131
|
+
|
|
132
|
+
### Smart Synonym Search
|
|
133
|
+
|
|
134
|
+
The search automatically understands related terms:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
// These all find the same Animal Pack Redux:
|
|
138
|
+
search_kenney_assets({ query: "cat" })
|
|
139
|
+
search_kenney_assets({ query: "kitty" })
|
|
140
|
+
search_kenney_assets({ query: "kitten" })
|
|
141
|
+
|
|
142
|
+
// These find packs with horses:
|
|
143
|
+
search_kenney_assets({ query: "horse" })
|
|
144
|
+
search_kenney_assets({ query: "pony" })
|
|
145
|
+
search_kenney_assets({ query: "unicorn" })
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Content-Aware Search
|
|
149
|
+
|
|
150
|
+
The server knows what's inside each pack:
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
// Finds packs containing wizard sprites
|
|
154
|
+
search_kenney_assets({ query: "wizard" })
|
|
155
|
+
// Returns: Tiny Battle, Roguelike RPG Pack
|
|
156
|
+
|
|
157
|
+
// Finds packs containing explosions
|
|
158
|
+
search_kenney_assets({ query: "explosion" })
|
|
159
|
+
// Returns: Space Shooter Redux, Particle Pack
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Helpful Suggestions
|
|
163
|
+
|
|
164
|
+
When no results are found, get suggestions for:
|
|
165
|
+
- Related search terms
|
|
166
|
+
- Available asset types
|
|
167
|
+
- Popular packs
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
search_kenney_assets({ query: "xyz123" })
|
|
171
|
+
// Returns suggestions: "Try browsing by type: 2d-sprites, ui, audio..."
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
## Asset Pack Highlights
|
|
175
|
+
|
|
176
|
+
### Animals & Creatures
|
|
177
|
+
- **animal-pack-redux** - 160 assets, cute cartoon animals (cats, dogs, farm animals)
|
|
178
|
+
- **creature-mixer** - 100 assets, mix-and-match monster parts
|
|
179
|
+
- **tiny-battle** - 234 assets, knights, wizards, dragons
|
|
180
|
+
- **fish-pack** - 48 assets, underwater creatures
|
|
181
|
+
|
|
182
|
+
### Platformers
|
|
183
|
+
- **platformer-pack-redux** - 360 assets, complete platformer art
|
|
184
|
+
- **pixel-platformer** - 220 assets, retro pixel art style
|
|
185
|
+
- **abstract-platformer** - 250 assets, colorful abstract shapes
|
|
186
|
+
|
|
187
|
+
### RPG / Roguelike
|
|
188
|
+
- **tiny-dungeon** - 234 assets, micro roguelike tileset
|
|
189
|
+
- **roguelike-rpg-pack** - 1366 assets, massive dungeon crawler pack
|
|
190
|
+
- **tiny-town** - 239 assets, medieval town tileset
|
|
191
|
+
|
|
192
|
+
### Shooters
|
|
193
|
+
- **space-shooter-redux** - 384 assets, space shmup pack
|
|
194
|
+
- **topdown-shooter** - 496 assets, top-down spacecraft
|
|
195
|
+
- **topdown-tanks-redux** - 506 assets, tank warfare
|
|
196
|
+
|
|
197
|
+
### UI
|
|
198
|
+
- **ui-pack** - 322 assets, complete UI kit
|
|
199
|
+
- **ui-pack-rpg-expansion** - 250 assets, fantasy RPG styling
|
|
200
|
+
- **ui-pack-space-expansion** - 250 assets, sci-fi styling
|
|
201
|
+
|
|
202
|
+
### Audio
|
|
203
|
+
- **digital-audio** - 626 sounds, digital SFX
|
|
204
|
+
- **impact-sounds** - 50 sounds, hits and punches
|
|
205
|
+
- **music-jingles** - 35 tracks, short musical loops
|
|
206
|
+
|
|
207
|
+
### Other
|
|
208
|
+
- **particle-pack** - 284 assets, VFX particles
|
|
209
|
+
- **kenney-fonts** - 11 fonts, pixel game fonts
|
|
210
|
+
- **1-bit-pack** - 292 assets, monochrome tileset
|
|
211
|
+
|
|
212
|
+
## Usage Examples
|
|
213
|
+
|
|
214
|
+
### Agent-Driven Asset Discovery
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
// Agent searches for assets based on game requirements
|
|
218
|
+
const result = await search_kenney_assets({
|
|
219
|
+
query: "dungeon",
|
|
220
|
+
type: "tilesets"
|
|
221
|
+
});
|
|
222
|
+
|
|
223
|
+
// Agent reviews results and downloads selected pack
|
|
224
|
+
const download = await download_kenney_asset({
|
|
225
|
+
id: "tiny-dungeon",
|
|
226
|
+
destination: "./demos/roguelike/assets"
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
// Agent extracts and integrates into game code
|
|
230
|
+
```
|
|
231
|
+
|
|
232
|
+
### Skill Integration
|
|
233
|
+
|
|
234
|
+
Create a `/add-asset` skill that uses these MCP tools:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# User invokes skill
|
|
238
|
+
/add-asset platformer sprites
|
|
239
|
+
|
|
240
|
+
# Skill searches, presents options, downloads on selection
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## License
|
|
244
|
+
|
|
245
|
+
Apache 2.0 - See LICENSE file
|
|
246
|
+
|
|
247
|
+
All Kenney.nl assets are CC0 (public domain) and require no attribution.
|
package/TESTING.md
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Testing the Asset MCP Server
|
|
2
|
+
|
|
3
|
+
## Quick Test
|
|
4
|
+
|
|
5
|
+
Run the test script to validate all improvements:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
node test-search.js
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Expected output:
|
|
12
|
+
```
|
|
13
|
+
✅ PASS - Found packs containing cats/kitties
|
|
14
|
+
✅ PASS - Found packs containing horses/unicorns
|
|
15
|
+
✅ PASS - Found animal packs
|
|
16
|
+
✅ PASS - Provided helpful suggestions when no results found
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Manual Testing with Claude Code
|
|
20
|
+
|
|
21
|
+
Once the MCP server is configured in `~/.claude/mcp.json`, test these scenarios:
|
|
22
|
+
|
|
23
|
+
### Test 1: Synonym Search (kitty → cat)
|
|
24
|
+
|
|
25
|
+
**Prompt:** "Search for kitty sprites"
|
|
26
|
+
|
|
27
|
+
**Expected:** Should find `animal-pack-redux` containing cats
|
|
28
|
+
|
|
29
|
+
**MCP Call:**
|
|
30
|
+
```typescript
|
|
31
|
+
search_kenney_assets({ query: "kitty" })
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Result:**
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"packs": [
|
|
38
|
+
{
|
|
39
|
+
"id": "animal-pack-redux",
|
|
40
|
+
"name": "Animal Pack Redux (160 assets)",
|
|
41
|
+
"contents": ["cat", "dog", "bird", ...]
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"total": 1
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Test 2: Content-Aware Search (wizard)
|
|
49
|
+
|
|
50
|
+
**Prompt:** "Find packs with wizard sprites"
|
|
51
|
+
|
|
52
|
+
**Expected:** Should find `tiny-battle` and `roguelike-rpg-pack`
|
|
53
|
+
|
|
54
|
+
**MCP Call:**
|
|
55
|
+
```typescript
|
|
56
|
+
search_kenney_assets({ query: "wizard" })
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Result:** Multiple packs ranked by relevance (ones with "wizard" in contents ranked higher)
|
|
60
|
+
|
|
61
|
+
### Test 3: Helpful Suggestions (no results)
|
|
62
|
+
|
|
63
|
+
**Prompt:** "Search for zzz999" (nonsense query)
|
|
64
|
+
|
|
65
|
+
**Expected:** Should provide helpful suggestions
|
|
66
|
+
|
|
67
|
+
**MCP Call:**
|
|
68
|
+
```typescript
|
|
69
|
+
search_kenney_assets({ query: "zzz999" })
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**Result:**
|
|
73
|
+
```
|
|
74
|
+
No results found for "zzz999".
|
|
75
|
+
|
|
76
|
+
Suggestions:
|
|
77
|
+
• Try browsing by type: 2d-sprites, audio, fonts, tilesets, ui, vfx
|
|
78
|
+
• Popular packs: platformer-pack-redux, tiny-dungeon, animal-pack-redux, ui-pack
|
|
79
|
+
|
|
80
|
+
{
|
|
81
|
+
"packs": [],
|
|
82
|
+
"total": 0,
|
|
83
|
+
"suggestions": [...]
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Test 4: Type Filtering
|
|
88
|
+
|
|
89
|
+
**Prompt:** "Find audio with impact sounds"
|
|
90
|
+
|
|
91
|
+
**MCP Call:**
|
|
92
|
+
```typescript
|
|
93
|
+
search_kenney_assets({ query: "impact", type: "audio" })
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**Result:** Should find `impact-sounds` pack only
|
|
97
|
+
|
|
98
|
+
### Test 5: Download Flow
|
|
99
|
+
|
|
100
|
+
**Prompt:** "Download the animal pack to ./assets"
|
|
101
|
+
|
|
102
|
+
**MCP Calls:**
|
|
103
|
+
```typescript
|
|
104
|
+
// First, search
|
|
105
|
+
search_kenney_assets({ query: "animal" })
|
|
106
|
+
|
|
107
|
+
// Then download
|
|
108
|
+
download_kenney_asset({
|
|
109
|
+
id: "animal-pack-redux",
|
|
110
|
+
destination: "./assets"
|
|
111
|
+
})
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
**Result:** ZIP file downloaded to `./assets/animalpackredux.zip`
|
|
115
|
+
|
|
116
|
+
## Common Search Terms to Test
|
|
117
|
+
|
|
118
|
+
### Animals
|
|
119
|
+
- `cat`, `kitty`, `kitten` → Animal Pack Redux
|
|
120
|
+
- `dog`, `puppy` → Animal Pack Redux
|
|
121
|
+
- `horse`, `pony`, `unicorn` → Animal Pack Redux
|
|
122
|
+
- `dragon` → Tiny Battle, Roguelike RPG Pack
|
|
123
|
+
- `fish` → Fish Pack
|
|
124
|
+
|
|
125
|
+
### Characters
|
|
126
|
+
- `wizard`, `mage` → Tiny Battle, Roguelike RPG Pack
|
|
127
|
+
- `knight`, `warrior` → Tiny Battle, Roguelike RPG Pack, Platformer Pack Redux
|
|
128
|
+
- `hero`, `player` → Multiple packs
|
|
129
|
+
|
|
130
|
+
### Objects
|
|
131
|
+
- `coin`, `treasure` → Platformer Pack Redux
|
|
132
|
+
- `button` → UI Pack
|
|
133
|
+
- `explosion` → Space Shooter Redux, Particle Pack
|
|
134
|
+
|
|
135
|
+
### Styles
|
|
136
|
+
- `pixel-art` → Tiny Dungeon, Pixel Platformer
|
|
137
|
+
- `cartoon` → Animal Pack Redux, Toon Characters
|
|
138
|
+
- `1-bit` → 1-Bit Pack
|
|
139
|
+
|
|
140
|
+
## Performance Expectations
|
|
141
|
+
|
|
142
|
+
- **Search latency:** < 1ms (in-memory catalog)
|
|
143
|
+
- **Download latency:** Depends on file size and network (typically 1-5 seconds for most packs)
|
|
144
|
+
- **Memory usage:** < 10MB (catalog is small)
|
|
145
|
+
|
|
146
|
+
## Known Limitations
|
|
147
|
+
|
|
148
|
+
1. **Catalog is curated** - Only includes selected Kenney packs, not the entire Kenney library
|
|
149
|
+
2. **Content metadata is manual** - Not auto-generated from actual pack contents
|
|
150
|
+
3. **No fuzzy matching** - "cet" won't find "cat" (only synonyms work)
|
|
151
|
+
4. **Downloads are synchronous** - Large packs (>50MB) may take time
|
|
152
|
+
5. **No extraction** - Downloads ZIP files, user must extract them
|
|
153
|
+
|
|
154
|
+
## Future Improvements
|
|
155
|
+
|
|
156
|
+
- [ ] Add fuzzy string matching for typos
|
|
157
|
+
- [ ] Auto-generate content metadata from actual sprite filenames
|
|
158
|
+
- [ ] Support automatic ZIP extraction
|
|
159
|
+
- [ ] Add thumbnail URLs for visual browsing
|
|
160
|
+
- [ ] Integrate Freesound.org for sound effects
|
|
161
|
+
- [ ] Add itch.io integration for community assets
|