Summary
internal/core/types.go:8 has this comment:
// Any other string is treated as a custom base URL.
type LarkBrand string
However, the current ResolveEndpoints implementation (L24-39) only handles "lark" and defaults everything else to open.feishu.cn:
func ResolveEndpoints(brand LarkBrand) Endpoints {
switch brand {
case BrandLark:
return Endpoints{Open: "https://open.larksuite.com", ...}
default:
return Endpoints{Open: "https://open.feishu.cn", ...} // custom URL not implemented
}
}
Use Case
Many enterprises deploy private Feishu instances with custom domains (e.g., open.xfchat.iflytek.com). These instances use the same Open API protocol as open.feishu.cn, but with a different base URL.
Currently, lark-openapi-mcp supports this via the --domain parameter. It would be very helpful if lark-cli also supported custom domains, enabling the full CLI + 19 Skills experience on private deployments.
Proposed Solution
Minimal change (~4 lines) in ResolveEndpoints:
func ResolveEndpoints(brand LarkBrand) Endpoints {
switch brand {
case BrandLark:
return Endpoints{...larksuite.com...}
case BrandFeishu, "":
return Endpoints{...feishu.cn...}
default:
// Treat brand as custom base URL
base := string(brand)
return Endpoints{
Open: base,
Accounts: strings.Replace(base, "open.", "accounts.", 1),
MCP: strings.Replace(base, "open.", "mcp.", 1),
}
}
}
Then in config init, users could set brand: "https://open.xfchat.iflytek.com" to target their private instance.
Impact
This would unlock the entire 19-Skill ecosystem for private Feishu deployments without any architectural changes. The comment on L8 already describes this intent -- this PR would implement it.
Environment
- lark-cli v1.0.0
- Go 1.23+
- Windows 11 / macOS
Summary
internal/core/types.go:8has this comment:However, the current
ResolveEndpointsimplementation (L24-39) only handles"lark"and defaults everything else toopen.feishu.cn:Use Case
Many enterprises deploy private Feishu instances with custom domains (e.g.,
open.xfchat.iflytek.com). These instances use the same Open API protocol asopen.feishu.cn, but with a different base URL.Currently,
lark-openapi-mcpsupports this via the--domainparameter. It would be very helpful iflark-clialso supported custom domains, enabling the full CLI + 19 Skills experience on private deployments.Proposed Solution
Minimal change (~4 lines) in
ResolveEndpoints:Then in
config init, users could setbrand: "https://open.xfchat.iflytek.com"to target their private instance.Impact
This would unlock the entire 19-Skill ecosystem for private Feishu deployments without any architectural changes. The comment on L8 already describes this intent -- this PR would implement it.
Environment