@vespermcp/mcp-server 1.0.8 → 1.1.1

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/README.md CHANGED
@@ -31,23 +31,23 @@ Vesper is a Model Context Protocol (MCP) server that helps you find, analyze, an
31
31
 
32
32
  ## šŸ“¦ Installation
33
33
 
34
- ### Option A: Install via NPX (Easiest)
35
- Run the setup wizard to automatically configure Vesper for Cursor, Claude Desktop, and VS Code:
34
+ ## šŸš€ Quick Start (VS Code + Copilot)
36
35
 
37
- ```bash
38
- npx @vespermcp/mcp-server@latest --setup
39
- ```
36
+ The fastest way to install Vesper and configure it for **GitHub Copilot Chat** or **Cursor** is to run the automated setup:
40
37
 
41
- ### Option B: Install Globally
42
38
  ```bash
43
- npm install -g @vespermcp/mcp-server
44
- vesper --setup
39
+ npx -y @vespermcp/mcp-server@latest --setup
45
40
  ```
46
41
 
47
- The postinstall script will automatically:
48
- - Install Python dependencies (opencv-python, librosa, etc.)
49
- - Create data directories in `~/.vesper`
50
- - Display setup instructions
42
+ 1. Select **Visual Studio Code (Settings.json)** from the list.
43
+ 2. Restart VS Code.
44
+ 3. Open Copilot Chat and look for the **MCP Servers** section.
45
+
46
+ ## šŸ› ļø Configuration
47
+ Vesper supports:
48
+ - **GitHub Copilot Chat**: Automated setup via `settings.json`.
49
+ - **Cursor**: Automated setup via `mcp.json`.
50
+ - **Claude Desktop**: Automated setup via `claude_desktop_config.json`.
51
51
 
52
52
  ### Manual Python Setup (if needed)
53
53
 
