aipex-mcp-bridge 1.0.2 → 2.0.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/README.md CHANGED
@@ -1,20 +1,32 @@
1
1
  # aipex-mcp-bridge
2
2
 
3
- MCP bridge that connects AI agents to the [AIPex](https://aipex.ai) browser extension via WebSocket.
3
+ MCP bridge that connects AI agents to the [AIPex](https://aipex.ai) browser extension via Native Messaging.
4
4
 
5
- Works with **any** MCP client that supports stdio transport Cursor, Claude Desktop, Claude Code, VS Code Copilot, Windsurf, Zed, and more.
5
+ Works with **any** MCP client that supports stdio transport -- Cursor, Claude Desktop, Claude Code, VS Code Copilot, Windsurf, Zed, and more.
6
6
 
7
7
  ## How it works
8
8
 
9
9
  ```
10
- AI Agent (MCP client) ──stdio──▶ aipex-mcp-bridge ──WebSocket──▶ AIPex Chrome Extension
10
+ AI Agent (MCP client) ──stdio──▶ aipex-mcp-bridge ──Native Messaging──▶ AIPex Chrome Extension
11
11
  ```
12
12
 
13
- The bridge starts a WebSocket server on `localhost:9223` (configurable) and communicates with your AI agent over stdio using the MCP protocol. The AIPex extension connects to the WebSocket server to expose browser control tools.
13
+ The bridge communicates with the AIPex Chrome extension via Chrome's Native Messaging protocol (no WebSocket, no manual connection needed). It also exposes a Streamable HTTP endpoint on `localhost:12306` for HTTP-capable clients.
14
14
 
15
15
  ## Quick start
16
16
 
17
- ### 1. Configure your AI agent
17
+ ### 1. Install and register the native messaging host
18
+
19
+ ```bash
20
+ npm install -g aipex-mcp-bridge
21
+ ```
22
+
23
+ The native messaging host is registered automatically during installation. If needed, you can register manually:
24
+
25
+ ```bash
26
+ aipex-mcp-bridge register
27
+ ```
28
+
29
+ ### 2. Configure your AI agent
18
30
 
19
31
  Add the following to your agent's MCP configuration:
20
32
 
@@ -76,43 +88,76 @@ claude mcp add aipex-browser -- npx -y aipex-mcp-bridge
76
88
  }
77
89
  ```
78
90
 
79
- ### 2. Connect AIPex extension
91
+ ### 3. Reload AIPex extension
80
92
 
81
- 1. Open Chrome AIPex extension Options page
82
- 2. Set WebSocket URL to `ws://localhost:9223`
83
- 3. Click **Connect**
93
+ After installing the bridge, reload the AIPex extension in Chrome. The extension will automatically connect to the native messaging host.
84
94
 
85
95
  Your AI agent can now control the browser through AIPex.
86
96
 
87
- ## Options
97
+ ## CLI Commands
88
98
 
99
+ ### Register native messaging host
100
+
101
+ ```bash
102
+ aipex-mcp-bridge register [options]
89
103
  ```
90
- npx aipex-mcp-bridge [--port <port>]
104
+
105
+ | Option | Description |
106
+ | --- | --- |
107
+ | `--browser <name>` | Browser: `chrome`, `chromium`, `all`, `detect` (default: `detect`) |
108
+ | `--system` | Register system-wide (requires admin) |
109
+ | `--extension-id <id>` | Chrome extension ID (repeatable) |
110
+
111
+ ### Run diagnostics
112
+
113
+ ```bash
114
+ aipex-mcp-bridge doctor [--fix]
91
115
  ```
92
116
 
93
- | Option | Default | Description |
94
- | ----------------- | ------- | ---------------------------------- |
95
- | `--port <port>` | `9223` | WebSocket port for AIPex extension |
96
- | `--help`, `-h` | | Show help message |
97
- | `--version`, `-v` | | Show version |
117
+ ### Fix file permissions (macOS/Linux)
98
118
 
99
- ### Custom port example
119
+ ```bash
120
+ aipex-mcp-bridge fix-permissions
121
+ ```
100
122
 
101
- ```json
102
- {
103
- "mcpServers": {
104
- "aipex-browser": {
105
- "command": "npx",
106
- "args": ["-y", "aipex-mcp-bridge", "--port", "8080"]
107
- }
108
- }
109
- }
123
+ ### Remove registration
124
+
125
+ ```bash
126
+ aipex-mcp-bridge unregister
110
127
  ```
111
128
 
129
+ ## Server Options
130
+
131
+ ```
132
+ aipex-mcp-bridge [--port <port>] [--stdio-only]
133
+ ```
134
+
135
+ | Option | Default | Description |
136
+ | --- | --- | --- |
137
+ | `--port <port>` | `12306` | HTTP port for Streamable HTTP transport |
138
+ | `--stdio-only` | | Only serve via stdio, skip HTTP server |
139
+ | `--help`, `-h` | | Show help message |
140
+ | `--version`, `-v` | | Show version |
141
+
112
142
  ## Requirements
113
143
 
114
144
  - Node.js >= 18
115
145
  - AIPex Chrome extension installed
146
+ - Chrome or Chromium browser
147
+
148
+ ## Troubleshooting
149
+
150
+ **"Specified native messaging host not found"**
151
+
152
+ Run `aipex-mcp-bridge register` to register the native messaging host, then reload the Chrome extension.
153
+
154
+ **"Permission denied" (macOS/Linux)**
155
+
156
+ Run `aipex-mcp-bridge fix-permissions` to fix file permissions.
157
+
158
+ **General diagnostics**
159
+
160
+ Run `aipex-mcp-bridge doctor --fix` for automated diagnosis and repair.
116
161
 
117
162
  ## License
118
163