2026-01-07 01:24:50 +09:00
|
|
|
import { websearch } from "./websearch"
|
2025-12-05 02:23:34 +09:00
|
|
|
import { context7 } from "./context7"
|
2025-12-13 19:13:40 +09:00
|
|
|
import { grep_app } from "./grep-app"
|
2025-12-05 03:58:21 +09:00
|
|
|
import type { McpName } from "./types"
|
2025-12-05 02:15:39 +09:00
|
|
|
|
2025-12-05 03:58:21 +09:00
|
|
|
export { McpNameSchema, type McpName } from "./types"
|
2025-12-05 02:23:34 +09:00
|
|
|
|
2026-01-06 14:12:22 -07:00
|
|
|
type RemoteMcpConfig = {
|
|
|
|
|
type: "remote"
|
|
|
|
|
url: string
|
|
|
|
|
enabled: boolean
|
|
|
|
|
headers?: Record<string, string>
|
2026-01-17 16:36:23 +05:30
|
|
|
oauth?: false
|
2026-01-06 14:12:22 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const allBuiltinMcps: Record<McpName, RemoteMcpConfig> = {
|
2026-01-07 01:24:50 +09:00
|
|
|
websearch,
|
2025-12-05 02:23:34 +09:00
|
|
|
context7,
|
2025-12-13 19:13:40 +09:00
|
|
|
grep_app,
|
2025-12-05 02:23:34 +09:00
|
|
|
}
|
|
|
|
|
|
2026-01-05 21:12:05 +09:00
|
|
|
export function createBuiltinMcps(disabledMcps: string[] = []) {
|
2026-01-06 14:12:22 -07:00
|
|
|
const mcps: Record<string, RemoteMcpConfig> = {}
|
2025-12-05 02:23:34 +09:00
|
|
|
|
|
|
|
|
for (const [name, config] of Object.entries(allBuiltinMcps)) {
|
2026-01-05 21:12:05 +09:00
|
|
|
if (!disabledMcps.includes(name)) {
|
2025-12-05 02:23:34 +09:00
|
|
|
mcps[name] = config
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return mcps
|
2025-12-05 02:15:39 +09:00
|
|
|
}
|