refactor(server): inject config options

This commit is contained in:
Dax Raad 2026-07-20 21:05:13 -04:00
commit 9445b4d940
17 changed files with 133 additions and 53 deletions

View file

@ -30,7 +30,8 @@ export default Runtime.handler(
? { type: "remote" as const, url, ...(headers ? { headers } : {}) }
: { type: "local" as const, command, ...(environment ? { environment } : {}) }
const configPath = yield* Effect.promise(() => resolveConfigPath(input.global ? Global.Path.config : process.cwd()))
const global = yield* Global.Service
const configPath = yield* Effect.promise(() => resolveConfigPath(input.global ? global.config : process.cwd()))
yield* Effect.promise(() => write(configPath, input.name, server))
process.stdout.write(`MCP server "${input.name}" added to ${configPath}` + EOL)
}),