fix(mcp): point ckjia-shopping seed at production endpoint (#289)

The V85 seed shipped a dev/test placeholder (sse + http://localhost:8085/sse
+ "Bearer ${CKJIA_MCP_KEY}") that can never connect, so the 参考价 price-
comparison skill was unusable until an admin hand-edited the row.

Add V144 (h2 + mysql) to rewrite the seed to the real CKJIA SaaS endpoint:
streamable_http + https://m.ckjia.com/api/ai/mcp, no auth header, connect/read
timeouts raised to 60s. Conditional on the row still carrying the dev
placeholder URL, so an admin who already pointed it at a private deployment is
left untouched; idempotent and leaves `enabled` opt-in.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
matevip 2026-06-09 14:27:49 +08:00
parent 64b8e167d5
commit 0112af7105
2 changed files with 56 additions and 0 deletions

View File

@ -0,0 +1,28 @@
-- Fix the ckjia-shopping MCP seed to its real production endpoint.
--
-- V85 seeded a dev/test placeholder (sse + http://localhost:8085/sse +
-- "Bearer ${CKJIA_MCP_KEY}"), which can never connect out of the box, so the
-- 参考价 / price-comparison skill stayed unusable until an admin hand-edited it.
-- The official CKJIA SaaS endpoint is Streamable HTTP at
-- https://m.ckjia.com/api/ai/mcp and needs no Authorization header.
--
-- Also raises both timeouts to 60s: the price-aggregation round-trip
-- (multi-platform search) legitimately runs longer than the old 30s ceiling.
--
-- SAFETY: only rewrites rows that still carry the untouched dev placeholder
-- URL, so an admin who already pointed ckjia-shopping at a private CKJIA
-- deployment (or the SaaS URL) is left completely alone. Idempotent — after it
-- runs the URL no longer matches the WHERE clause. `enabled` is deliberately
-- not changed: the server stays opt-in.
UPDATE mate_mcp_server
SET transport = 'streamable_http',
url = 'https://m.ckjia.com/api/ai/mcp',
headers_json = NULL,
connect_timeout_seconds = 60,
read_timeout_seconds = 60,
last_status = 'disconnected',
last_error = NULL,
description = 'CKJIA price comparison MCP server (Streamable HTTP). Disabled by default — enable it in Settings > MCP Connections to use the 参考价 shopping skill.',
update_time = CURRENT_TIMESTAMP
WHERE name = 'ckjia-shopping'
AND url = 'http://localhost:8085/sse';

View File

@ -0,0 +1,28 @@
-- Fix the ckjia-shopping MCP seed to its real production endpoint.
--
-- V85 seeded a dev/test placeholder (sse + http://localhost:8085/sse +
-- "Bearer ${CKJIA_MCP_KEY}"), which can never connect out of the box, so the
-- 参考价 / price-comparison skill stayed unusable until an admin hand-edited it.
-- The official CKJIA SaaS endpoint is Streamable HTTP at
-- https://m.ckjia.com/api/ai/mcp and needs no Authorization header.
--
-- Also raises both timeouts to 60s: the price-aggregation round-trip
-- (multi-platform search) legitimately runs longer than the old 30s ceiling.
--
-- SAFETY: only rewrites rows that still carry the untouched dev placeholder
-- URL, so an admin who already pointed ckjia-shopping at a private CKJIA
-- deployment (or the SaaS URL) is left completely alone. Idempotent — after it
-- runs the URL no longer matches the WHERE clause. `enabled` is deliberately
-- not changed: the server stays opt-in.
UPDATE mate_mcp_server
SET transport = 'streamable_http',
url = 'https://m.ckjia.com/api/ai/mcp',
headers_json = NULL,
connect_timeout_seconds = 60,
read_timeout_seconds = 60,
last_status = 'disconnected',
last_error = NULL,
description = 'CKJIA price comparison MCP server (Streamable HTTP). Disabled by default — enable it in Settings > MCP Connections to use the 参考价 shopping skill.',
update_time = NOW()
WHERE name = 'ckjia-shopping'
AND url = 'http://localhost:8085/sse';