imcp 0.0.8 → 0.0.10

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
@@ -1,6 +1,6 @@
1
1
  # IMCP
2
2
 
3
- IMCP is a single-line pull and push experience that makes onboarding MCP servers easy.
3
+ IMCP is a Node.js SDK for MCP servers, offering a streamlined, powerful experience of managing MCP servers to your agents (e.g. code agents such as Cline/Github Copilot/Roo), through a unified interface – currently we support coding, browser and Bing tools but can expand more. Let’s use it to weapon your agents
4
4
 
5
5
  ## Overview
6
6
 
@@ -10,11 +10,19 @@ IMCP allows you to:
10
10
  - Run a local UI interface with simple click experience to manage MCP servers
11
11
  - (in progress) Distribute your own MCP servers to others
12
12
 
13
- ## Installation
13
+ ## Get started
14
+ - Quick usage with latest version
15
+ ```
16
+ npx -y imcp@latest serve
17
+ ```
14
18
 
19
+ - Or install it globally
15
20
  ```bash
16
21
  npm install -g imcp
17
22
  ```
23
+ ```
24
+ imcp serve
25
+ ```
18
26
 
19
27
  ## Commands
20
28
 
@@ -39,98 +47,6 @@ Example:
39
47
  imcp serve --port 8080
40
48
  ```
41
49
 
42
- ### list
43
-
44
- Lists all available MCP servers from configured feeds.
45
-
46
- ```bash
47
- imcp list [options]
48
- ```
49
-
50
- Options:
51
- - `--pull`: Sync with remote feeds before listing
52
-
53
- Example:
54
- ```bash
55
- # List servers after syncing with remote feeds
56
- imcp list --pull
57
- ```
58
-
59
- ### install
60
-
61
- Installs specific MCP servers.
62
-
63
- ```bash
64
- imcp install [options]
65
- ```
66
-
67
- Options:
68
- - `--category <category>`: Server category (required)
69
- - `--name <name>`: Server name to install (required)
70
- - `--force`: Force installation even if server already exists
71
- - `--clients <clients>`: Target clients (semicolon separated). Supported values: Cline, MSRooCode, GithubCopilot
72
- - `--envs <envs>`: Environment variables (semicolon separated key=value pairs)
73
-
74
- Examples:
75
- ```bash
76
- # Install a server
77
- imcp install --category ai-coder-tools --name git-tools
78
-
79
- # Install with specific client targets
80
- imcp install --category ai-coder-tools --name git-tools --clients "MSRooCode;GithubCopilot"
81
-
82
- # Install with environment variables
83
- imcp install --category ai-coder-tools --name git-tools --envs "GITHUB_TOKEN=abc123;API_KEY=xyz789"
84
- ```
85
-
86
- ### pull
87
-
88
- Pulls MCP server configurations from remote feed sources to update local feeds.
89
-
90
- ```bash
91
- imcp pull
92
- ```
93
-
94
- Example:
95
- ```bash
96
- # Update local feeds with the latest server configurations
97
- imcp pull
98
- ```
99
-
100
- ## Development
101
-
102
- ### Prerequisites
103
-
104
- - Node.js
105
- - npm
106
-
107
- ### Setup
108
-
109
- ```bash
110
- # Clone the repository
111
- git clone <repository-url>
112
- cd imcp
113
-
114
- # Install dependencies
115
- npm install
116
-
117
- # Build the project
118
- npm run build
119
-
120
- # Run in development mode
121
- npm run dev
122
- ```
123
-
124
- ### Scripts
125
-
126
- - `npm run build`: Builds the project and copies necessary files
127
- - `npm run dev`: Runs TypeScript in watch mode
128
- - `npm run start`: Starts the web server
129
- - `npm run dev:server`: Starts the development server with hot reloading
130
- - `npm run test`: Runs tests
131
- - `npm run lint`: Lints the source code
132
- - `npm run format`: Formats the source code
133
-
134
50
  ## License
135
51
 
136
52
  MIT
package/dist/cli/index.js CHANGED
@@ -1,9 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
3
  import { createServeCommand } from './commands/serve.js';
4
- import { createListCommand } from './commands/list.js';
5
- import { createInstallCommand } from './commands/install.js';
6
- import { createPullCommand } from './commands/pull.js';
7
4
  import { Logger } from '../utils/logger.js';
8
5
  import axios from 'axios';
9
6
  import path from 'path';
@@ -30,10 +27,10 @@ async function main() {
30
27
  Logger.setVerbose(!!opts.verbose);
31
28
  // Add all commands
32
29
  program.addCommand(createServeCommand());
33
- program.addCommand(createListCommand());
34
- program.addCommand(createInstallCommand());
30
+ // program.addCommand(createListCommand());
31
+ // program.addCommand(createInstallCommand());
35
32
  // program.addCommand(createUninstallCommand());
36
- program.addCommand(createPullCommand());
33
+ // program.addCommand(createPullCommand());
37
34
  // Error handling for the entire CLI
38
35
  program.exitOverride();
39
36
  // Check for updates
@@ -45,38 +45,52 @@ export class ClientInstaller {
45
45
  */
46
46
  async isCommandAvailable(command) {
47
47
  try {
48
- if (process.platform === 'win32') {
49
- // Windows-specific command check
50
- await execAsync(`where ${command}`);
51
- }
52
- else if (process.platform === 'darwin' && (command === 'code' || command === 'code-insiders')) {
53
- // macOS-specific VS Code check
54
- const vscodePath = command === 'code' ?
55
- '/Applications/Visual Studio Code.app' :
56
- '/Applications/Visual Studio Code - Insiders.app';
57
- await execAsync(`test -d "${vscodePath}"`);
58
- }
59
- else {
60
- // Unix-like systems
61
- await execAsync(`which ${command}`);
62
- }
63
- return true;
64
- }
65
- catch (error) {
48
+ // For VS Code on macOS, check both command-line tool and app bundle
66
49
  if (process.platform === 'darwin' && (command === 'code' || command === 'code-insiders')) {
67
- // Try checking in ~/Applications as well for macOS
68
50
  try {
69
- const homedir = process.env.HOME;
70
- const vscodePath = command === 'code' ?
71
- `${homedir}/Applications/Visual Studio Code.app` :
72
- `${homedir}/Applications/Visual Studio Code - Insiders.app`;
73
- await execAsync(`test -d "${vscodePath}"`);
51
+ // Try which command first
52
+ await execAsync(`which ${command}`);
74
53
  return true;
75
54
  }
76
55
  catch (error) {
77
- return false;
56
+ // If which fails, check application bundles
57
+ const systemVSCodePath = command === 'code' ?
58
+ '/Applications/Visual Studio Code.app' :
59
+ '/Applications/Visual Studio Code - Insiders.app';
60
+ try {
61
+ // Check system Applications first
62
+ await execAsync(`test -d "${systemVSCodePath}"`);
63
+ return true;
64
+ }
65
+ catch (error) {
66
+ // If system Applications check fails, try user Applications
67
+ const homedir = process.env.HOME;
68
+ if (homedir) {
69
+ const userVSCodePath = command === 'code' ?
70
+ `${homedir}/Applications/Visual Studio Code.app` :
71
+ `${homedir}/Applications/Visual Studio Code - Insiders.app`;
72
+ try {
73
+ await execAsync(`test -d "${userVSCodePath}"`);
74
+ return true;
75
+ }
76
+ catch (error) {
77
+ return false;
78
+ }
79
+ }
80
+ return false;
81
+ }
78
82
  }
79
83
  }
84
+ // For Windows, use where command
85
+ if (process.platform === 'win32') {
86
+ await execAsync(`where ${command}`);
87
+ return true;
88
+ }
89
+ // For all other cases (Unix-like systems), use which command
90
+ await execAsync(`which ${command}`);
91
+ return true;
92
+ }
93
+ catch (error) {
80
94
  return false;
81
95
  }
82
96
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imcp",
3
- "version": "0.0.8",
3
+ "version": "0.0.10",
4
4
  "description": "Node.js SDK for Model Context Protocol (MCP)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/cli/index.ts CHANGED
@@ -42,10 +42,10 @@ async function main(): Promise<void> {
42
42
 
43
43
  // Add all commands
44
44
  program.addCommand(createServeCommand());
45
- program.addCommand(createListCommand());
46
- program.addCommand(createInstallCommand());
45
+ // program.addCommand(createListCommand());
46
+ // program.addCommand(createInstallCommand());
47
47
  // program.addCommand(createUninstallCommand());
48
- program.addCommand(createPullCommand());
48
+ // program.addCommand(createPullCommand());
49
49
 
50
50
  // Error handling for the entire CLI
51
51
  program.exitOverride();
@@ -60,34 +60,52 @@ export class ClientInstaller {
60
60
  */
61
61
  private async isCommandAvailable(command: string): Promise<boolean> {
62
62
  try {
63
- if (process.platform === 'win32') {
64
- // Windows-specific command check
65
- await execAsync(`where ${command}`);
66
- } else if (process.platform === 'darwin' && (command === 'code' || command === 'code-insiders')) {
67
- // macOS-specific VS Code check
68
- const vscodePath = command === 'code' ?
69
- '/Applications/Visual Studio Code.app' :
70
- '/Applications/Visual Studio Code - Insiders.app';
71
- await execAsync(`test -d "${vscodePath}"`);
72
- } else {
73
- // Unix-like systems
74
- await execAsync(`which ${command}`);
75
- }
76
- return true;
77
- } catch (error) {
63
+ // For VS Code on macOS, check both command-line tool and app bundle
78
64
  if (process.platform === 'darwin' && (command === 'code' || command === 'code-insiders')) {
79
- // Try checking in ~/Applications as well for macOS
80
65
  try {
81
- const homedir = process.env.HOME;
82
- const vscodePath = command === 'code' ?
83
- `${homedir}/Applications/Visual Studio Code.app` :
84
- `${homedir}/Applications/Visual Studio Code - Insiders.app`;
85
- await execAsync(`test -d "${vscodePath}"`);
66
+ // Try which command first
67
+ await execAsync(`which ${command}`);
86
68
  return true;
87
69
  } catch (error) {
88
- return false;
70
+ // If which fails, check application bundles
71
+ const systemVSCodePath = command === 'code' ?
72
+ '/Applications/Visual Studio Code.app' :
73
+ '/Applications/Visual Studio Code - Insiders.app';
74
+
75
+ try {
76
+ // Check system Applications first
77
+ await execAsync(`test -d "${systemVSCodePath}"`);
78
+ return true;
79
+ } catch (error) {
80
+ // If system Applications check fails, try user Applications
81
+ const homedir = process.env.HOME;
82
+ if (homedir) {
83
+ const userVSCodePath = command === 'code' ?
84
+ `${homedir}/Applications/Visual Studio Code.app` :
85
+ `${homedir}/Applications/Visual Studio Code - Insiders.app`;
86
+
87
+ try {
88
+ await execAsync(`test -d "${userVSCodePath}"`);
89
+ return true;
90
+ } catch (error) {
91
+ return false;
92
+ }
93
+ }
94
+ return false;
95
+ }
89
96
  }
90
97
  }
98
+
99
+ // For Windows, use where command
100
+ if (process.platform === 'win32') {
101
+ await execAsync(`where ${command}`);
102
+ return true;
103
+ }
104
+
105
+ // For all other cases (Unix-like systems), use which command
106
+ await execAsync(`which ${command}`);
107
+ return true;
108
+ } catch (error) {
91
109
  return false;
92
110
  }
93
111
  }