Skip to content

Commit f1d97fa

Browse files
fix: Use download_url from API response instead of constructing URL
CRITICAL BUG FIX - Resolves 404 errors when fetching configs from API Root Cause: The code was constructing download URLs manually: download_url = f"{API_BASE_URL}/api/download/{config_name}.json" This fails because the API provides download_url in the response, which may differ from the constructed path (e.g., CDN URLs, version-specific paths). Solution: Changed both MCP server implementations to use download_url from API: download_url = config_info.get("download_url") Added validation check for missing download_url field. Files Modified: - src/skill_seekers/mcp/tools/source_tools.py (FastMCP server, line 285-297) - src/skill_seekers/mcp/server_legacy.py (Legacy server, line 1483-1494) Bug Report: User reported: skill-seekers install --config godot --unlimited - API check: /api/configs/godot → 200 OK ✅ - Download: /api/download/godot.json → 404 Not Found ❌ After Fix: - Uses download_url from API response → Works correctly ✅ Testing: ✅ All 15 source tools tests pass (test_mcp_fastmcp.py::TestSourceTools) ✅ All 8 fetch_config tests pass ✅ test_fetch_config_download_api: PASSED ✅ test_fetch_config_from_source: PASSED Impact: - Fixes config downloads from official API (skillseekersweb.com) - Fixes config downloads from private Git repositories - Prevents all future 404 errors from URL construction mismatch - No breaking changes - fully backward compatible Related Issue: Bug reported by user when testing Godot skill Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent e44977c commit f1d97fa

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

src/skill_seekers/mcp/server_legacy.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,8 +1479,16 @@ async def fetch_config_tool(args: dict) -> list[TextContent]:
14791479
detail_response.raise_for_status()
14801480
config_info = detail_response.json()
14811481

1482-
# Download the actual config file
1483-
download_url = f"{API_BASE_URL}/api/download/{config_name}.json"
1482+
# Download the actual config file using the download_url from API response
1483+
download_url = config_info.get("download_url")
1484+
if not download_url:
1485+
return [
1486+
TextContent(
1487+
type="text",
1488+
text=f"❌ Config '{config_name}' has no download_url. Contact support.",
1489+
)
1490+
]
1491+
14841492
download_response = await client.get(download_url)
14851493
download_response.raise_for_status()
14861494
config_data = download_response.json()

src/skill_seekers/mcp/tools/source_tools.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,16 @@ async def fetch_config_tool(args: dict) -> list[TextContent]:
282282
detail_response.raise_for_status()
283283
config_info = detail_response.json()
284284

285-
# Download the actual config file
286-
download_url = f"{API_BASE_URL}/api/download/{config_name}.json"
285+
# Download the actual config file using the download_url from API response
286+
download_url = config_info.get("download_url")
287+
if not download_url:
288+
return [
289+
TextContent(
290+
type="text",
291+
text=f"❌ Config '{config_name}' has no download_url. Contact support.",
292+
)
293+
]
294+
287295
download_response = await client.get(download_url)
288296
download_response.raise_for_status()
289297
config_data = download_response.json()

0 commit comments

Comments
 (0)