spritecook-mcp 0.2.10 → 0.2.11
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/package.json +1 -1
- package/src/editors.mjs +10 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spritecook-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"mcpName": "ai.spritecook/generate",
|
|
5
5
|
"description": "SpriteCook MCP Server - Connect your AI agent (Cursor, VS Code, Claude) to SpriteCook for pixel art and game asset generation.",
|
|
6
6
|
"keywords": [
|
package/src/editors.mjs
CHANGED
|
@@ -199,17 +199,18 @@ export function detectEditors() {
|
|
|
199
199
|
});
|
|
200
200
|
|
|
201
201
|
// ── Claude Code ─────────────────────────────────────────────
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
const
|
|
205
|
-
const
|
|
202
|
+
// MCP servers are always stored in ~/.claude.json (not ~/.claude/settings.json).
|
|
203
|
+
// Detection: check both files, but always write MCP config to ~/.claude.json.
|
|
204
|
+
const claudeCodeMcpPath = join(home, '.claude.json');
|
|
205
|
+
const claudeCodeSettingsPath = join(home, '.claude', 'settings.json');
|
|
206
|
+
const claudeCodeDetected = existsSync(claudeCodeMcpPath) || existsSync(claudeCodeSettingsPath);
|
|
206
207
|
editors.push({
|
|
207
208
|
name: 'Claude Code',
|
|
208
209
|
detected: claudeCodeDetected,
|
|
209
210
|
scopes: ['global'],
|
|
210
211
|
defaultScope: 'global',
|
|
211
|
-
configPath: () =>
|
|
212
|
-
write: (apiKey) => writeClaudeCodeConfig(
|
|
212
|
+
configPath: () => claudeCodeMcpPath,
|
|
213
|
+
write: (apiKey) => writeClaudeCodeConfig(claudeCodeMcpPath, apiKey),
|
|
213
214
|
skillDirs: {
|
|
214
215
|
project: join(cwd, '.claude', 'skills', 'spritecook'),
|
|
215
216
|
global: join(home, '.claude', 'skills', 'spritecook'),
|
|
@@ -380,8 +381,11 @@ function writeClaudeCodeConfig(configPath, apiKey) {
|
|
|
380
381
|
try { config = JSON.parse(readFileSync(configPath, 'utf-8')); } catch { /* start fresh */ }
|
|
381
382
|
}
|
|
382
383
|
|
|
384
|
+
// Claude Code requires "type": "http" for remote servers
|
|
385
|
+
// Config lives in ~/.claude.json per https://docs.anthropic.com/en/docs/claude-code/mcp
|
|
383
386
|
if (!config.mcpServers) config.mcpServers = {};
|
|
384
387
|
config.mcpServers.spritecook = {
|
|
388
|
+
type: 'http',
|
|
385
389
|
url: mcpUrl,
|
|
386
390
|
headers: { Authorization: `Bearer ${apiKey}` },
|
|
387
391
|
};
|