feat(mcp): register lsp tier-1 stdio MCP server
This commit is contained in:
+11
-1
@@ -1,6 +1,7 @@
|
||||
import { createWebsearchConfig } from "./websearch"
|
||||
import { context7 } from "./context7"
|
||||
import { grep_app } from "./grep-app"
|
||||
import { createLspMcpConfig, type LocalMcpConfig } from "./lsp"
|
||||
import type { OhMyOpenCodeConfig } from "../config/schema"
|
||||
|
||||
export { McpNameSchema, type McpName } from "./types"
|
||||
@@ -13,8 +14,10 @@ type RemoteMcpConfig = {
|
||||
oauth?: false
|
||||
}
|
||||
|
||||
type BuiltinMcpConfig = RemoteMcpConfig | LocalMcpConfig
|
||||
|
||||
export function createBuiltinMcps(disabledMcps: string[] = [], config?: OhMyOpenCodeConfig) {
|
||||
const mcps: Record<string, RemoteMcpConfig> = {}
|
||||
const mcps: Record<string, BuiltinMcpConfig> = {}
|
||||
|
||||
if (!disabledMcps.includes("websearch")) {
|
||||
const websearchConfig = createWebsearchConfig(config?.websearch)
|
||||
@@ -31,5 +34,12 @@ export function createBuiltinMcps(disabledMcps: string[] = [], config?: OhMyOpen
|
||||
mcps.grep_app = grep_app
|
||||
}
|
||||
|
||||
if (!disabledMcps.includes("lsp")) {
|
||||
const lspConfig = createLspMcpConfig()
|
||||
if (lspConfig) {
|
||||
mcps.lsp = lspConfig
|
||||
}
|
||||
}
|
||||
|
||||
return mcps
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user