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:
YeonGyu-Kim
2025-12-05 02:23:34 +09:00
parent 6495fae979
commit 6220fcddcf
4 changed files with 71 additions and 4 deletions

5
src/mcp/context7.ts Normal file
View File

@@ -0,0 +1,5 @@
export const context7 = {
type: "remote" as const,
url: "https://mcp.context7.com/mcp",
enabled: true,
}

View File

@@ -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