@uniswap/ai-toolkit-claude-mcp-helper 1.0.16 → 1.0.17-next.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/dist/claude-mcp-helper.cjs +235 -63
- package/dist/packages/claude-mcp-helper/src/commands/interactive.d.ts.map +1 -1
- package/dist/packages/claude-mcp-helper/src/config/reader.d.ts +28 -2
- package/dist/packages/claude-mcp-helper/src/config/reader.d.ts.map +1 -1
- package/dist/packages/claude-mcp-helper/src/config/types.d.ts +34 -0
- package/dist/packages/claude-mcp-helper/src/config/types.d.ts.map +1 -1
- package/dist/packages/claude-mcp-helper/src/utils/display.d.ts +1 -0
- package/dist/packages/claude-mcp-helper/src/utils/display.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -4589,6 +4589,9 @@ function getLocalConfigPath() {
|
|
|
4589
4589
|
function getMcpJsonConfigPath() {
|
|
4590
4590
|
return (0, import_path.join)(process.cwd(), ".mcp.json");
|
|
4591
4591
|
}
|
|
4592
|
+
function getInstalledPluginsPath() {
|
|
4593
|
+
return (0, import_path.join)((0, import_os.homedir)(), ".claude", "plugins", "installed_plugins.json");
|
|
4594
|
+
}
|
|
4592
4595
|
function readGlobalConfig() {
|
|
4593
4596
|
const configPath = getGlobalConfigPath();
|
|
4594
4597
|
if (!(0, import_fs.existsSync)(configPath)) {
|
|
@@ -4628,6 +4631,92 @@ function readMcpJsonConfig() {
|
|
|
4628
4631
|
return {};
|
|
4629
4632
|
}
|
|
4630
4633
|
}
|
|
4634
|
+
function readInstalledPlugins() {
|
|
4635
|
+
const configPath = getInstalledPluginsPath();
|
|
4636
|
+
if (!(0, import_fs.existsSync)(configPath)) {
|
|
4637
|
+
return { version: 2, plugins: {} };
|
|
4638
|
+
}
|
|
4639
|
+
try {
|
|
4640
|
+
const content = (0, import_fs.readFileSync)(configPath, "utf-8");
|
|
4641
|
+
return JSON.parse(content);
|
|
4642
|
+
} catch (error) {
|
|
4643
|
+
console.error(`Failed to read installed plugins: ${error}`);
|
|
4644
|
+
return { version: 2, plugins: {} };
|
|
4645
|
+
}
|
|
4646
|
+
}
|
|
4647
|
+
function readPluginMcpConfig(installPath) {
|
|
4648
|
+
const mcpJsonPath = (0, import_path.join)(installPath, ".mcp.json");
|
|
4649
|
+
if (!(0, import_fs.existsSync)(mcpJsonPath)) {
|
|
4650
|
+
return {};
|
|
4651
|
+
}
|
|
4652
|
+
try {
|
|
4653
|
+
const content = (0, import_fs.readFileSync)(mcpJsonPath, "utf-8");
|
|
4654
|
+
return JSON.parse(content);
|
|
4655
|
+
} catch {
|
|
4656
|
+
return {};
|
|
4657
|
+
}
|
|
4658
|
+
}
|
|
4659
|
+
function extractPluginName(pluginKey) {
|
|
4660
|
+
const atIndex = pluginKey.indexOf("@");
|
|
4661
|
+
return atIndex > 0 ? pluginKey.substring(0, atIndex) : pluginKey;
|
|
4662
|
+
}
|
|
4663
|
+
function getPluginMcpServers() {
|
|
4664
|
+
const serverToPlugin = /* @__PURE__ */ new Map();
|
|
4665
|
+
const installedPlugins = readInstalledPlugins();
|
|
4666
|
+
for (const [pluginKey, installations] of Object.entries(installedPlugins.plugins)) {
|
|
4667
|
+
const installation = installations[0];
|
|
4668
|
+
if (!installation?.installPath) continue;
|
|
4669
|
+
const pluginName = extractPluginName(pluginKey);
|
|
4670
|
+
const mcpConfig = readPluginMcpConfig(installation.installPath);
|
|
4671
|
+
if (mcpConfig.mcpServers) {
|
|
4672
|
+
for (const serverName of Object.keys(mcpConfig.mcpServers)) {
|
|
4673
|
+
if (!serverToPlugin.has(serverName)) {
|
|
4674
|
+
serverToPlugin.set(serverName, pluginName);
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
return serverToPlugin;
|
|
4680
|
+
}
|
|
4681
|
+
function getServersWithOrigins() {
|
|
4682
|
+
const servers = [];
|
|
4683
|
+
const seenServers = /* @__PURE__ */ new Set();
|
|
4684
|
+
const cwd = process.cwd();
|
|
4685
|
+
const globalConfig = readGlobalConfig();
|
|
4686
|
+
if (globalConfig.mcpServers) {
|
|
4687
|
+
for (const name of Object.keys(globalConfig.mcpServers)) {
|
|
4688
|
+
if (!seenServers.has(name)) {
|
|
4689
|
+
seenServers.add(name);
|
|
4690
|
+
servers.push({ name, origin: { type: "global" } });
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
}
|
|
4694
|
+
if (globalConfig.projects?.[cwd]?.mcpServers) {
|
|
4695
|
+
for (const name of Object.keys(globalConfig.projects[cwd].mcpServers)) {
|
|
4696
|
+
if (!seenServers.has(name)) {
|
|
4697
|
+
seenServers.add(name);
|
|
4698
|
+
servers.push({ name, origin: { type: "project" } });
|
|
4699
|
+
}
|
|
4700
|
+
}
|
|
4701
|
+
}
|
|
4702
|
+
const mcpConfig = readMcpJsonConfig();
|
|
4703
|
+
if (mcpConfig.mcpServers) {
|
|
4704
|
+
for (const name of Object.keys(mcpConfig.mcpServers)) {
|
|
4705
|
+
if (!seenServers.has(name)) {
|
|
4706
|
+
seenServers.add(name);
|
|
4707
|
+
servers.push({ name, origin: { type: "local" } });
|
|
4708
|
+
}
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
const pluginServers = getPluginMcpServers();
|
|
4712
|
+
for (const [serverName, pluginName] of pluginServers) {
|
|
4713
|
+
if (!seenServers.has(serverName)) {
|
|
4714
|
+
seenServers.add(serverName);
|
|
4715
|
+
servers.push({ name: serverName, origin: { type: "plugin", pluginName } });
|
|
4716
|
+
}
|
|
4717
|
+
}
|
|
4718
|
+
return servers.sort((a, b) => a.name.localeCompare(b.name));
|
|
4719
|
+
}
|
|
4631
4720
|
function getAvailableServers() {
|
|
4632
4721
|
const servers = /* @__PURE__ */ new Set();
|
|
4633
4722
|
const cwd = process.cwd();
|
|
@@ -4636,14 +4725,16 @@ function getAvailableServers() {
|
|
|
4636
4725
|
Object.keys(globalConfig.mcpServers).forEach((name) => servers.add(name));
|
|
4637
4726
|
}
|
|
4638
4727
|
if (globalConfig.projects?.[cwd]?.mcpServers) {
|
|
4639
|
-
Object.keys(globalConfig.projects[cwd].mcpServers).forEach(
|
|
4640
|
-
(name) => servers.add(name)
|
|
4641
|
-
);
|
|
4728
|
+
Object.keys(globalConfig.projects[cwd].mcpServers).forEach((name) => servers.add(name));
|
|
4642
4729
|
}
|
|
4643
4730
|
const mcpConfig = readMcpJsonConfig();
|
|
4644
4731
|
if (mcpConfig.mcpServers) {
|
|
4645
4732
|
Object.keys(mcpConfig.mcpServers).forEach((name) => servers.add(name));
|
|
4646
4733
|
}
|
|
4734
|
+
const pluginServers = getPluginMcpServers();
|
|
4735
|
+
for (const serverName of pluginServers.keys()) {
|
|
4736
|
+
servers.add(serverName);
|
|
4737
|
+
}
|
|
4647
4738
|
return Array.from(servers).sort();
|
|
4648
4739
|
}
|
|
4649
4740
|
function isServerDeniedLocally(serverName) {
|
|
@@ -4651,9 +4742,7 @@ function isServerDeniedLocally(serverName) {
|
|
|
4651
4742
|
if (!localConfig.deniedMcpServers) {
|
|
4652
4743
|
return false;
|
|
4653
4744
|
}
|
|
4654
|
-
return localConfig.deniedMcpServers.some(
|
|
4655
|
-
(denied) => denied.serverName === serverName
|
|
4656
|
-
);
|
|
4745
|
+
return localConfig.deniedMcpServers.some((denied) => denied.serverName === serverName);
|
|
4657
4746
|
}
|
|
4658
4747
|
function isServerDisabledGlobally(serverName) {
|
|
4659
4748
|
const globalConfig = readGlobalConfig();
|
|
@@ -4686,8 +4775,14 @@ function getServerStatus(serverName) {
|
|
|
4686
4775
|
};
|
|
4687
4776
|
}
|
|
4688
4777
|
function getAllServerStatuses() {
|
|
4689
|
-
const
|
|
4690
|
-
return
|
|
4778
|
+
const serversWithOrigins = getServersWithOrigins();
|
|
4779
|
+
return serversWithOrigins.map((serverInfo) => {
|
|
4780
|
+
const status = getServerStatus(serverInfo.name);
|
|
4781
|
+
return {
|
|
4782
|
+
...status,
|
|
4783
|
+
origin: serverInfo.origin
|
|
4784
|
+
};
|
|
4785
|
+
});
|
|
4691
4786
|
}
|
|
4692
4787
|
function hasMcpServers() {
|
|
4693
4788
|
const servers = getAvailableServers();
|
|
@@ -4702,20 +4797,29 @@ var colors = {
|
|
|
4702
4797
|
red: "\x1B[31m",
|
|
4703
4798
|
yellow: "\x1B[33m",
|
|
4704
4799
|
blue: "\x1B[34m",
|
|
4705
|
-
gray: "\x1B[90m"
|
|
4800
|
+
gray: "\x1B[90m",
|
|
4801
|
+
cyan: "\x1B[36m"
|
|
4706
4802
|
};
|
|
4803
|
+
function formatOriginDisplay(origin) {
|
|
4804
|
+
if (!origin) return "";
|
|
4805
|
+
switch (origin.type) {
|
|
4806
|
+
case "global":
|
|
4807
|
+
return colorize("[global]", "gray");
|
|
4808
|
+
case "project":
|
|
4809
|
+
return colorize("[project]", "gray");
|
|
4810
|
+
case "local":
|
|
4811
|
+
return colorize("[.mcp.json]", "gray");
|
|
4812
|
+
case "plugin":
|
|
4813
|
+
return colorize(`[plugin: ${origin.pluginName}]`, "cyan");
|
|
4814
|
+
}
|
|
4815
|
+
}
|
|
4707
4816
|
function colorize(text, color) {
|
|
4708
4817
|
return `${colors[color]}${text}${colors.reset}`;
|
|
4709
4818
|
}
|
|
4710
4819
|
function displayServerList(statuses) {
|
|
4711
4820
|
if (statuses.length === 0) {
|
|
4712
4821
|
console.log(colorize("No MCP servers configured.", "yellow"));
|
|
4713
|
-
console.log(
|
|
4714
|
-
colorize(
|
|
4715
|
-
"\nConfigure MCP servers in ~/.claude.json to get started.",
|
|
4716
|
-
"gray"
|
|
4717
|
-
)
|
|
4718
|
-
);
|
|
4822
|
+
console.log(colorize("\nConfigure MCP servers in ~/.claude.json to get started.", "gray"));
|
|
4719
4823
|
return;
|
|
4720
4824
|
}
|
|
4721
4825
|
const enabled = statuses.filter((s) => s.enabled);
|
|
@@ -4723,20 +4827,20 @@ function displayServerList(statuses) {
|
|
|
4723
4827
|
if (enabled.length > 0) {
|
|
4724
4828
|
console.log(colorize("\n\u2713 Enabled Servers:", "bold"));
|
|
4725
4829
|
enabled.forEach((server) => {
|
|
4726
|
-
|
|
4830
|
+
const origin = formatOriginDisplay(server.origin);
|
|
4831
|
+
console.log(` ${colorize("\u2713", "green")} ${server.name} ${origin}`);
|
|
4727
4832
|
});
|
|
4728
4833
|
}
|
|
4729
4834
|
if (disabled.length > 0) {
|
|
4730
4835
|
console.log(colorize("\n\u2717 Disabled Servers:", "bold"));
|
|
4731
4836
|
disabled.forEach((server) => {
|
|
4837
|
+
const origin = formatOriginDisplay(server.origin);
|
|
4732
4838
|
const source = server.source === "local" ? colorize("(local)", "gray") : colorize("(global)", "gray");
|
|
4733
|
-
console.log(` ${colorize("\u2717", "red")} ${server.name} ${source}`);
|
|
4839
|
+
console.log(` ${colorize("\u2717", "red")} ${server.name} ${origin} ${source}`);
|
|
4734
4840
|
});
|
|
4735
4841
|
}
|
|
4736
|
-
console.log(
|
|
4737
|
-
|
|
4738
|
-
${enabled.length} enabled, ${disabled.length} disabled`, "gray")
|
|
4739
|
-
);
|
|
4842
|
+
console.log(colorize(`
|
|
4843
|
+
${enabled.length} enabled, ${disabled.length} disabled`, "gray"));
|
|
4740
4844
|
}
|
|
4741
4845
|
function displayDetailedStatus(statuses) {
|
|
4742
4846
|
if (statuses.length === 0) {
|
|
@@ -4752,7 +4856,8 @@ function displayDetailedStatus(statuses) {
|
|
|
4752
4856
|
if (!server.enabled) {
|
|
4753
4857
|
sourceText = server.source === "local" ? colorize(" (local config)", "gray") : colorize(" (global config)", "gray");
|
|
4754
4858
|
}
|
|
4755
|
-
|
|
4859
|
+
const originText = server.origin ? ` ${formatOriginDisplay(server.origin)}` : "";
|
|
4860
|
+
console.log(`${statusIcon} ${server.name}${originText}`);
|
|
4756
4861
|
console.log(` Status: ${statusText}${sourceText}`);
|
|
4757
4862
|
console.log("");
|
|
4758
4863
|
});
|
|
@@ -4760,10 +4865,7 @@ function displayDetailedStatus(statuses) {
|
|
|
4760
4865
|
const disabled = statuses.filter((s) => !s.enabled).length;
|
|
4761
4866
|
console.log(colorize("\u2500".repeat(60), "gray"));
|
|
4762
4867
|
console.log(
|
|
4763
|
-
colorize(
|
|
4764
|
-
`Total: ${statuses.length} servers (${enabled} enabled, ${disabled} disabled)`,
|
|
4765
|
-
"gray"
|
|
4766
|
-
)
|
|
4868
|
+
colorize(`Total: ${statuses.length} servers (${enabled} enabled, ${disabled} disabled)`, "gray")
|
|
4767
4869
|
);
|
|
4768
4870
|
}
|
|
4769
4871
|
function displaySuccess(message) {
|
|
@@ -4971,6 +5073,40 @@ function statusCommand() {
|
|
|
4971
5073
|
|
|
4972
5074
|
// packages/claude-mcp-helper/src/commands/interactive.ts
|
|
4973
5075
|
var import_enquirer = __toESM(require_enquirer());
|
|
5076
|
+
function formatOrigin(origin) {
|
|
5077
|
+
switch (origin.type) {
|
|
5078
|
+
case "global":
|
|
5079
|
+
return "global";
|
|
5080
|
+
case "project":
|
|
5081
|
+
return "project";
|
|
5082
|
+
case "local":
|
|
5083
|
+
return ".mcp.json";
|
|
5084
|
+
case "plugin":
|
|
5085
|
+
return `plugin: ${origin.pluginName}`;
|
|
5086
|
+
}
|
|
5087
|
+
}
|
|
5088
|
+
function groupServersByOrigin(servers) {
|
|
5089
|
+
const grouped = {
|
|
5090
|
+
user: [],
|
|
5091
|
+
local: [],
|
|
5092
|
+
plugin: []
|
|
5093
|
+
};
|
|
5094
|
+
for (const server of servers) {
|
|
5095
|
+
switch (server.origin.type) {
|
|
5096
|
+
case "global":
|
|
5097
|
+
case "project":
|
|
5098
|
+
grouped.user.push(server);
|
|
5099
|
+
break;
|
|
5100
|
+
case "local":
|
|
5101
|
+
grouped.local.push(server);
|
|
5102
|
+
break;
|
|
5103
|
+
case "plugin":
|
|
5104
|
+
grouped.plugin.push(server);
|
|
5105
|
+
break;
|
|
5106
|
+
}
|
|
5107
|
+
}
|
|
5108
|
+
return grouped;
|
|
5109
|
+
}
|
|
4974
5110
|
async function interactiveCommand() {
|
|
4975
5111
|
if (!hasMcpServers()) {
|
|
4976
5112
|
displayWarning("No MCP servers configured.");
|
|
@@ -4986,49 +5122,87 @@ async function interactiveCommand() {
|
|
|
4986
5122
|
return;
|
|
4987
5123
|
}
|
|
4988
5124
|
const servers = getAvailableServers();
|
|
5125
|
+
const serversWithOrigins = getServersWithOrigins();
|
|
4989
5126
|
const statuses = getAllServerStatuses();
|
|
5127
|
+
const groupedServers = groupServersByOrigin(serversWithOrigins);
|
|
4990
5128
|
console.log(colorize("\nMCP Server Configuration", "bold"));
|
|
4991
|
-
console.log(
|
|
4992
|
-
|
|
4993
|
-
);
|
|
4994
|
-
console.log(
|
|
4995
|
-
"Please select the servers you want enabled in this workspace, and unselect"
|
|
4996
|
-
);
|
|
5129
|
+
console.log("Here is a list of all MCP servers available to you in this working directory.");
|
|
5130
|
+
console.log("Please select the servers you want enabled in this workspace, and unselect");
|
|
4997
5131
|
console.log("the ones you want to be disabled.\n");
|
|
5132
|
+
console.log(colorize("Narrowing enabled MCP servers saves tokens in the context window", "gray"));
|
|
4998
5133
|
console.log(
|
|
4999
|
-
colorize(
|
|
5000
|
-
"Narrowing enabled MCP servers saves tokens in the context window",
|
|
5001
|
-
"gray"
|
|
5002
|
-
)
|
|
5003
|
-
);
|
|
5004
|
-
console.log(
|
|
5005
|
-
colorize(
|
|
5006
|
-
"of each Claude Code chat, potentially improving your experience.\n",
|
|
5007
|
-
"gray"
|
|
5008
|
-
)
|
|
5134
|
+
colorize("of each Claude Code chat, potentially improving your experience.\n", "gray")
|
|
5009
5135
|
);
|
|
5010
|
-
console.log(
|
|
5011
|
-
|
|
5012
|
-
)
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5136
|
+
console.log(colorize("Use \u2191\u2193 to navigate, space to toggle, enter to save\n", "gray"));
|
|
5137
|
+
const choices = [];
|
|
5138
|
+
if (groupedServers.user.length > 0) {
|
|
5139
|
+
choices.push({
|
|
5140
|
+
name: colorize("\u2500\u2500 User Config \u2500\u2500", "bold"),
|
|
5141
|
+
role: "separator",
|
|
5142
|
+
hint: "",
|
|
5143
|
+
enabled: false
|
|
5144
|
+
});
|
|
5145
|
+
for (const serverInfo of groupedServers.user) {
|
|
5146
|
+
const status = statuses.find((s) => s.name === serverInfo.name);
|
|
5147
|
+
const isEnabled = status?.enabled ?? true;
|
|
5148
|
+
let hint = formatOrigin(serverInfo.origin);
|
|
5149
|
+
if (!isEnabled) {
|
|
5150
|
+
hint += status?.source === "local" ? " \u2022 disabled locally" : " \u2022 disabled globally";
|
|
5151
|
+
}
|
|
5152
|
+
choices.push({
|
|
5153
|
+
name: serverInfo.name,
|
|
5154
|
+
value: serverInfo.name,
|
|
5155
|
+
hint,
|
|
5156
|
+
enabled: isEnabled
|
|
5157
|
+
});
|
|
5158
|
+
}
|
|
5159
|
+
}
|
|
5160
|
+
if (groupedServers.local.length > 0) {
|
|
5161
|
+
choices.push({
|
|
5162
|
+
name: colorize("\u2500\u2500 Project (.mcp.json) \u2500\u2500", "bold"),
|
|
5163
|
+
role: "separator",
|
|
5164
|
+
hint: "",
|
|
5165
|
+
enabled: false
|
|
5166
|
+
});
|
|
5167
|
+
for (const serverInfo of groupedServers.local) {
|
|
5168
|
+
const status = statuses.find((s) => s.name === serverInfo.name);
|
|
5016
5169
|
const isEnabled = status?.enabled ?? true;
|
|
5017
5170
|
let hint = "";
|
|
5018
|
-
if (isEnabled) {
|
|
5019
|
-
hint = "
|
|
5020
|
-
}
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
}
|
|
5025
|
-
return {
|
|
5026
|
-
name,
|
|
5171
|
+
if (!isEnabled) {
|
|
5172
|
+
hint = status?.source === "local" ? "disabled locally" : "disabled globally";
|
|
5173
|
+
}
|
|
5174
|
+
choices.push({
|
|
5175
|
+
name: serverInfo.name,
|
|
5176
|
+
value: serverInfo.name,
|
|
5027
5177
|
hint,
|
|
5028
5178
|
enabled: isEnabled
|
|
5029
|
-
};
|
|
5179
|
+
});
|
|
5180
|
+
}
|
|
5181
|
+
}
|
|
5182
|
+
if (groupedServers.plugin.length > 0) {
|
|
5183
|
+
choices.push({
|
|
5184
|
+
name: colorize("\u2500\u2500 Plugins \u2500\u2500", "bold"),
|
|
5185
|
+
role: "separator",
|
|
5186
|
+
hint: "",
|
|
5187
|
+
enabled: false
|
|
5030
5188
|
});
|
|
5031
|
-
|
|
5189
|
+
for (const serverInfo of groupedServers.plugin) {
|
|
5190
|
+
const status = statuses.find((s) => s.name === serverInfo.name);
|
|
5191
|
+
const isEnabled = status?.enabled ?? true;
|
|
5192
|
+
let hint = formatOrigin(serverInfo.origin);
|
|
5193
|
+
if (!isEnabled) {
|
|
5194
|
+
hint += status?.source === "local" ? " \u2022 disabled locally" : " \u2022 disabled globally";
|
|
5195
|
+
}
|
|
5196
|
+
choices.push({
|
|
5197
|
+
name: serverInfo.name,
|
|
5198
|
+
value: serverInfo.name,
|
|
5199
|
+
hint,
|
|
5200
|
+
enabled: isEnabled
|
|
5201
|
+
});
|
|
5202
|
+
}
|
|
5203
|
+
}
|
|
5204
|
+
try {
|
|
5205
|
+
const initialIndices = choices.map((choice, index) => choice.role !== "separator" && choice.enabled ? index : -1).filter((index) => index !== -1);
|
|
5032
5206
|
const prompt = new import_enquirer.MultiSelect({
|
|
5033
5207
|
name: "servers",
|
|
5034
5208
|
message: "Select MCP servers to enable. Deselect ones to disable.",
|
|
@@ -5046,10 +5220,8 @@ async function interactiveCommand() {
|
|
|
5046
5220
|
displaySuccess("Configuration saved!");
|
|
5047
5221
|
const enabledCount = selected.length;
|
|
5048
5222
|
const disabledCount = deniedServers.length;
|
|
5049
|
-
console.log(
|
|
5050
|
-
|
|
5051
|
-
${enabledCount} enabled, ${disabledCount} disabled`, "gray")
|
|
5052
|
-
);
|
|
5223
|
+
console.log(colorize(`
|
|
5224
|
+
${enabledCount} enabled, ${disabledCount} disabled`, "gray"));
|
|
5053
5225
|
if (selected.length > 0) {
|
|
5054
5226
|
console.log(colorize("\nEnabled servers:", "gray"));
|
|
5055
5227
|
selected.forEach((name) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../../../src/commands/interactive.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../../../src/commands/interactive.ts"],"names":[],"mappings":"AA+DA;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAuKxD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClaudeConfig, McpConfig,
|
|
1
|
+
import type { ClaudeConfig, InstalledPluginsConfig, McpConfig, ServerOrigin, ServerStatus, SettingsLocal } from './types';
|
|
2
2
|
/**
|
|
3
3
|
* Path to global Claude configuration
|
|
4
4
|
*/
|
|
@@ -11,6 +11,10 @@ export declare function getLocalConfigPath(): string;
|
|
|
11
11
|
* Path to project-local MCP configuration
|
|
12
12
|
*/
|
|
13
13
|
export declare function getMcpJsonConfigPath(): string;
|
|
14
|
+
/**
|
|
15
|
+
* Path to installed plugins configuration
|
|
16
|
+
*/
|
|
17
|
+
export declare function getInstalledPluginsPath(): string;
|
|
14
18
|
/**
|
|
15
19
|
* Read global Claude configuration from ~/.claude.json
|
|
16
20
|
*/
|
|
@@ -23,11 +27,33 @@ export declare function readLocalConfig(): SettingsLocal;
|
|
|
23
27
|
* Read project-local MCP configuration from ./.mcp.json
|
|
24
28
|
*/
|
|
25
29
|
export declare function readMcpJsonConfig(): McpConfig;
|
|
30
|
+
/**
|
|
31
|
+
* Read installed plugins configuration from ~/.claude/plugins/installed_plugins.json
|
|
32
|
+
*/
|
|
33
|
+
export declare function readInstalledPlugins(): InstalledPluginsConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Server info with its origin for grouping in UI
|
|
36
|
+
*/
|
|
37
|
+
export interface ServerInfo {
|
|
38
|
+
name: string;
|
|
39
|
+
origin: ServerOrigin;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get all MCP servers from installed plugins
|
|
43
|
+
* Returns a map of server name to plugin name
|
|
44
|
+
*/
|
|
45
|
+
export declare function getPluginMcpServers(): Map<string, string>;
|
|
46
|
+
/**
|
|
47
|
+
* Get all servers with their origin information for UI grouping
|
|
48
|
+
* This function tracks where each server was discovered from
|
|
49
|
+
*/
|
|
50
|
+
export declare function getServersWithOrigins(): ServerInfo[];
|
|
26
51
|
/**
|
|
27
52
|
* Get all available MCP server names from all sources:
|
|
28
53
|
* 1. Global ~/.claude.json mcpServers
|
|
29
54
|
* 2. Project-specific ~/.claude.json projects[cwd].mcpServers
|
|
30
55
|
* 3. Project-local ./.mcp.json
|
|
56
|
+
* 4. Installed plugins' .mcp.json files
|
|
31
57
|
*/
|
|
32
58
|
export declare function getAvailableServers(): string[];
|
|
33
59
|
/**
|
|
@@ -36,7 +62,7 @@ export declare function getAvailableServers(): string[];
|
|
|
36
62
|
*/
|
|
37
63
|
export declare function getServerStatus(serverName: string): ServerStatus;
|
|
38
64
|
/**
|
|
39
|
-
* Get status for all available servers
|
|
65
|
+
* Get status for all available servers with their origins
|
|
40
66
|
*/
|
|
41
67
|
export declare function getAllServerStatuses(): ServerStatus[];
|
|
42
68
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../../../../src/config/reader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,SAAS,EACT,
|
|
1
|
+
{"version":3,"file":"reader.d.ts","sourceRoot":"","sources":["../../../../../src/config/reader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,YAAY,EACZ,sBAAsB,EACtB,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,CAE5C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAE7C;AAED;;GAEG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAEhD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,YAAY,CAc/C;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,aAAa,CAc/C;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,SAAS,CAc7C;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,sBAAsB,CAc7D;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,YAAY,CAAC;CACtB;AA8BD;;;GAGG;AACH,wBAAgB,mBAAmB,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAuBzD;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,UAAU,EAAE,CAgDpD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CA4B9C;AA+BD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,YAAY,CAyBhE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,YAAY,EAAE,CAUrD;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAGvC"}
|
|
@@ -44,13 +44,47 @@ export interface SettingsLocal {
|
|
|
44
44
|
};
|
|
45
45
|
deniedMcpServers?: DeniedMcpServer[];
|
|
46
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Origin of where an MCP server was discovered
|
|
49
|
+
*/
|
|
50
|
+
export type ServerOrigin = {
|
|
51
|
+
type: 'global';
|
|
52
|
+
} | {
|
|
53
|
+
type: 'project';
|
|
54
|
+
} | {
|
|
55
|
+
type: 'local';
|
|
56
|
+
} | {
|
|
57
|
+
type: 'plugin';
|
|
58
|
+
pluginName: string;
|
|
59
|
+
};
|
|
47
60
|
/**
|
|
48
61
|
* Status information for an MCP server
|
|
49
62
|
*/
|
|
50
63
|
export interface ServerStatus {
|
|
51
64
|
name: string;
|
|
52
65
|
enabled: boolean;
|
|
66
|
+
/** Where the disabled state was configured (for UI hints) */
|
|
53
67
|
source: 'local' | 'global' | 'none';
|
|
68
|
+
/** Where the server was discovered from */
|
|
69
|
+
origin?: ServerOrigin;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Single plugin installation entry in installed_plugins.json
|
|
73
|
+
*/
|
|
74
|
+
export interface PluginInstallation {
|
|
75
|
+
scope: 'user' | 'project';
|
|
76
|
+
installPath: string;
|
|
77
|
+
version: string;
|
|
78
|
+
installedAt: string;
|
|
79
|
+
lastUpdated: string;
|
|
80
|
+
gitCommitSha?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Installed plugins configuration (~/.claude/plugins/installed_plugins.json)
|
|
84
|
+
*/
|
|
85
|
+
export interface InstalledPluginsConfig {
|
|
86
|
+
version: number;
|
|
87
|
+
plugins: Record<string, PluginInstallation[]>;
|
|
54
88
|
}
|
|
55
89
|
/**
|
|
56
90
|
* Project-local MCP configuration (.mcp.json)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/config/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC,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,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,EAAE,CAAC,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../../src/utils/display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../../src/utils/display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAElE;;GAEG;AACH,QAAA,MAAM,MAAM;;;;;;;;;CASX,CAAC;AAoBF;;GAEG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,OAAO,MAAM,GAAG,MAAM,CAEzE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,CA6BhE;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,CAmCpE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAElD;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAEjD"}
|