From 0112af71059a3643852902acb0b9c193bb1c2b86 Mon Sep 17 00:00:00 2001 From: matevip Date: Tue, 9 Jun 2026 14:27:49 +0800 Subject: [PATCH] fix(mcp): point ckjia-shopping seed at production endpoint (#289) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ...144__ckjia_mcp_fix_production_endpoint.sql | 28 +++++++++++++++++++ ...144__ckjia_mcp_fix_production_endpoint.sql | 28 +++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 mateclaw-server/src/main/resources/db/migration/h2/V144__ckjia_mcp_fix_production_endpoint.sql create mode 100644 mateclaw-server/src/main/resources/db/migration/mysql/V144__ckjia_mcp_fix_production_endpoint.sql diff --git a/mateclaw-server/src/main/resources/db/migration/h2/V144__ckjia_mcp_fix_production_endpoint.sql b/mateclaw-server/src/main/resources/db/migration/h2/V144__ckjia_mcp_fix_production_endpoint.sql new file mode 100644 index 00000000..259a0881 --- /dev/null +++ b/mateclaw-server/src/main/resources/db/migration/h2/V144__ckjia_mcp_fix_production_endpoint.sql @@ -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'; diff --git a/mateclaw-server/src/main/resources/db/migration/mysql/V144__ckjia_mcp_fix_production_endpoint.sql b/mateclaw-server/src/main/resources/db/migration/mysql/V144__ckjia_mcp_fix_production_endpoint.sql new file mode 100644 index 00000000..26576cc8 --- /dev/null +++ b/mateclaw-server/src/main/resources/db/migration/mysql/V144__ckjia_mcp_fix_production_endpoint.sql @@ -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';