@deepqtech/mcp-server-js 1.0.4 → 1.0.5
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/api-client.mjs +6 -0
- package/src/mcp-server.mjs +1 -0
package/package.json
CHANGED
package/src/api-client.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
import {compile, match} from 'path-to-regexp';
|
|
3
3
|
import _ from 'lodash';
|
|
4
|
+
import https from 'https';
|
|
4
5
|
|
|
5
6
|
export async function callApi(toolMeta, args) {
|
|
6
7
|
const {baseUrl, path, method, authorizationEnvKey} = toolMeta;
|
|
@@ -35,6 +36,11 @@ export async function callApi(toolMeta, args) {
|
|
|
35
36
|
url,
|
|
36
37
|
headers,
|
|
37
38
|
[paramKey]: otherParams,
|
|
39
|
+
httpsAgent: new https.Agent({
|
|
40
|
+
// 如果是自簽名憑證或測試環境,可設為 false;生產環境建議保持 true
|
|
41
|
+
rejectUnauthorized: false
|
|
42
|
+
}),
|
|
43
|
+
proxy: false
|
|
38
44
|
});
|
|
39
45
|
|
|
40
46
|
return response.data;
|
package/src/mcp-server.mjs
CHANGED