返回列表 发新帖

[求助问答] MT mcp 连接不了

[复制链接]

9

主题

2086

回帖

5644

积分

硕士生

Rank: 6Rank: 6

金币
5563
好评
0
信誉
94
发表在  2026-7-26 09:12:03 | 显示全部楼层 | 阅读模式  来自 香港
本帖最后由 mkcs 于 2026-7-26 09:13 编辑

用本地llama.cpp离线模型加了mcp server地址,但连接不了mt管理器,该怎样解决?

09:06:54
Creating transport for http://192.168.1.2:8787/mcp
09:06:54
Transport ready (streamable_http)
09:06:54
Sending initialize request...
09:06:54
HTTP POST http://192.168.1.2:8787/mcp
details
{
  "serverName": "bcf37bf6-be5e-4cfa-93f3-6df7e67e7d4b",
  "request": {
    "url": "http://192.168.1.2:8787/mcp",
    "method": "POST",
    "headers": {
      "accept": "application/json, text/event-stream",
      "content-type": "application/json"
    },
    "body": {
      "kind": "string",
      "size": 189
    },
    "jsonRpcMethods": [
      "initialize"
    ]
  }
}
09:06:54
HTTP POST http://192.168.1.2:8787/mcp failed: Failed to fetch (check CORS?)
details
{
  "serverName": "bcf37bf6-be5e-4cfa-93f3-6df7e67e7d4b",
  "request": {
    "url": "http://192.168.1.2:8787/mcp",
    "method": "POST",
    "headers": {
      "accept": "application/json, text/event-stream",
      "content-type": "application/json"
    },
    "body": {
      "kind": "string",
      "size": 189
    },
    "jsonRpcMethods": [
      "initialize"
    ]
  },
  "error": {
    "name": "TypeError",
    "message": "Failed to fetch",
    "stack": "TypeError: Failed to fetch\n    at window.fetch (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:3:13157)\n    at window.fetch (chrome-extension://odphnbhiddhdpoccbialllejaajemdio/scripts/inspector.js:7:3144)\n    at fetch (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:155:2661)\n    at cEe.send (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:153:5791)"
  },
  "browser": {
    "location": "http://127.0.0.1:8080/#/mcp-servers",
    "origin": "http://127.0.0.1:8080",
    "protocol": "http:",
    "isSecureContext": true,
    "targetOrigin": "http://192.168.1.2:8787",
    "targetProtocol": "http:",
    "sameOrigin": false,
    "useProxy": false
  },
  "hints": [
    "This is a cross-origin browser request. If the server is reachable from curl or Node but not from the browser, missing CORS headers are the most likely cause.",
    "\"Failed to fetch\" is a browser-level network failure. Common causes are CORS rejection, mixed-content blocking, certificate/TLS errors, DNS failures, or nothing listening on the target port."
  ],
  "durationMs": 134
}
09:06:54
Protocol error: Failed to fetch
details
09:06:54
Connection failed during initialize: Failed to fetch
details
{
  "error": {
    "name": "TypeError",
    "message": "Failed to fetch",
    "stack": "TypeError: Failed to fetch\n    at window.fetch (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:3:13157)\n    at window.fetch (chrome-extension://odphnbhiddhdpoccbialllejaajemdio/scripts/inspector.js:7:3144)\n    at fetch (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:155:2661)\n    at cEe.send (http://127.0.0.1:8080/_app/immutable/bundle.Cv7hLaBr.js:153:5791)"
  },
  "config": {
    "serverName": "bcf37bf6-be5e-4cfa-93f3-6df7e67e7d4b",
    "configuredUrl": "http://192.168.1.2:8787/mcp",
    "effectiveUrl": "http://192.168.1.2:8787/mcp",
    "transportType": "streamable_http",
    "useProxy": false,
    "headers": {}
  },
  "browser": {
    "location": "http://127.0.0.1:8080/#/mcp-servers",
    "origin": "http://127.0.0.1:8080",
    "protocol": "http:",
    "isSecureContext": true,
    "targetOrigin": "http://192.168.1.2:8787",
    "targetProtocol": "http:",
    "sameOrigin": false,
    "useProxy": false
  },
  "hints": [
    "This is a cross-origin browser request. If the server is reachable from curl or Node but not from the browser, missing CORS headers are the most likely cause.",
    "\"Failed to fetch\" is a browser-level network failure. Common causes are CORS rejection, mixed-content blocking, certificate/TLS errors, DNS failures, or nothing listening on the target port."
  ]
}





本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

311

主题

4004

回帖

3万

积分

管理员

康哥工作室

Rank: 9Rank: 9Rank: 9

金币
47721
好评
276
信誉
141

小明星MT论坛元老MT论坛优秀版主MT论坛最佳新人MT论坛帅哥2018国庆节2019-5.1节快乐MT论坛侠客MT论坛活跃会员MT论坛灌水老大MT论坛土豪挂机大佬MT论坛新人

发表于 2026-7-26 09:29:29 | 显示全部楼层  来自 山东
你先确保在同一个网络中
回复

使用道具 举报

18

主题

2776

回帖

7699

积分

硕士生

Rank: 6Rank: 6

金币
957
好评
1
信誉
102
发表于 2026-7-26 11:14:39 来自手机  | 显示全部楼层  来自 河南
把故障码发给ai看看
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表