@mcpinv/cli 0.1.5 → 0.1.7
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/commands/search.js +1 -1
- package/dist/index.js +4 -1
- package/dist/services/smithery.js +1 -1
- package/package.json +1 -1
- package/src/commands/search.ts +1 -1
- package/src/index.ts +5 -1
- package/src/services/smithery.ts +1 -1
package/dist/commands/search.js
CHANGED
|
@@ -19,7 +19,7 @@ export function searchCommand() {
|
|
|
19
19
|
for (const s of results) {
|
|
20
20
|
console.log(` ${chalk.cyan(s.id)}`);
|
|
21
21
|
console.log(` ${chalk.dim(s.description)}`);
|
|
22
|
-
console.log(` ${chalk.green(`
|
|
22
|
+
console.log(` ${chalk.green(`mcpinv install ${s.id}`)}\n`);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
catch (err) {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module';
|
|
2
3
|
import { program } from 'commander';
|
|
4
|
+
const require = createRequire(import.meta.url);
|
|
5
|
+
const { version } = require('../package.json');
|
|
3
6
|
import { searchCommand } from './commands/search.js';
|
|
4
7
|
import { installCommand } from './commands/install.js';
|
|
5
8
|
import { removeCommand } from './commands/remove.js';
|
|
@@ -10,7 +13,7 @@ import { migrateCommand } from './commands/migrate.js';
|
|
|
10
13
|
program
|
|
11
14
|
.name('mcpinv')
|
|
12
15
|
.description('Install, run and host MCP servers')
|
|
13
|
-
.version(
|
|
16
|
+
.version(version);
|
|
14
17
|
program.addCommand(searchCommand());
|
|
15
18
|
program.addCommand(installCommand());
|
|
16
19
|
program.addCommand(removeCommand());
|
|
@@ -4,7 +4,7 @@ export async function searchServers(query) {
|
|
|
4
4
|
const { data } = await axios.get(`${BASE}/servers`, {
|
|
5
5
|
params: { q: query, pageSize: 20 }
|
|
6
6
|
});
|
|
7
|
-
return (data.items ?? []).map(mapToServer);
|
|
7
|
+
return (data.servers ?? data.items ?? []).map(mapToServer);
|
|
8
8
|
}
|
|
9
9
|
export async function fetchManifest(id) {
|
|
10
10
|
const { data } = await axios.get(`${BASE}/servers/${id}`);
|
package/package.json
CHANGED
package/src/commands/search.ts
CHANGED
|
@@ -20,7 +20,7 @@ export function searchCommand(): Command {
|
|
|
20
20
|
for (const s of results) {
|
|
21
21
|
console.log(` ${chalk.cyan(s.id)}`)
|
|
22
22
|
console.log(` ${chalk.dim(s.description)}`)
|
|
23
|
-
console.log(` ${chalk.green(`
|
|
23
|
+
console.log(` ${chalk.green(`mcpinv install ${s.id}`)}\n`)
|
|
24
24
|
}
|
|
25
25
|
} catch (err) {
|
|
26
26
|
spinner.fail('Search failed')
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'module'
|
|
2
3
|
import { program } from 'commander'
|
|
4
|
+
|
|
5
|
+
const require = createRequire(import.meta.url)
|
|
6
|
+
const { version } = require('../package.json')
|
|
3
7
|
import { searchCommand } from './commands/search.js'
|
|
4
8
|
import { installCommand } from './commands/install.js'
|
|
5
9
|
import { removeCommand } from './commands/remove.js'
|
|
@@ -11,7 +15,7 @@ import { migrateCommand } from './commands/migrate.js'
|
|
|
11
15
|
program
|
|
12
16
|
.name('mcpinv')
|
|
13
17
|
.description('Install, run and host MCP servers')
|
|
14
|
-
.version(
|
|
18
|
+
.version(version)
|
|
15
19
|
|
|
16
20
|
program.addCommand(searchCommand())
|
|
17
21
|
program.addCommand(installCommand())
|
package/src/services/smithery.ts
CHANGED
|
@@ -7,7 +7,7 @@ export async function searchServers(query: string): Promise<McpServer[]> {
|
|
|
7
7
|
const { data } = await axios.get(`${BASE}/servers`, {
|
|
8
8
|
params: { q: query, pageSize: 20 }
|
|
9
9
|
})
|
|
10
|
-
return (data.items ?? []).map(mapToServer)
|
|
10
|
+
return (data.servers ?? data.items ?? []).map(mapToServer)
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export async function fetchManifest(id: string): Promise<McpServer> {
|