@wuyax/mcps 0.1.0-beta.2 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +244 -20
- package/dist/chunk-AWD3VQ3S.js +1624 -0
- package/dist/chunk-O3BRJFEC.js +1898 -0
- package/dist/cli.cjs +1553 -852
- package/dist/cli.js +186 -16
- package/dist/index.cjs +678 -1755
- package/dist/index.d.cts +162 -299
- package/dist/index.d.ts +162 -299
- package/dist/index.js +29 -74
- package/dist/{chunk-7V5XL4RI.js → interactive.cjs} +1649 -1172
- package/dist/interactive.d.cts +228 -0
- package/dist/interactive.d.ts +228 -0
- package/dist/interactive.js +53 -0
- package/dist/types-lEP3zGvf.d.cts +128 -0
- package/dist/types-lEP3zGvf.d.ts +128 -0
- package/package.json +33 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,104 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { M as McpAgentType, d as McpAgentConfig, e as McpTransportType, b as McpServerConfig, c as McpRemoteTransport, P as ParsedMcpSource, f as McpConfigFormat, a as McpScopeOptions, C as ConfigCluster, g as McpInstallResultForAgent, R as RemoveMcpServerResult, I as InstallMcpServerOptions, h as InstallMcpServerResult, U as UpdateMcpServerOptions, i as UpdateMcpServerResult, j as RemoveMcpServerOptions, L as ListedMcpServer, G as GroupedInstalledServer, S as ServerConfigDialect } from './types-lEP3zGvf.js';
|
|
2
|
+
export { k as McpSourceType, l as ServerConfigDialectName, m as ServerConfigDialectOptions } from './types-lEP3zGvf.js';
|
|
2
3
|
|
|
3
|
-
type McpAgentType = "amp" | "antigravity" | "antigravity-cli" | "augment" | "cline" | "cline-cli" | "claude-code" | "claude-desktop" | "codex" | "cursor" | "gemini-cli" | "grok" | "goose" | "github-copilot-cli" | "kimi-code-cli" | "kiro" | "opencode" | "pi" | "qoder" | "qwen-code" | "trae" | "vscode" | "zed";
|
|
4
|
-
type McpConfigFormat = "json" | "jsonc" | "yaml" | "toml";
|
|
5
|
-
type McpTransportType = "http" | "sse" | "stdio";
|
|
6
|
-
type McpRemoteTransport = "http" | "sse";
|
|
7
|
-
type McpSourceType = "remote" | "package" | "command";
|
|
8
|
-
interface ParsedMcpSource {
|
|
9
|
-
type: McpSourceType;
|
|
10
|
-
value: string;
|
|
11
|
-
inferredName: string;
|
|
12
|
-
}
|
|
13
|
-
interface McpServerConfig {
|
|
14
|
-
type?: McpRemoteTransport;
|
|
15
|
-
url?: string;
|
|
16
|
-
headers?: Record<string, string>;
|
|
17
|
-
command?: string;
|
|
18
|
-
args?: string[];
|
|
19
|
-
env?: Record<string, string>;
|
|
20
|
-
}
|
|
21
|
-
type ServerConfigDialectName = "vscode" | "augment" | "amp" | "trae" | "grok" | "cline" | "goose" | "kimi-code" | "kiro" | "opencode" | "pi" | "qwen-code" | "zed";
|
|
22
|
-
interface ServerConfigDialectOptions {
|
|
23
|
-
stdioTransport?: "none" | "type-stdio" | "transport-stdio" | "type-local";
|
|
24
|
-
remoteTransport?: "type-http-sse" | "sse-only-type" | "sse-only-transport" | "none" | "streamable-http" | "streamableHttp" | "streamable_http" | "remote-type" | "qwen";
|
|
25
|
-
commandArray?: boolean;
|
|
26
|
-
commandField?: string;
|
|
27
|
-
argsField?: string;
|
|
28
|
-
envField?: string;
|
|
29
|
-
urlField?: string;
|
|
30
|
-
defaultEnvEmpty?: boolean;
|
|
31
|
-
defaultHeadersEmpty?: boolean;
|
|
32
|
-
extraFields?: Record<string, unknown>;
|
|
33
|
-
includeServerName?: boolean;
|
|
34
|
-
timeoutSeconds?: number;
|
|
35
|
-
}
|
|
36
|
-
type ServerConfigDialect = ServerConfigDialectName | ServerConfigDialectOptions;
|
|
37
|
-
interface McpAgentConfig {
|
|
38
|
-
name: McpAgentType;
|
|
39
|
-
displayName: string;
|
|
40
|
-
globalConfigPath: string;
|
|
41
|
-
projectConfigPath?: string;
|
|
42
|
-
configKey: string;
|
|
43
|
-
projectConfigKey?: string;
|
|
44
|
-
format: McpConfigFormat;
|
|
45
|
-
supportedTransports: readonly McpTransportType[];
|
|
46
|
-
unsupportedTransportMessage?: string;
|
|
47
|
-
detectGlobalInstall: () => boolean;
|
|
48
|
-
detectProjectInstall?: (cwd: string) => boolean;
|
|
49
|
-
resolveConfigPath?: (options: {
|
|
50
|
-
global: boolean;
|
|
51
|
-
cwd: string;
|
|
52
|
-
}) => string;
|
|
53
|
-
transformDialect?: ServerConfigDialect;
|
|
54
|
-
transformConfig?: (serverName: string, config: McpServerConfig, context: {
|
|
55
|
-
global: boolean;
|
|
56
|
-
}) => unknown;
|
|
57
|
-
}
|
|
58
|
-
interface McpScopeOptions {
|
|
59
|
-
global?: boolean;
|
|
60
|
-
cwd?: string;
|
|
61
|
-
}
|
|
62
|
-
interface InstallMcpServerOptions extends McpScopeOptions {
|
|
63
|
-
source: string;
|
|
64
|
-
name?: string;
|
|
65
|
-
agents?: McpAgentType[];
|
|
66
|
-
args?: string[];
|
|
67
|
-
transport?: McpRemoteTransport;
|
|
68
|
-
headers?: Record<string, string>;
|
|
69
|
-
env?: Record<string, string>;
|
|
70
|
-
}
|
|
71
|
-
interface McpInstallResultForAgent {
|
|
72
|
-
agent: McpAgentType;
|
|
73
|
-
success: boolean;
|
|
74
|
-
path: string;
|
|
75
|
-
error?: string;
|
|
76
|
-
}
|
|
77
|
-
interface InstallMcpServerResult {
|
|
78
|
-
serverName: string;
|
|
79
|
-
config: McpServerConfig;
|
|
80
|
-
results: McpInstallResultForAgent[];
|
|
81
|
-
}
|
|
82
|
-
interface ListedMcpServer {
|
|
83
|
-
serverName: string;
|
|
84
|
-
agent: McpAgentType;
|
|
85
|
-
path: string;
|
|
86
|
-
config: unknown;
|
|
87
|
-
serverConfig?: McpServerConfig;
|
|
88
|
-
}
|
|
89
|
-
interface RemoveMcpServerOptions extends McpScopeOptions {
|
|
90
|
-
name: string;
|
|
91
|
-
agents?: McpAgentType[];
|
|
92
|
-
}
|
|
93
|
-
interface RemoveMcpServerResult {
|
|
94
|
-
agent: McpAgentType;
|
|
95
|
-
path: string;
|
|
96
|
-
removed: boolean;
|
|
97
|
-
error?: string;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
declare const mcpAgents: Record<McpAgentType, McpAgentConfig>;
|
|
101
|
-
declare const mcpAgentAliases: Record<string, McpAgentType>;
|
|
102
4
|
declare const getMcpAgentConfig: (agentType: McpAgentType) => McpAgentConfig;
|
|
103
5
|
declare const getMcpAgentTypes: () => McpAgentType[];
|
|
104
6
|
declare const isMcpAgentType: (value: string) => value is McpAgentType;
|
|
@@ -108,14 +10,7 @@ declare const detectProjectInstalledMcpAgents: (cwd: string) => McpAgentType[];
|
|
|
108
10
|
declare const detectGloballyInstalledMcpAgents: () => McpAgentType[];
|
|
109
11
|
declare const getMcpAgentsSupportingProjectScope: () => McpAgentType[];
|
|
110
12
|
|
|
111
|
-
|
|
112
|
-
transport?: McpRemoteTransport;
|
|
113
|
-
headers?: Record<string, string>;
|
|
114
|
-
env?: Record<string, string>;
|
|
115
|
-
args?: string[];
|
|
116
|
-
}
|
|
117
|
-
declare const buildMcpServerConfig: (parsed: ParsedMcpSource, options?: BuildMcpServerConfigOptions) => McpServerConfig;
|
|
118
|
-
|
|
13
|
+
type UpdateTransitionType = "switch-to-remote" | "switch-to-stdio" | "merge-remote" | "merge-stdio";
|
|
119
14
|
interface McpRemoteServerConfig {
|
|
120
15
|
type: McpRemoteTransport;
|
|
121
16
|
url: string;
|
|
@@ -134,31 +29,81 @@ declare const isRemoteServerConfig: (config: McpServerConfig) => config is McpRe
|
|
|
134
29
|
* Type guard for local (stdio command/script) server configuration.
|
|
135
30
|
*/
|
|
136
31
|
declare const isStdioServerConfig: (config: McpServerConfig) => config is McpStdioServerConfig;
|
|
32
|
+
interface BuildMcpServerConfigOptions {
|
|
33
|
+
transport?: McpRemoteTransport;
|
|
34
|
+
headers?: Record<string, string>;
|
|
35
|
+
env?: Record<string, string>;
|
|
36
|
+
args?: string[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Deep module builder: Constructs a typed standard McpServerConfig from parsed MCP source.
|
|
40
|
+
*/
|
|
41
|
+
declare const buildMcpServerConfig: (parsed: ParsedMcpSource, options?: BuildMcpServerConfigOptions) => McpServerConfig;
|
|
137
42
|
/**
|
|
138
43
|
* Parses and normalizes any unknown raw configuration object from agent config files
|
|
139
44
|
* into a typed standard McpServerConfig domain model.
|
|
140
45
|
*/
|
|
141
46
|
declare const parseServerConfig: (raw: unknown) => McpServerConfig;
|
|
47
|
+
/**
|
|
48
|
+
* Transforms a server configuration into a clean remote configuration,
|
|
49
|
+
* stripping stdio-exclusive fields (command, args, env).
|
|
50
|
+
*/
|
|
51
|
+
declare const toRemoteServerConfig: (config: McpServerConfig, defaultTransport?: McpRemoteTransport) => McpServerConfig;
|
|
52
|
+
/**
|
|
53
|
+
* Transforms a server configuration into a clean stdio configuration,
|
|
54
|
+
* stripping remote-exclusive fields (url, type, headers).
|
|
55
|
+
*/
|
|
56
|
+
declare const toStdioServerConfig: (config: McpServerConfig) => McpServerConfig;
|
|
57
|
+
/**
|
|
58
|
+
* Determines the transition category when updating an MCP server configuration.
|
|
59
|
+
*/
|
|
60
|
+
declare const detectUpdateTransition: (incoming: McpServerConfig, previous?: McpServerConfig) => UpdateTransitionType;
|
|
61
|
+
/**
|
|
62
|
+
* Strips obsolete fields when switching between stdio and remote protocols.
|
|
63
|
+
* When switching to remote (url is provided), stdio fields (command, args, env) are removed.
|
|
64
|
+
* When switching to stdio (command is provided), remote fields (url, type, headers) are removed.
|
|
65
|
+
*/
|
|
66
|
+
declare const sanitizeUpdatedServerConfig: (incoming: McpServerConfig, previous?: McpServerConfig) => McpServerConfig;
|
|
67
|
+
interface ServerConfigDeltaOptions {
|
|
68
|
+
command?: string;
|
|
69
|
+
args?: string[];
|
|
70
|
+
clearArgs?: boolean;
|
|
71
|
+
env?: Record<string, string>;
|
|
72
|
+
clearEnv?: boolean;
|
|
73
|
+
url?: string;
|
|
74
|
+
transport?: McpRemoteTransport;
|
|
75
|
+
headers?: Record<string, string>;
|
|
76
|
+
clearHeaders?: boolean;
|
|
77
|
+
}
|
|
78
|
+
interface ApplyServerConfigDeltaResult {
|
|
79
|
+
config: McpServerConfig;
|
|
80
|
+
transition: UpdateTransitionType;
|
|
81
|
+
protocol: "remote" | "stdio";
|
|
82
|
+
ignoredFlags: string[];
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Deep domain operation: Applies modification flags to an existing configuration,
|
|
86
|
+
* validates command vs url mutual exclusion, determines the target protocol,
|
|
87
|
+
* identifies ignored incompatible flags, and produces a clean, sanitized configuration.
|
|
88
|
+
*/
|
|
89
|
+
declare const applyServerConfigDelta: (previousConfig: McpServerConfig | undefined, options: ServerConfigDeltaOptions) => ApplyServerConfigDeltaResult;
|
|
142
90
|
|
|
143
91
|
declare const DEFAULT_REMOTE_TRANSPORT: "http";
|
|
144
|
-
declare const NPX_COMMAND = "npx";
|
|
145
|
-
declare const NPX_DASH_Y = "-y";
|
|
146
92
|
|
|
147
|
-
declare const
|
|
148
|
-
declare const
|
|
149
|
-
declare const
|
|
150
|
-
declare const listServersInConfigFile: (filePath: string, format: McpConfigFormat, dottedKey: string) => Record<string, unknown>;
|
|
93
|
+
declare const extractPackageName: (input: string) => string;
|
|
94
|
+
declare const parseMcpSource: (input: string) => ParsedMcpSource;
|
|
95
|
+
declare const isRemoteMcpSource: (parsed: ParsedMcpSource) => boolean;
|
|
151
96
|
|
|
152
97
|
interface McpConfigTarget {
|
|
153
98
|
configPath: string;
|
|
154
99
|
configKey: string;
|
|
155
100
|
}
|
|
156
|
-
|
|
157
|
-
global?: boolean;
|
|
158
|
-
cwd?: string;
|
|
159
|
-
}
|
|
160
|
-
declare const resolveMcpConfigTarget: (agent: McpAgentConfig, options?: ResolveMcpConfigTargetOptions) => McpConfigTarget;
|
|
101
|
+
declare const resolveMcpConfigTarget: (agent: McpAgentConfig, options?: McpScopeOptions) => McpConfigTarget;
|
|
161
102
|
|
|
103
|
+
/**
|
|
104
|
+
* Returns candidate agent types relevant for the given scope.
|
|
105
|
+
*/
|
|
106
|
+
declare const getCandidateAgentsForScope: (options?: McpScopeOptions) => McpAgentType[];
|
|
162
107
|
interface ConfigTargetDescriptor {
|
|
163
108
|
filePath: string;
|
|
164
109
|
format: McpConfigFormat;
|
|
@@ -184,8 +129,8 @@ interface AgentConfigStoreListResult {
|
|
|
184
129
|
servers: Record<string, unknown>;
|
|
185
130
|
}
|
|
186
131
|
/**
|
|
187
|
-
* Deep module: Coordinates Agent config target resolution,
|
|
188
|
-
* and format persistence behind a unified seam.
|
|
132
|
+
* Deep module: Coordinates Agent config target resolution, cluster deduplication,
|
|
133
|
+
* dialect transforms, file checking, and format persistence behind a unified seam.
|
|
189
134
|
*/
|
|
190
135
|
declare class AgentConfigStore {
|
|
191
136
|
private adapter;
|
|
@@ -199,15 +144,70 @@ declare class AgentConfigStore {
|
|
|
199
144
|
writeServer(agent: McpAgentType | McpAgentConfig, serverName: string, serverConfig: unknown, options?: McpScopeOptions): AgentConfigStoreWriteResult;
|
|
200
145
|
removeServer(agent: McpAgentType | McpAgentConfig, serverName: string, options?: McpScopeOptions): AgentConfigStoreRemoveResult;
|
|
201
146
|
listServers(agent: McpAgentType | McpAgentConfig, options?: McpScopeOptions): AgentConfigStoreListResult;
|
|
147
|
+
/**
|
|
148
|
+
* Batch lists servers for multiple agents, caching adapter reads for co-hosted
|
|
149
|
+
* agents that share the exact same physical configuration file and dotted key.
|
|
150
|
+
*/
|
|
151
|
+
listServersForAgents(agents: McpAgentType[], options?: McpScopeOptions): Array<{
|
|
152
|
+
agent: McpAgentType;
|
|
153
|
+
path: string;
|
|
154
|
+
exists: boolean;
|
|
155
|
+
servers: Record<string, unknown>;
|
|
156
|
+
}>;
|
|
202
157
|
read(agent: McpAgentType | McpAgentConfig, options?: McpScopeOptions): Record<string, unknown>;
|
|
203
158
|
readServer(agent: McpAgentType | McpAgentConfig, serverName: string, options?: McpScopeOptions): unknown | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Returns all other agents sharing the exact same physical configuration target
|
|
161
|
+
* (same configPath and configKey) for the given scope.
|
|
162
|
+
*/
|
|
163
|
+
getCoHostedAgents(agentType: McpAgentType, options?: McpScopeOptions): McpAgentType[];
|
|
164
|
+
/**
|
|
165
|
+
* Resolves configuration clusters for a given list of requested agents.
|
|
166
|
+
* Groups requested agents sharing the same physical config path, and tracks
|
|
167
|
+
* any remaining co-hosted agents sharing the same target that were not in the request.
|
|
168
|
+
*/
|
|
169
|
+
resolveConfigClusters(agentTypes: McpAgentType[], options?: McpScopeOptions): ConfigCluster[];
|
|
170
|
+
/**
|
|
171
|
+
* Sorts agent types so that agents sharing the same physical config target
|
|
172
|
+
* appear adjacent to each other in the returned array.
|
|
173
|
+
*/
|
|
174
|
+
sortAgentsByClusters(agentTypes: McpAgentType[], options?: McpScopeOptions): McpAgentType[];
|
|
175
|
+
/**
|
|
176
|
+
* Alias for sortAgentsByClusters for backward compatibility.
|
|
177
|
+
*/
|
|
178
|
+
sortAgentsWithClusters(agentTypes: McpAgentType[], options?: McpScopeOptions): McpAgentType[];
|
|
179
|
+
/**
|
|
180
|
+
* Batch write: transforms and writes a server config to multiple agents,
|
|
181
|
+
* with automatic cluster deduplication, dialect transform, and co-hosted awareness.
|
|
182
|
+
* Callers pass standard McpServerConfig; the Store applies per-Agent dialect transforms
|
|
183
|
+
* internally before persisting.
|
|
184
|
+
*/
|
|
185
|
+
writeServers(agents: McpAgentType[], serverName: string, serverConfig: McpServerConfig, options?: McpScopeOptions): McpInstallResultForAgent[];
|
|
186
|
+
/**
|
|
187
|
+
* Batch remove: removes a server from multiple agents' configs,
|
|
188
|
+
* with automatic cluster deduplication and co-hosted awareness.
|
|
189
|
+
*/
|
|
190
|
+
removeServers(agents: McpAgentType[], serverName: string, options?: McpScopeOptions): RemoveMcpServerResult[];
|
|
204
191
|
}
|
|
205
192
|
/**
|
|
206
193
|
* Singleton AgentConfigStore using standard file system adapter.
|
|
207
194
|
*/
|
|
208
195
|
declare const agentConfigStore: AgentConfigStore;
|
|
209
196
|
|
|
210
|
-
|
|
197
|
+
/**
|
|
198
|
+
* Returns all other agents sharing the exact same physical configuration target
|
|
199
|
+
* (same configPath and configKey) for the given scope.
|
|
200
|
+
*/
|
|
201
|
+
declare const getCoHostedAgents: (agentType: McpAgentType, options?: McpScopeOptions) => McpAgentType[];
|
|
202
|
+
/**
|
|
203
|
+
* Resolves configuration clusters for a given list of requested agents.
|
|
204
|
+
*/
|
|
205
|
+
declare const resolveConfigClusters: (agentTypes: McpAgentType[], options?: McpScopeOptions) => ConfigCluster[];
|
|
206
|
+
/**
|
|
207
|
+
* Sorts agent types so that agents sharing the same physical config target
|
|
208
|
+
* appear adjacent to each other in the returned array.
|
|
209
|
+
*/
|
|
210
|
+
declare const sortAgentsByClusters: (agentTypes: McpAgentType[], options?: McpScopeOptions) => McpAgentType[];
|
|
211
211
|
|
|
212
212
|
interface TargetResolutionQuery extends McpScopeOptions {
|
|
213
213
|
requested?: string[] | McpAgentType[];
|
|
@@ -242,201 +242,53 @@ interface TargetResolutionResult {
|
|
|
242
242
|
*/
|
|
243
243
|
declare const resolveTargetAgents: (query?: TargetResolutionQuery) => TargetResolutionResult;
|
|
244
244
|
|
|
245
|
-
|
|
246
|
-
declare const installMcpServerForAgent: (serverName: string, serverConfig: McpServerConfig, agentType: McpAgentType, options?: InstallMcpServerForAgentOptions) => McpInstallResultForAgent;
|
|
247
|
-
declare const installMcpServerForAgents: (serverName: string, serverConfig: McpServerConfig, agentTypes: McpAgentType[], options?: InstallMcpServerForAgentOptions) => McpInstallResultForAgent[];
|
|
248
|
-
|
|
249
|
-
interface ListInstalledMcpServersOptions extends McpScopeOptions {
|
|
250
|
-
agents?: McpAgentType[];
|
|
251
|
-
}
|
|
252
|
-
declare const listInstalledMcpServers: (options?: ListInstalledMcpServersOptions) => ListedMcpServer[];
|
|
253
|
-
|
|
254
|
-
declare const extractPackageName: (input: string) => string;
|
|
255
|
-
declare const parseMcpSource: (input: string) => ParsedMcpSource;
|
|
256
|
-
declare const isRemoteMcpSource: (parsed: ParsedMcpSource) => boolean;
|
|
257
|
-
|
|
258
|
-
declare const removeMcpServerFromAgent: (serverName: string, agentType: McpAgentType, options?: {
|
|
259
|
-
global?: boolean;
|
|
260
|
-
cwd?: string;
|
|
261
|
-
}) => RemoveMcpServerResult;
|
|
262
|
-
declare const removeMcpServer: (options: RemoveMcpServerOptions) => RemoveMcpServerResult[];
|
|
263
|
-
|
|
264
|
-
declare const mainMenu: () => Promise<void>;
|
|
265
|
-
|
|
266
|
-
interface WizardAddOptions extends McpScopeOptions {
|
|
267
|
-
source?: string;
|
|
268
|
-
name?: string;
|
|
269
|
-
agents?: McpAgentType[];
|
|
270
|
-
args?: string[];
|
|
271
|
-
transport?: McpRemoteTransport;
|
|
272
|
-
headers?: Record<string, string>;
|
|
273
|
-
env?: Record<string, string>;
|
|
274
|
-
}
|
|
275
|
-
declare const wizardAdd: (initial?: WizardAddOptions) => Promise<boolean>;
|
|
276
|
-
|
|
277
|
-
interface WizardManageOptions extends McpScopeOptions {
|
|
278
|
-
serverName?: string;
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Reusable display function for server details with secret masking.
|
|
282
|
-
*/
|
|
283
|
-
declare const displayServerDetails: ({ serverName, config, agents, isGlobal, titlePrefix, }: {
|
|
284
|
-
serverName: string;
|
|
285
|
-
config: McpServerConfig;
|
|
286
|
-
agents?: McpAgentType[];
|
|
287
|
-
isGlobal?: boolean;
|
|
288
|
-
titlePrefix?: string;
|
|
289
|
-
}) => void;
|
|
290
|
-
declare const wizardManage: (options?: WizardManageOptions) => Promise<void>;
|
|
291
|
-
|
|
292
|
-
interface WizardRemoveOptions extends McpScopeOptions {
|
|
293
|
-
name?: string;
|
|
294
|
-
agents?: McpAgentType[];
|
|
295
|
-
}
|
|
296
|
-
declare const wizardRemove: (options?: WizardRemoveOptions) => Promise<boolean>;
|
|
245
|
+
declare const installMcpServer: (options: InstallMcpServerOptions) => InstallMcpServerResult;
|
|
297
246
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
parseText: (text: string) => Record<string, string>;
|
|
306
|
-
editorPostfix?: string;
|
|
307
|
-
editorMessage: string;
|
|
308
|
-
pasteMessage: string;
|
|
309
|
-
keyPromptMessage: string;
|
|
310
|
-
valuePromptMessage: string;
|
|
311
|
-
separator: "=" | ":";
|
|
247
|
+
type InstallMcpServerForAgentOptions = McpScopeOptions;
|
|
248
|
+
interface InstallToCompatibleAgentsOptions extends McpScopeOptions {
|
|
249
|
+
allAgents: McpAgentType[];
|
|
250
|
+
incompatible?: Array<{
|
|
251
|
+
agent: McpAgentType;
|
|
252
|
+
reason: string;
|
|
253
|
+
}>;
|
|
312
254
|
}
|
|
313
255
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
* - Single item upsert (with secret detection & password masking)
|
|
317
|
-
* - Single item deletion
|
|
318
|
-
* - Multiline paste (with merge or replace choices)
|
|
319
|
-
* - Clear all items
|
|
320
|
-
*/
|
|
321
|
-
declare const promptEditKeyValueConfig: (currentItems: Record<string, string> | undefined, options: PromptEditKeyValueOptions) => Promise<Record<string, string>>;
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
* Masks sensitive values for secure CLI display.
|
|
325
|
-
*/
|
|
326
|
-
declare const maskSecretValue: (key: string, value: string) => string;
|
|
327
|
-
/**
|
|
328
|
-
* Formats a key-value env record into .env formatted multiline string.
|
|
329
|
-
*/
|
|
330
|
-
declare const formatEnvText: (env: Record<string, string>) => string;
|
|
331
|
-
/**
|
|
332
|
-
* Parses multiline .env formatted text into a key-value record.
|
|
333
|
-
* Supports:
|
|
334
|
-
* - Empty lines and comments (#)
|
|
335
|
-
* - `export KEY=VALUE` or `KEY=VALUE`
|
|
336
|
-
* - Values with `=` inside
|
|
337
|
-
* - Single/double quoted values
|
|
338
|
-
*/
|
|
339
|
-
declare const parseEnvText: (rawText: string) => Record<string, string>;
|
|
340
|
-
/**
|
|
341
|
-
* Prompts user for environment variables.
|
|
342
|
-
* Offers choices:
|
|
343
|
-
* 1. Skip / No env vars
|
|
344
|
-
* 2. Paste multiline .env text
|
|
345
|
-
* 3. Add key-value one by one (with secret mask detection)
|
|
346
|
-
*/
|
|
347
|
-
declare const promptEnvConfig: (initialEnv?: Record<string, string>) => Promise<Record<string, string>>;
|
|
348
|
-
/**
|
|
349
|
-
* Dedicated prompt loop for inspecting, modifying, adding, and removing
|
|
350
|
-
* environment variables of an existing MCP server configuration.
|
|
351
|
-
*/
|
|
352
|
-
declare const promptEditEnvConfig: (currentEnv?: Record<string, string>) => Promise<Record<string, string>>;
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* Masks sensitive HTTP header values for secure CLI display.
|
|
356
|
-
*/
|
|
357
|
-
declare const maskSecretHeader: (key: string, value: string) => string;
|
|
358
|
-
/**
|
|
359
|
-
* Formats a key-value headers record into multiline Key: Value text.
|
|
256
|
+
* Backward-compatible wrapper: installs a server config for a single agent
|
|
257
|
+
* via the deepened AgentConfigStore.
|
|
360
258
|
*/
|
|
361
|
-
declare const
|
|
362
|
-
/**
|
|
363
|
-
* Parses multiline HTTP headers text (Key: Value or Key=Value) into a Record<string, string>.
|
|
364
|
-
*/
|
|
365
|
-
declare const parseHeadersText: (rawText: string) => Record<string, string>;
|
|
259
|
+
declare const installMcpServerForAgent: (serverName: string, serverConfig: McpServerConfig, agentType: McpAgentType, options?: InstallMcpServerForAgentOptions) => McpInstallResultForAgent;
|
|
366
260
|
/**
|
|
367
|
-
*
|
|
261
|
+
* Backward-compatible wrapper: installs a server config to multiple agents
|
|
262
|
+
* via the deepened AgentConfigStore.
|
|
368
263
|
*/
|
|
369
|
-
declare const
|
|
264
|
+
declare const installMcpServerForAgents: (serverName: string, serverConfig: McpServerConfig, agentTypes: McpAgentType[], options?: InstallMcpServerForAgentOptions) => McpInstallResultForAgent[];
|
|
370
265
|
/**
|
|
371
|
-
*
|
|
372
|
-
*
|
|
266
|
+
* Backward-compatible wrapper: filters out incompatible agents and installs
|
|
267
|
+
* to the remaining compatible ones via the deepened AgentConfigStore.
|
|
373
268
|
*/
|
|
374
|
-
declare const
|
|
269
|
+
declare const installToCompatibleAgents: (serverName: string, serverConfig: McpServerConfig, options: InstallToCompatibleAgentsOptions) => McpInstallResultForAgent[];
|
|
375
270
|
|
|
376
271
|
/**
|
|
377
|
-
*
|
|
378
|
-
*
|
|
379
|
-
*/
|
|
380
|
-
declare const parseArgsString: (rawText: string) => string[];
|
|
381
|
-
/**
|
|
382
|
-
* Prompts the user for additional command-line arguments.
|
|
383
|
-
*/
|
|
384
|
-
declare const promptArgsConfig: (initialArgs?: string[]) => Promise<string[]>;
|
|
385
|
-
/**
|
|
386
|
-
* Formats an array of argument strings into a space-separated CLI string,
|
|
387
|
-
* quoting arguments containing spaces or quotes.
|
|
272
|
+
* Core Orchestration: Updates an existing MCP server across specified or installed coding agents,
|
|
273
|
+
* sanitizing protocol dirty fields and validating transport capabilities.
|
|
388
274
|
*/
|
|
389
|
-
declare const
|
|
390
|
-
/**
|
|
391
|
-
* Dedicated prompt for editing command arguments with current arguments pre-filled.
|
|
392
|
-
*/
|
|
393
|
-
declare const promptEditArgs: (currentArgs?: string[]) => Promise<string[]>;
|
|
275
|
+
declare const updateMcpServer: (options: UpdateMcpServerOptions) => UpdateMcpServerResult;
|
|
394
276
|
|
|
395
|
-
|
|
396
|
-
defaultGlobal?: boolean;
|
|
397
|
-
defaultAgents?: McpAgentType[];
|
|
398
|
-
}
|
|
399
|
-
interface ScopeAndAgentsResult {
|
|
400
|
-
global: boolean;
|
|
401
|
-
agents: McpAgentType[];
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* Interactively prompts for scope (Project vs Global) and target agents.
|
|
405
|
-
* Auto-detects installed agents and pre-selects them.
|
|
406
|
-
*/
|
|
407
|
-
declare const promptScopeAndAgents: (options?: PromptScopeAndAgentsOptions) => Promise<ScopeAndAgentsResult>;
|
|
277
|
+
declare const removeMcpServer: (options: RemoveMcpServerOptions) => RemoveMcpServerResult[];
|
|
408
278
|
|
|
409
|
-
interface
|
|
410
|
-
|
|
411
|
-
message?: string;
|
|
279
|
+
interface ListInstalledMcpServersOptions extends McpScopeOptions {
|
|
280
|
+
agents?: McpAgentType[];
|
|
412
281
|
}
|
|
413
282
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
283
|
+
* Deep module query: Lists installed MCP servers across agents.
|
|
284
|
+
* Adapter read caching is encapsulated by AgentConfigStore.
|
|
416
285
|
*/
|
|
417
|
-
declare const
|
|
418
|
-
|
|
419
|
-
declare const mcpManageCommand: Command;
|
|
420
|
-
|
|
421
|
-
interface GroupedInstalledServer {
|
|
422
|
-
serverName: string;
|
|
423
|
-
agents: McpAgentType[];
|
|
424
|
-
paths: string[];
|
|
425
|
-
config: McpServerConfig;
|
|
426
|
-
}
|
|
427
|
-
declare const normalizeServerConfig: (raw: unknown) => McpServerConfig;
|
|
286
|
+
declare const listInstalledMcpServers: (options?: ListInstalledMcpServersOptions) => ListedMcpServer[];
|
|
428
287
|
/**
|
|
429
|
-
*
|
|
288
|
+
* High-level query combining server listing and grouping in a single call.
|
|
430
289
|
*/
|
|
431
|
-
declare const
|
|
290
|
+
declare const queryGroupedInstalledServers: (options?: ListInstalledMcpServersOptions) => Map<string, GroupedInstalledServer>;
|
|
432
291
|
|
|
433
|
-
/**
|
|
434
|
-
* Deep module: Transforms standard McpServerConfig into an Agent-specific configuration shape
|
|
435
|
-
* driven by declarative dialects.
|
|
436
|
-
*/
|
|
437
|
-
declare const transformServerConfig: (serverName: string, config: McpServerConfig, dialect: ServerConfigDialect, _context?: {
|
|
438
|
-
global?: boolean;
|
|
439
|
-
}) => unknown;
|
|
440
292
|
/**
|
|
441
293
|
* Factory creating an agent-bound transform function from a declarative dialect.
|
|
442
294
|
*/
|
|
@@ -451,4 +303,15 @@ declare const transformServerConfigForAgent: (agent: McpAgentConfig, serverName:
|
|
|
451
303
|
global: boolean;
|
|
452
304
|
}) => unknown;
|
|
453
305
|
|
|
454
|
-
|
|
306
|
+
declare const SECRET_KEY_PATTERN: RegExp;
|
|
307
|
+
/**
|
|
308
|
+
* Masks sensitive values for secure CLI display.
|
|
309
|
+
*/
|
|
310
|
+
declare const maskSecretValue: (key: string, value: string) => string;
|
|
311
|
+
declare const SECRET_HEADER_PATTERN: RegExp;
|
|
312
|
+
/**
|
|
313
|
+
* Masks sensitive HTTP header values for secure CLI display.
|
|
314
|
+
*/
|
|
315
|
+
declare const maskSecretHeader: (key: string, value: string) => string;
|
|
316
|
+
|
|
317
|
+
export { AgentConfigStore, type AgentConfigStoreListResult, type AgentConfigStoreRemoveResult, type AgentConfigStoreWriteResult, type ApplyServerConfigDeltaResult, type BuildMcpServerConfigOptions, ConfigCluster, type ConfigStoreAdapter, type ConfigTargetDescriptor, DEFAULT_REMOTE_TRANSPORT, GroupedInstalledServer, type IncompatibleAgent, InstallMcpServerOptions, InstallMcpServerResult, type InstallToCompatibleAgentsOptions, ListedMcpServer, McpAgentConfig, McpAgentType, McpConfigFormat, type McpConfigTarget, McpInstallResultForAgent, type McpRemoteServerConfig, McpRemoteTransport, McpScopeOptions, McpServerConfig, type McpStdioServerConfig, McpTransportType, ParsedMcpSource, RemoveMcpServerOptions, RemoveMcpServerResult, SECRET_HEADER_PATTERN, SECRET_KEY_PATTERN, type ServerConfigDeltaOptions, ServerConfigDialect, type TargetResolutionQuery, type TargetResolutionResult, UpdateMcpServerOptions, UpdateMcpServerResult, type UpdateTransitionType, agentConfigStore, applyServerConfigDelta, buildMcpServerConfig, createAgentTransform, detectGloballyInstalledMcpAgents, detectProjectInstalledMcpAgents, detectUpdateTransition, extractPackageName, getCandidateAgentsForScope, getCoHostedAgents, getMcpAgentConfig, getMcpAgentTypes, getMcpAgentsSupportingProjectScope, installMcpServer, installMcpServerForAgent, installMcpServerForAgents, installToCompatibleAgents, isMcpAgentType, isMcpTransportSupported, isRemoteMcpSource, isRemoteServerConfig, isStdioServerConfig, listInstalledMcpServers, maskSecretHeader, maskSecretValue, parseMcpSource, parseServerConfig, queryGroupedInstalledServers, removeMcpServer, resolveConfigClusters, resolveMcpAgentAlias, resolveMcpConfigTarget, resolveTargetAgents, sanitizeUpdatedServerConfig, sortAgentsByClusters, toRemoteServerConfig, toStdioServerConfig, transformServerConfigForAgent, updateMcpServer };
|