deepseek-websearch-mcp 1.0.1 → 1.0.2
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/server.mjs +2 -2
package/package.json
CHANGED
package/server.mjs
CHANGED
|
@@ -60,7 +60,7 @@ function freshnessToOps(freshness) {
|
|
|
60
60
|
|
|
61
61
|
/** 调用 DeepSeek 工具接口,返回 { data, ms };非 2xx 抛 Error(带中文提示) */
|
|
62
62
|
async function apiPost(path, payload) {
|
|
63
|
-
const key = (process.env.
|
|
63
|
+
const key = (process.env.DEEPSEEK_API_KEY || "").trim();
|
|
64
64
|
if (!key) {
|
|
65
65
|
throw new Error("未配置 DEEPSEEK_API_KEY 环境变量。请在 MCP 注册配置的 env 中填入 platform.deepseek.com 申请的 API Key。");
|
|
66
66
|
}
|
|
@@ -246,7 +246,7 @@ function createServer() {
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
function readConfig() {
|
|
249
|
-
if (!process.env.
|
|
249
|
+
if (!process.env.DEEPSEEK_API_KEY) {
|
|
250
250
|
// 与 SDK 错误口径一致:启动期直接失败并给出中文指引
|
|
251
251
|
throw new Error("未配置 DEEPSEEK_API_KEY 环境变量。请在 MCP 注册配置的 env 中填入 platform.deepseek.com 申请的 API Key。");
|
|
252
252
|
}
|