@webeyez/mcp-server 1.0.5 → 1.0.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/README.md +91 -48
- package/dist/client.js +108 -0
- package/package.json +6 -3
- package/dist/claude-proxy.js +0 -377
- package/dist/index.js +0 -146
- package/dist/install-env.js +0 -83
- package/dist/setup.js +0 -56
- package/dist/tools/agents.proto +0 -20
- package/dist/tools/auth.js +0 -138
- package/dist/tools/job-store.js +0 -20
- package/dist/tools/organization.proto +0 -102
- package/dist/tools/public.js +0 -426
- package/dist/utils/paths.js +0 -22
package/README.md
CHANGED
|
@@ -1,35 +1,54 @@
|
|
|
1
1
|
# Webeyez Model Context Protocol (MCP) Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/@webeyez/mcp-server)
|
|
4
|
+
[](https://opensource.org/licenses/ISC)
|
|
5
|
+
[](https://modelcontextprotocol.io)
|
|
6
|
+
|
|
7
|
+
Expose Webeyez session replays, JavaScript errors, conversion funnels, rage clicks, and performance diagnostics directly to your AI agents and assistants (Claude, Cursor, Windsurf, ChatGPT, etc.) using the Model Context Protocol (MCP).
|
|
8
|
+
|
|
9
|
+
---
|
|
4
10
|
|
|
5
11
|
## What is Webeyez?
|
|
6
|
-
Webeyez is a comprehensive real-time user experience monitoring and diagnostic platform that helps online businesses detect, investigate, and resolve issues impacting their users. By tracking user friction, client-side errors, and drop-offs, Webeyez pinpoints exact conversion and revenue leaks.
|
|
7
12
|
|
|
8
|
-
**
|
|
13
|
+
**Webeyez** is a real-time user experience monitoring, conversion optimization, and error diagnostics platform. It helps online businesses identify and resolve conversion leaks, user friction, client-side bugs, and performance anomalies.
|
|
14
|
+
|
|
15
|
+
The **Webeyez MCP Server** bridges your local AI tools directly to the Webeyez diagnostics engine. It is implemented as a **secure proxy client**, meaning the server runs safely on Webeyez infrastructure to protect your data and proprietary logic, while the local NPM package serves as a lightweight, secure gateway.
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## When to Use the Webeyez MCP Server
|
|
20
|
+
|
|
21
|
+
Use this MCP server when you want your AI developer agent or assistant to:
|
|
22
|
+
* **Debug Client-Side Bugs:** Retrieve JS console logs, stack traces, and uncaught exceptions for a user session or globally.
|
|
23
|
+
* **Diagnose Network Failures:** Analyze failed HTTP/AJAX requests (4xx/5xx errors) on your web applications.
|
|
24
|
+
* **Identify Friction & Rage Clicks:** Search user sessions containing Dead Clicks, Rage Clicks, or other frustration signals.
|
|
25
|
+
* **Analyze Funnel Drops:** Diagnose why conversion rates dropped during checkout or specific funnels.
|
|
26
|
+
* **Quantify Revenue Loss:** Retrieve estimates of business impact caused by bugs and performance drop-offs.
|
|
27
|
+
* **Inspect Session Replays:** Retrieve links to actual user session replays matching specific error criteria to witness user frustration firsthand.
|
|
9
28
|
|
|
10
|
-
|
|
29
|
+
---
|
|
11
30
|
|
|
12
31
|
## Installation
|
|
13
32
|
|
|
33
|
+
You do not need to install the server globally. The package can be run directly using `npx`:
|
|
34
|
+
|
|
14
35
|
```bash
|
|
15
|
-
|
|
36
|
+
npx -y @webeyez/mcp-server
|
|
16
37
|
```
|
|
17
38
|
|
|
39
|
+
---
|
|
40
|
+
|
|
18
41
|
## Connection Setup
|
|
19
42
|
|
|
20
|
-
The Webeyez MCP server supports both
|
|
43
|
+
The Webeyez MCP server supports both standard local `stdio` connection (using our NPM package as a secure proxy) and direct web-based SSE connections.
|
|
44
|
+
|
|
45
|
+
### Option 1: Claude Desktop Configuration (Local stdio Proxy)
|
|
21
46
|
|
|
22
|
-
|
|
23
|
-
Register the server as a custom connector in web-based clients:
|
|
24
|
-
1. Go to **Settings > Connectors > Add custom connector** (or equivalent in your AI client).
|
|
25
|
-
2. Enter the connector URL: `https://api.app.webeyez.com/mcp`
|
|
26
|
-
3. Log in with your Webeyez credentials when prompted.
|
|
47
|
+
Add the server to your `claude_desktop_config.json` configuration file:
|
|
27
48
|
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
* **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
50
|
+
* **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
30
51
|
|
|
31
|
-
#### For Claude Desktop:
|
|
32
|
-
Configure your `claude_desktop_config.json`:
|
|
33
52
|
```json
|
|
34
53
|
{
|
|
35
54
|
"mcpServers": {
|
|
@@ -37,48 +56,72 @@ Configure your `claude_desktop_config.json`:
|
|
|
37
56
|
"command": "npx",
|
|
38
57
|
"args": [
|
|
39
58
|
"-y",
|
|
40
|
-
"mcp-
|
|
41
|
-
|
|
42
|
-
|
|
59
|
+
"@webeyez/mcp-server"
|
|
60
|
+
],
|
|
61
|
+
"env": {
|
|
62
|
+
"WEBEYEZ_API_KEY": "your_webeyez_api_token_here"
|
|
63
|
+
}
|
|
43
64
|
}
|
|
44
65
|
}
|
|
45
66
|
}
|
|
46
67
|
```
|
|
47
68
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
69
|
+
### Option 2: IDE / Editor Configuration (Cursor, Windsurf, Cline)
|
|
70
|
+
|
|
71
|
+
Configure your editor to run the MCP proxy as a shell command:
|
|
72
|
+
|
|
73
|
+
1. Open your editor's **Settings > Features > MCP** (or equivalent).
|
|
74
|
+
2. Add a new MCP server with type `command`.
|
|
75
|
+
3. Set the command to:
|
|
54
76
|
```bash
|
|
55
|
-
npx -y
|
|
77
|
+
npx -y @webeyez/mcp-server
|
|
56
78
|
```
|
|
79
|
+
4. Define the environment variable:
|
|
80
|
+
* **Key:** `WEBEYEZ_API_KEY`
|
|
81
|
+
* **Value:** *[Your personal access token/API key]*
|
|
82
|
+
|
|
83
|
+
### Option 3: Remote Server-Sent Events (SSE)
|
|
84
|
+
Web-based clients and custom applications can connect directly to the Webeyez SSE endpoint without any local installation:
|
|
85
|
+
* **SSE Endpoint:** `https://api.app.webeyez.com/mcp`
|
|
86
|
+
* **Authentication:** Pass your token in the `x-api-key` header or as a `token` URL query parameter.
|
|
87
|
+
|
|
88
|
+
---
|
|
57
89
|
|
|
58
90
|
## Available Tools
|
|
59
91
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
### Core AI Query Tools
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
|
|
69
|
-
### Direct Resource
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
* `
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
92
|
+
The following tools are exposed by the server for AI agents to query:
|
|
93
|
+
|
|
94
|
+
### 1. Core AI Query Tools
|
|
95
|
+
* **`start_webeyez_query`**: Starts a long-running natural language query against the Webeyez diagnostics engine. Use this to ask questions about your session data, checkout friction, JS errors, or conversion drop-offs.
|
|
96
|
+
* **`check_webeyez_status`**: Polls the status and retrieves the final text answer/response of a query started with `start_webeyez_query`.
|
|
97
|
+
* **`get_organizations_list`**: Lists all Webeyez organizations you have access to (along with their `organizationId`s).
|
|
98
|
+
* **`get_organization_domains`**: Lists all registered domains for a specific organization.
|
|
99
|
+
* **`logout_webeyez`**: Safely clears connection state and credentials.
|
|
100
|
+
|
|
101
|
+
### 2. Direct Resource Diagnostics
|
|
102
|
+
* **`get_js_errors`**: Returns client-side JavaScript console errors, occurrences, and stack traces.
|
|
103
|
+
* **`get_failed_api_calls`**: Lists failed HTTP/network requests (AJAX/Fetch returning 4xx or 5xx).
|
|
104
|
+
* **`get_session_examples`**: Retrieves recorded user session replay links matching specific filters.
|
|
105
|
+
* **`get_funnel_summary`**: Retrieves conversion rates and drop-off summaries for configured funnels.
|
|
106
|
+
* **`get_checkout_dropoffs`**: Returns checkout funnel friction details.
|
|
107
|
+
* **`get_revenue_loss_estimate`**: Returns estimated revenue impact caused by conversion drop-offs or errors.
|
|
108
|
+
* **`list_accounts` / `list_sites`**: Helper tools to retrieve accessible accounts and sites.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Environment Variables
|
|
113
|
+
|
|
114
|
+
* **`WEBEYEZ_API_KEY`** (Required): Your personal API Key or Personal Access Token (PAT).
|
|
115
|
+
* **`WEBEYEZ_MCP_URL`** (Optional): Overrides the default hosted Webeyez MCP gateway endpoint (default: `https://api.app.webeyez.com/mcp`).
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Security & Architecture
|
|
120
|
+
|
|
121
|
+
The Webeyez MCP server uses a **secure hybrid model**:
|
|
122
|
+
1. **Lightweight Gateway:** The NPM package published is a transparent proxy. It doesn't contain any local business logic or database drivers, preventing intellectual property exposure.
|
|
123
|
+
2. **Standard stdin/stdout:** The proxy listens to standard streams, ensuring 100% compatibility with all standard MCP hosts (e.g. Claude Desktop, Cursor).
|
|
124
|
+
3. **Encrypted HTTPS/SSE Tunnel:** Messages are securely routed from the proxy over TLS to the hosted Webeyez endpoints where authentication and query processing take place.
|
|
82
125
|
|
|
83
126
|
## License
|
|
84
|
-
ISC License
|
|
127
|
+
ISC License.
|
package/dist/client.js
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
const eventsource_1 = require("eventsource");
|
|
8
|
+
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
9
|
+
const readline_1 = __importDefault(require("readline"));
|
|
10
|
+
const mcpUrl = process.env.WEBEYEZ_MCP_URL || 'https://api.app.webeyez.com/mcp';
|
|
11
|
+
const apiKey = process.env.WEBEYEZ_API_KEY || process.env.WEBEYEZ_TOKEN || process.env.WEBEYEZ_PAT;
|
|
12
|
+
if (!apiKey) {
|
|
13
|
+
console.error('Error: WEBEYEZ_API_KEY environment variable is not set.');
|
|
14
|
+
console.error('\nTo use the Webeyez MCP Server locally, you must provide your API Key.');
|
|
15
|
+
console.error('Please configure your client config file (e.g., claude_desktop_config.json) as follows:');
|
|
16
|
+
console.error(JSON.stringify({
|
|
17
|
+
mcpServers: {
|
|
18
|
+
webeyez: {
|
|
19
|
+
command: "npx",
|
|
20
|
+
args: ["-y", "@webeyez/mcp-server"],
|
|
21
|
+
env: {
|
|
22
|
+
WEBEYEZ_API_KEY: "YOUR_WEBEYEZ_API_KEY_HERE"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, null, 2));
|
|
27
|
+
process.exit(1);
|
|
28
|
+
}
|
|
29
|
+
// Prepare URL with credentials query parameter as fallback for some HTTP proxies
|
|
30
|
+
const url = new URL(mcpUrl);
|
|
31
|
+
url.searchParams.set('token', apiKey);
|
|
32
|
+
const es = new eventsource_1.EventSource(url.toString(), {
|
|
33
|
+
headers: {
|
|
34
|
+
'x-api-key': apiKey,
|
|
35
|
+
'Authorization': `Bearer ${apiKey}`
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
let postUrl = null;
|
|
39
|
+
const pendingMessages = [];
|
|
40
|
+
es.addEventListener('endpoint', (event) => {
|
|
41
|
+
const endpointUri = event.data;
|
|
42
|
+
if (endpointUri.startsWith('http://') || endpointUri.startsWith('https://')) {
|
|
43
|
+
postUrl = endpointUri;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
const base = new URL(mcpUrl);
|
|
47
|
+
postUrl = new URL(endpointUri, base).toString();
|
|
48
|
+
}
|
|
49
|
+
// Flush any messages received from stdin before the SSE stream was fully established
|
|
50
|
+
while (pendingMessages.length > 0) {
|
|
51
|
+
const msg = pendingMessages.shift();
|
|
52
|
+
if (msg) {
|
|
53
|
+
sendPost(msg);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
es.addEventListener('message', (event) => {
|
|
58
|
+
// Write message data directly to stdout for the local LLM client
|
|
59
|
+
console.log(event.data);
|
|
60
|
+
});
|
|
61
|
+
es.onerror = (err) => {
|
|
62
|
+
console.error('Webeyez MCP connection error:', err);
|
|
63
|
+
};
|
|
64
|
+
const rl = readline_1.default.createInterface({
|
|
65
|
+
input: process.stdin,
|
|
66
|
+
output: process.stdout,
|
|
67
|
+
terminal: false
|
|
68
|
+
});
|
|
69
|
+
rl.on('line', (line) => {
|
|
70
|
+
const trimmed = line.trim();
|
|
71
|
+
if (!trimmed)
|
|
72
|
+
return;
|
|
73
|
+
if (postUrl) {
|
|
74
|
+
sendPost(trimmed);
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
pendingMessages.push(trimmed);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
async function sendPost(messageStr) {
|
|
81
|
+
if (!postUrl)
|
|
82
|
+
return;
|
|
83
|
+
try {
|
|
84
|
+
const response = await (0, node_fetch_1.default)(postUrl, {
|
|
85
|
+
method: 'POST',
|
|
86
|
+
headers: {
|
|
87
|
+
'Content-Type': 'application/json',
|
|
88
|
+
'x-api-key': apiKey,
|
|
89
|
+
'Authorization': `Bearer ${apiKey}`
|
|
90
|
+
},
|
|
91
|
+
body: messageStr
|
|
92
|
+
});
|
|
93
|
+
if (!response.ok) {
|
|
94
|
+
const errText = await response.text();
|
|
95
|
+
console.error(`HTTP error posting message: ${response.status} ${response.statusText} - ${errText}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
catch (error) {
|
|
99
|
+
console.error('Network error posting message:', error);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
// Graceful cleanup
|
|
103
|
+
const cleanup = () => {
|
|
104
|
+
es.close();
|
|
105
|
+
process.exit(0);
|
|
106
|
+
};
|
|
107
|
+
process.on('SIGINT', cleanup);
|
|
108
|
+
process.on('SIGTERM', cleanup);
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webeyez/mcp-server",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"mcpName": "io.github.ShaharAlbag/webeyez-mcp-server",
|
|
5
|
-
"main": "dist/
|
|
5
|
+
"main": "dist/client.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"webeyez-mcp-server": "./dist/client.js"
|
|
8
|
+
},
|
|
6
9
|
"files": [
|
|
7
|
-
"dist"
|
|
10
|
+
"dist/client.js"
|
|
8
11
|
],
|
|
9
12
|
"scripts": {
|
|
10
13
|
"build": "tsc && cp src/tools/*.proto dist/tools/",
|