feat(mcp): add context7 MCP and disabled_mcps config support
- Add context7 MCP for library documentation lookup - Add oh-my-opencode.json config file support for per-project settings - Support disabled_mcps array to selectively disable built-in MCPs - Update documentation with Configuration section
This commit is contained in:
@@ -1,5 +1,23 @@
|
||||
import { websearch_exa } from "./websearch-exa"
|
||||
import { context7 } from "./context7"
|
||||
|
||||
export const builtinMcps = {
|
||||
export type McpName = "websearch_exa" | "context7"
|
||||
|
||||
const allBuiltinMcps: Record<McpName, { type: "remote"; url: string; enabled: boolean }> = {
|
||||
websearch_exa,
|
||||
context7,
|
||||
}
|
||||
|
||||
export function createBuiltinMcps(disabledMcps: McpName[] = []) {
|
||||
const mcps: Record<string, { type: "remote"; url: string; enabled: boolean }> = {}
|
||||
|
||||
for (const [name, config] of Object.entries(allBuiltinMcps)) {
|
||||
if (!disabledMcps.includes(name as McpName)) {
|
||||
mcps[name] = config
|
||||
}
|
||||
}
|
||||
|
||||
return mcps
|
||||
}
|
||||
|
||||
export const builtinMcps = allBuiltinMcps
|
||||
|
||||
Reference in New Issue
Block a user