Files
Arcrun/mcp/wrangler.toml
T
uncle6me-web 1af7655ac6 fix(mcp-self-hosted): KBDB binding 指向不存在的 service + kbdb worker 未部署
self-hosted MCP failed 根因(壓測 2026-06-10):
1. mcp/wrangler.toml: KBDB service binding 綁 'inkstone-kbdb-api'(全 repo 僅此一處,
   不存在的舊名)→ 改成實際 worker 名 'arcrun-kbdb'(官方+self-hosted 共用)。
2. deploy.ts: self-hosted 部署清單漏了 kbdb worker(只有 cypher/registry/mcp)→
   D1 arcrun-kbdb 有建但 worker 本體沒部署 → KBDB binding 指向不存在 service →
   partnerAuthMiddleware 每個 MCP 認證請求都 throw。加 'kbdb' 進部署清單。
D1 id 注入已涵蓋(injectWranglerConfig 跑 tier2,kbdb 現在在 tier2)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-11 00:08:25 +08:00

27 lines
1.4 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name = "arcrun-mcp" # 2026-06-06 搬進主庫 arcrun/mcp/,對齊 arcrun-* 命名(SDD mcp-account-source.md §5
main = "src/index.ts"
compatibility_date = "2024-11-27"
compatibility_flags = [ "nodejs_compat" ]
workers_dev = true # 對齊 arcrun 部署慣例(rule 05):deploy 掃描自動啟用 workers.dev URL
# Service Bindings
# 2026-05-07COMPONENT_REGISTRY 從 inkstone-component-registry 改為 arcrun-registry
# 原因:舊的 inkstone-component-registry 期望不同 query 參數名,MCP search 失敗。
# 新的 arcrun-registryregistry.arcrun.dev)才是現役。
services = [
{ binding = "COMPONENT_REGISTRY", service = "arcrun-registry" },
{ binding = "CYPHER_EXECUTOR", service = "arcrun-cypher-executor" },
{ binding = "KBDB", service = "arcrun-kbdb" }
]
# Route — MCP 搬進 arcrun 主庫後改用 arcrun.dev zone(與其他 worker 一致)。
# 舊的 studio.finally.click 是 inkstone 平台 zonearcrun 帳號沒有該 zone → 部署 route 失敗。
# 對外正式 MCP URL = mcp.arcrun.dev;對內 / fork 仍可走 workers_dev=true 的 arcrun-mcp.<sub>.workers.dev。
[[routes]]
pattern = "mcp.arcrun.dev/*"
zone_name = "arcrun.dev"
# [alias] 移除:之前是 Zod 4 的 compat shim,但 MCP SDK 1.x 用的是 Zod 3 介面,
# shim 讓 SDK 拿到 Zod 4 內部結構,introspect schema 時報 _zod undefined。
# 降到 Zod 3.x 後不需要 shimpackage.json)。