@@ -5,211 +5,217 @@ export class ConfigManager {
5
5
  getHomeDir() {
6
6
  return os.homedir();
7
7
  }
8
- getConfigPaths() {
8
+ /**
9
+ * All known coding agent configuration paths.
10
+ * Based on the `add-mcp` standard used by the MCP ecosystem.
11
+ */
12
+ getAllAgents() {
9
13
  const home = this.getHomeDir();
10
14
  const isWin = process.platform === "win32";
11
- const appData = process.env.APPDATA || "";
12
- return {
13
- "claude-desktop": {
15
+ const isMac = process.platform === "darwin";
16
+ const appData = process.env.APPDATA || path.join(home, "AppData", "Roaming");
17
+ const agents = [
18
+ // Claude Code: ~/.claude.json
19
+ {
20
+ name: "Claude Code",
21
+ path: path.join(home, ".claude.json"),
22
+ format: "json-mcpServers",
23
+ serverType: "stdio",
24
+ },
25
+ // Claude Desktop: %APPDATA%/Claude/claude_desktop_config.json
26
+ {
14
27
  name: "Claude Desktop",
15
28
  path: isWin
16
29
  ? path.join(appData, "Claude", "claude_desktop_config.json")
17
- : path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json"),
18
- key: "mcpServers"
30
+ : isMac
31
+ ? path.join(home, "Library", "Application Support", "Claude", "claude_desktop_config.json")
32
+ : path.join(home, ".config", "claude", "claude_desktop_config.json"),
33
+ format: "json-mcpServers",
34
+ serverType: "stdio",
19
35
  },
20
- "cursor": {
36
+ // Cursor: ~/.cursor/mcp.json
37
+ {
21
38
  name: "Cursor",
22
- path: isWin
23
- ? path.join(appData, "Cursor", "User", "globalStorage", "rohit-gohri.cursor-mcp", "mcp.json")
24
- : path.join(home, "Library", "Application Support", "Cursor", "User", "globalStorage", "rohit-gohri.cursor-mcp", "mcp.json"),
25
- key: "mcpServers"
26
- },
27
- "vscode-cline": {
28
- name: "VS Code (Cline)",
29
- path: isWin
30
- ? path.join(appData, "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json")
31
- : path.join(home, "Library", "Application Support", "Code", "User", "globalStorage", "saoudrizwan.claude-dev", "settings", "cline_mcp_settings.json"),
32
- key: "mcpServers"
33
- },
34
- "vscode-roo-code": {
35
- name: "VS Code (Roo Code)",
36
- path: isWin
37
- ? path.join(appData, "Code", "User", "globalStorage", "RooVeterans.roo-cline", "settings", "cline_mcp_settings.json")
38
- : path.join(home, "Library", "Application Support", "Code", "User", "globalStorage", "RooVeterans.roo-cline", "settings", "cline_mcp_settings.json"),
39
- key: "mcpServers"
40
- },
41
- "cursor-project": {
42
- name: "Cursor (Project-specific)",
43
- path: path.join(process.cwd(), ".cursor", "mcp.json"),
44
- key: "mcpServers"
45
- },
46
- "vscode-copilot": {
47
- name: "VS Code (Copilot)",
48
- path: path.join(home, ".copilot", "mcp-config.json"),
49
- key: "mcpServers"
39
+ path: path.join(home, ".cursor", "mcp.json"),
40
+ format: "json-mcpServers",
41
+ serverType: "stdio",
50
42
  },
51
- "vscode-global": {
52
- name: "VS Code (Standard MCP)",
43
+ // VS Code: %APPDATA%/Code/User/mcp.json (uses "servers" key, NOT "mcpServers")
44
+ {
45
+ name: "VS Code",
53
46
  path: isWin
54
47
  ? path.join(appData, "Code", "User", "mcp.json")
55
- : path.join(home, "Library", "Application Support", "Code", "User", "mcp.json"),
56
- key: "mcpServers"
48
+ : isMac
49
+ ? path.join(home, "Library", "Application Support", "Code", "User", "mcp.json")
50
+ : path.join(home, ".config", "Code", "User", "mcp.json"),
51
+ format: "json-servers",
52
+ serverType: "stdio",
57
53
  },
58
- "vscode-project": {
59
- name: "VS Code (Project-specific)",
60
- path: path.join(process.cwd(), ".vscode", "mcp.json"),
61
- key: "mcpServers"
54
+ // Codex: ~/.codex/config.toml
55
+ {
56
+ name: "Codex",
57
+ path: path.join(home, ".codex", "config.toml"),
58
+ format: "toml",
59
+ serverType: "stdio",
62
60
  },
63
- "vscode-insiders": {
64
- name: "VS Code Insiders",
65
- path: isWin
66
- ? path.join(appData, "Code - Insiders", "User", "mcp.json")
67
- : path.join(home, "Library", "Application Support", "Code - Insiders", "User", "mcp.json"),
68
- key: "mcpServers"
69
- },
70
- "vscode-settings": {
71
- name: "VS Code (Settings.json)",
72
- path: isWin
73
- ? path.join(appData, "Code", "User", "settings.json")
74
- : path.join(home, "Library", "Application Support", "Code", "User", "settings.json"),
75
- key: "github.copilot.chat.mcp.servers"
61
+ // Antigravity / Gemini CLI: ~/.gemini/settings.json
62
+ {
63
+ name: "Antigravity",
64
+ path: path.join(home, ".gemini", "settings.json"),
65
+ format: "json-mcpServers",
66
+ serverType: "stdio",
76
67
  },
77
- "vscode-root": {
78
- name: "VS Code (Workspace Root)",
79
- path: path.join(process.cwd(), "mcp.json"),
80
- key: "mcpServers"
81
- }
82
- };
68
+ ];
69
+ return agents;
83
70
  }
71
+ /**
72
+ * Detect which agents are installed on this machine.
73
+ */
84
74
  detectIDEs() {
85
- const paths = this.getConfigPaths();
75
+ const agents = this.getAllAgents();
86
76
  const detected = [];
87
- const termProgram = (process.env.TERM_PROGRAM || "").toLowerCase();
88
- const appData = process.env.APPDATA || "";
89
- const home = this.getHomeDir();
90
- for (const [key, cp] of Object.entries(paths)) {
91
- const isClaude = key === "claude-desktop";
92
- const isCursor = key === "cursor";
93
- const isVSCode = key.startsWith("vscode");
94
- const isCopilot = key === "vscode-copilot";
95
- const isStandard = key === "vscode-global";
96
- const isSettings = key === "vscode-settings";
97
- const isRoot = key === "vscode-root";
98
- const hasClaudeFolder = fs.existsSync(path.join(appData, "Claude")) || (process.platform === "darwin" && fs.existsSync(path.join(home, "Library", "Application Support", "Claude")));
99
- const hasCursorFolder = fs.existsSync(path.join(appData, "Cursor")) || fs.existsSync(path.join(home, ".cursor")) || (process.platform === "darwin" && fs.existsSync(path.join(home, "Library", "Application Support", "Cursor")));
100
- const hasCodeFolder = fs.existsSync(path.join(appData, "Code")) || fs.existsSync(path.join(home, ".vscode")) || (process.platform === "darwin" && fs.existsSync(path.join(home, "Library", "Application Support", "Code")));
101
- const hasInsidersFolder = fs.existsSync(path.join(appData, "Code - Insiders"));
102
- const hasCopilotFolder = fs.existsSync(path.join(home, ".copilot"));
103
- if (process.env.VESPER_DEBUG) {
104
- console.log(`[Debug] Checking ${key}:`);
105
- console.log(` - Config Path: ${cp.path} (${fs.existsSync(cp.path) ? "EXISTS" : "MISSING"})`);
106
- }
107
- const isCurrentIDE = (isCursor && (termProgram.includes("cursor") || (termProgram === "vscode" && hasCursorFolder))) ||
108
- (isClaude && termProgram.includes("claude")) ||
109
- (isVSCode && termProgram === "vscode" && (hasCodeFolder || hasInsidersFolder)) ||
110
- (isCopilot && hasCopilotFolder) ||
111
- (isStandard && termProgram === "vscode") ||
112
- (isSettings && termProgram === "vscode");
113
- // Also check if the config file actually exists OR the root folder exists
114
- const shouldDetectByFolder = (isClaude && hasClaudeFolder) ||
115
- (isCursor && hasCursorFolder) ||
116
- (isVSCode && (hasCodeFolder || hasInsidersFolder)) ||
117
- (isCopilot && hasCopilotFolder) ||
118
- (isSettings && hasCodeFolder);
119
- if (shouldDetectByFolder || fs.existsSync(cp.path) || isCurrentIDE || key === "cursor-project" || key === "vscode-project" || key === "vscode-root") {
120
- let displayName = cp.name;
121
- if (isCurrentIDE) {
122
- displayName += " (Current Terminal)";
123
- }
124
- detected.push({ ...cp, name: displayName });
77
+ for (const agent of agents) {
78
+ const configDir = path.dirname(agent.path);
79
+ const configExists = fs.existsSync(agent.path);
80
+ const dirExists = fs.existsSync(configDir);
81
+ if (configExists || dirExists) {
82
+ detected.push(agent);
125
83
  }
126
84
  }
127
- return detected.filter((v, i, a) => a.findIndex(t => t.path === v.path) === i);
85
+ return detected;
128
86
  }
129
- getVesperExecutableConfig() {
87
+ /**
88
+ * Build the server config object for Vesper.
89
+ */
90
+ getServerConfig() {
130
91
  const isWin = process.platform === "win32";
131
- // Try to find absolute paths for maximum reliability in VS Code/Copilot
132
- try {
133
- const nodeExe = process.execPath;
134
- // ConfigManager is in build/config/config-manager.js
135
- // index.js is in build/index.js
136
- const vesperScript = path.resolve(__dirname, "../../index.js");
137
- if (fs.existsSync(vesperScript)) {
138
- return {
139
- command: nodeExe,
140
- args: [vesperScript]
141
- };
142
- }
143
- }
144
- catch (e) {
145
- // Fallback to npx
146
- }
147
92
  return {
148
93
  command: isWin ? "npx.cmd" : "npx",
149
- args: ["-y", "@vespermcp/mcp-server@latest"]
94
+ args: ["-y", "@vespermcp/mcp-server@latest"],
150
95
  };
151
96
  }
152
- async installTo(configPath) {
97
+ /**
98
+ * Install Vesper to a single agent configuration.
99
+ */
100
+ async installTo(agent) {
153
101
  try {
154
- console.log(`[Vesper Setup] Installing to ${configPath.name} at ${configPath.path}...`);
102
+ console.log(`[Vesper Setup] Installing to ${agent.name}...`);
103
+ if (agent.format === "toml") {
104
+ return this.installToToml(agent);
105
+ }
106
+ // JSON-based agents
155
107
  let config = {};
156
- if (fs.existsSync(configPath.path)) {
108
+ if (fs.existsSync(agent.path)) {
157
109
  try {
158
- const content = fs.readFileSync(configPath.path, "utf-8").trim();
110
+ const content = fs.readFileSync(agent.path, "utf-8").trim();
159
111
  config = content ? JSON.parse(content) : {};
160
112
  }
161
113
  catch (e) {
162
- console.warn(`[Vesper Setup] Could not parse ${configPath.path}, starting fresh`);
114
+ console.warn(`[Vesper Setup] Could not parse ${agent.path}, starting fresh`);
163
115
  config = {};
164
116
  }
165
117
  }
166
118
  else {
167
- console.log(`[Vesper Setup] Creating directory: ${path.dirname(configPath.path)}`);
168
- fs.mkdirSync(path.dirname(configPath.path), { recursive: true });
169
- }
170
- // Handle nested keys (e.g., "github.copilot.chat.mcp.servers")
171
- const keys = configPath.key.split('.');
172
- let current = config;
173
- for (let i = 0; i < keys.length - 1; i++) {
174
- if (!current[keys[i]])
175
- current[keys[i]] = {};
176
- current = current[keys[i]];
119
+ fs.mkdirSync(path.dirname(agent.path), { recursive: true });
177
120
  }
178
- const lastKey = keys[keys.length - 1];
179
- const mcpServers = current[lastKey] || {};
180
- // Use the most robust command format available (absolute paths if running from npx/installed)
181
- const vesperExec = this.getVesperExecutableConfig();
182
- const serverConfig = {
183
- command: vesperExec.command,
184
- args: vesperExec.args,
185
- env: {
186
- "HF_TOKEN": "YOUR_HUGGINGFACE_TOKEN_HERE",
187
- }
121
+ const vesperConfig = this.getServerConfig();
122
+ const serverEntry = {
123
+ command: vesperConfig.command,
124
+ args: vesperConfig.args,
188
125
  };
189
- mcpServers["vesper"] = serverConfig;
190
- // Also add alias for easy upgrading
191
- mcpServers["@vespermcp/mcp-server"] = serverConfig;
192
- current[lastKey] = mcpServers;
193
- // If we are writing to settings.json, also add "mcp.servers" for native VS Code MCP view
194
- if (configPath.key.includes("copilot")) {
195
- if (!config["mcp.servers"])
196
- config["mcp.servers"] = {};
197
- config["mcp.servers"]["vesper"] = serverConfig;
126
+ // Determine the correct key based on agent format
127
+ if (agent.format === "json-servers") {
128
+ // VS Code native MCP format: { "servers": { "vesper": { "type": "stdio", "command": ..., "args": ... } } }
129
+ if (!config.servers)
130
+ config.servers = {};
131
+ config.servers["vesper"] = {
132
+ type: "stdio",
133
+ ...serverEntry,
134
+ };
135
+ console.log(` āœ“ Added to "servers" key (VS Code native format)`);
198
136
  }
199
- const content = JSON.stringify(config, null, 2);
200
- if (process.env.VESPER_DEBUG) {
201
- console.log(`[Vesper Setup] Writing to ${configPath.path}:`);
202
- console.log(content);
137
+ else {
138
+ // Standard mcpServers format: { "mcpServers": { "vesper": { "command": ..., "args": ... } } }
139
+ if (!config.mcpServers)
140
+ config.mcpServers = {};
141
+ config.mcpServers["vesper"] = serverEntry;
142
+ console.log(` āœ“ Added to "mcpServers" key`);
203
143
  }
204
- fs.writeFileSync(configPath.path, content, "utf8");
205
- // Verify write
206
- const finalSize = fs.statSync(configPath.path).size;
207
- console.log(`[Vesper Setup] Successfully wrote ${finalSize} bytes to ${configPath.name}`);
144
+ fs.writeFileSync(agent.path, JSON.stringify(config, null, 2), "utf8");
145
+ const size = fs.statSync(agent.path).size;
146
+ console.log(` āœ“ ${agent.name}: ${agent.path} (${size} bytes)`);
208
147
  return true;
209
148
  }
210
149
  catch (error) {
211
- console.error(`Failed to install to ${configPath.name}:`, error);
150
+ console.error(` āœ— Failed to install to ${agent.name}:`, error);
212
151
  return false;
213
152
  }
214
153
  }
154
+ /**
155
+ * Install to TOML-based agents (Codex).
156
+ */
157
+ installToToml(agent) {
158
+ try {
159
+ let content = "";
160
+ if (fs.existsSync(agent.path)) {
161
+ content = fs.readFileSync(agent.path, "utf-8");
162
+ }
163
+ else {
164
+ fs.mkdirSync(path.dirname(agent.path), { recursive: true });
165
+ }
166
+ // Check if vesper is already configured
167
+ if (content.includes("[mcp_servers.vesper]")) {
168
+ console.log(` āœ“ ${agent.name}: Already configured`);
169
+ return true;
170
+ }
171
+ const vesperConfig = this.getServerConfig();
172
+ const isWin = process.platform === "win32";
173
+ const tomlEntry = `
174
+ [mcp_servers.vesper]
175
+ command = "${vesperConfig.command}"
176
+ args = [${vesperConfig.args.map(a => `"${a}"`).join(", ")}]
177
+ `;
178
+ content += tomlEntry;
179
+ fs.writeFileSync(agent.path, content, "utf8");
180
+ console.log(` āœ“ ${agent.name}: ${agent.path}`);
181
+ return true;
182
+ }
183
+ catch (error) {
184
+ console.error(` āœ— Failed to install to ${agent.name}:`, error);
185
+ return false;
186
+ }
187
+ }
188
+ /**
189
+ * Install Vesper to ALL detected agents automatically.
190
+ */
191
+ async installToAll() {
192
+ const agents = this.detectIDEs();
193
+ const success = [];
194
+ const failed = [];
195
+ console.log(`\nšŸ“¦ Installing Vesper to ${agents.length} detected agents...\n`);
196
+ for (const agent of agents) {
197
+ const result = await this.installTo(agent);
198
+ if (result) {
199
+ success.push(agent.name);
200
+ }
201
+ else {
202
+ failed.push(agent.name);
203
+ }
204
+ }
205
+ console.log(`\nā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”`);
206
+ console.log(`│ Installation Summary │`);
207
+ console.log(`ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤`);
208
+ if (success.length > 0) {
209
+ for (const name of success) {
210
+ console.log(`│ āœ“ ${name.padEnd(40)}│`);
211
+ }
212
+ }
213
+ if (failed.length > 0) {
214
+ for (const name of failed) {
215
+ console.log(`│ āœ— ${name.padEnd(40)}│`);
216
+ }
217
+ }
218
+ console.log(`ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜\n`);
219
+ return { success, failed };
220
+ }
215
221
  }
package/build/index.js CHANGED
@@ -24,7 +24,6 @@ import { ImageAnalyzer } from "./quality/image-analyzer.js";
24
24
  import { MediaAnalyzer } from "./quality/media-analyzer.js";
25
25
  import { QualityOrchestrator } from "./quality/quality-orchestrator.js";
26
26
  import { ConfigManager } from "./config/config-manager.js";
27
- import { Selector } from "./utils/selector.js";
28
27
  import os from "os";
29
28
  // Determine absolute paths relative to the compiled script
30
29
  const __filename = fileURLToPath(import.meta.url);
@@ -782,52 +781,21 @@ async function main() {
782
781
  async function runSetupWizard(silent = false) {
783
782
  const configManager = new ConfigManager();
784
783
  if (!silent) {
785
- console.log(`\nšŸš€ Welcome to Vesper MCP Setup!`);
786
- console.log(`--------------------------------`);
787
- console.log(`Searching for IDE configurations...`);
784
+ console.log(`\nšŸš€ Vesper MCP - Universal Setup`);
785
+ console.log(`================================`);
786
+ console.log(`Installing to all detected coding agents...\n`);
788
787
  }
789
- const ides = configManager.detectIDEs();
790
- if (ides.length === 0) {
788
+ const result = await configManager.installToAll();
789
+ if (result.success.length === 0 && result.failed.length === 0) {
791
790
  if (!silent) {
792
- console.log("\nāŒ No supported IDEs detected.");
793
- console.log("I checked for:");
794
- console.log(" - Cursor (Global & Project)");
795
- console.log(" - Claude Desktop");
796
- console.log(" - VS Code (Standard MCP, Copilot Chat, Cline, Roo Code)");
797
- console.log("\nIf you are using VS Code or Cursor, please make sure they are installed.");
798
- console.log("For project-specific setup, run this command inside your project folder.");
791
+ console.log("\nāŒ No supported agents detected.");
792
+ console.log("Supported agents: Claude Code, Claude Desktop, Cursor, VS Code, Codex, Antigravity");
793
+ console.log("\nMake sure at least one is installed, then try again.");
799
794
  }
800
795
  return;
801
796
  }
802
- if (silent) {
803
- for (const ide of ides) {
804
- await configManager.installTo(ide);
805
- }
806
- return;
807
- }
808
- console.log(`\nFound ${ides.length} potential application(s):`);
809
- const selector = new Selector("Select applications to configure for Vesper:", ides.map(ide => ({
810
- name: ide.name,
811
- value: ide,
812
- selected: true
813
- })));
814
- const selectedIDEs = await selector.run();
815
- if (selectedIDEs.length > 0) {
816
- console.log(`\nInstalling to ${selectedIDEs.length} application(s)...\n`);
817
- for (const ide of selectedIDEs) {
818
- process.stdout.write(`Installing to ${ide.name}... `);
819
- const success = await configManager.installTo(ide);
820
- if (success) {
821
- process.stdout.write("āœ…\n");
822
- }
823
- else {
824
- process.stdout.write("āŒ (Check permissions or if file is in use)\n");
825
- }
826
- }
827
- console.log("\n✨ Setup complete! Please RESTART your IDE(s) to apply changes.");
828
- }
829
- else {
830
- console.log("\nSetup skipped. No applications selected.");
797
+ if (!silent) {
798
+ console.log("✨ Setup complete! Please RESTART your IDE(s) to apply changes.");
831
799
  }
832
800
  }
833
801
  main().catch((error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vespermcp/mcp-server",
3
- "version": "1.0.8",
3
+ "version": "1.1.1",
4
4
  "description": "AI-powered dataset discovery, quality analysis, and preparation MCP server with multimodal support (text, image, audio, video)",
5
5
  "type": "module",
6
6
  "main": "build/index.js",