Skip to content
This repository was archived by the owner on May 21, 2026. It is now read-only.

Commit 2c84a19

Browse files
committed
add get config method
1 parent 59b74e0 commit 2c84a19

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/client.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@ export class MCPClient {
4444
return Object.keys(this.config.mcpServers ?? {})
4545
}
4646

47+
public getServerConfig(name: string): Record<string, any> {
48+
return this.config.mcpServers?.[name]
49+
}
50+
51+
public getConfig(): Record<string, any> {
52+
return this.config ?? {}
53+
}
54+
4755
public saveConfig(filepath: string): void {
4856
const dir = path.dirname(filepath)
4957
if (!fs.existsSync(dir)) {

0 commit comments

Comments
 (0)