cbrowser 18.63.0 → 18.63.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/package.json +1 -1
- package/docs/ASSESSMENT.md +0 -132
- package/docs/AUTH0-SETUP.md +0 -207
- package/docs/COGNITIVE-OPTIMAL-TRANSPORT-RESEARCH.md +0 -238
- package/docs/DEMO-DEPLOYMENT.md +0 -177
- package/docs/ENTERPRISE-INTEGRATION.md +0 -250
- package/docs/GETTING-STARTED.md +0 -232
- package/docs/INSTALL.md +0 -274
- package/docs/MCP-INTEGRATION.md +0 -301
- package/docs/METHODOLOGY.md +0 -276
- package/docs/PERSONA-QUESTIONNAIRE.md +0 -328
- package/docs/README.md +0 -45
- package/docs/REMOTE-MCP-SERVER.md +0 -569
- package/docs/SECURITY_WHITEPAPER.md +0 -475
- package/docs/STRESS-TEST-v16.14.4.md +0 -241
- package/docs/Tool-Cognitive-Journey-Autonomous.md +0 -270
- package/docs/Tool-Competitive-Benchmark.md +0 -293
- package/docs/Tool-Empathy-Audit.md +0 -331
- package/docs/Tool-Hunt-Bugs.md +0 -305
- package/docs/Tool-Marketing-Campaign.md +0 -298
- package/docs/Tool-Persona-Create.md +0 -274
- package/docs/Tools-Accessibility.md +0 -208
- package/docs/Tools-Browser-Automation.md +0 -311
- package/docs/Tools-Cognitive-Journeys.md +0 -233
- package/docs/Tools-Marketing-Intelligence.md +0 -271
- package/docs/Tools-Overview.md +0 -162
- package/docs/Tools-Persona-System.md +0 -300
- package/docs/Tools-Session-State.md +0 -278
- package/docs/Tools-Testing-Quality.md +0 -257
- package/docs/Tools-Utilities.md +0 -182
- package/docs/Tools-Visual-Performance.md +0 -278
- package/docs/hunt-bugs-coverage.md +0 -103
- package/docs/personas/Persona-ADHD.md +0 -141
- package/docs/personas/Persona-ElderlyUser.md +0 -137
- package/docs/personas/Persona-FirstTimer.md +0 -137
- package/docs/personas/Persona-ImpatientUser.md +0 -138
- package/docs/personas/Persona-Index.md +0 -302
- package/docs/personas/Persona-LowVision.md +0 -139
- package/docs/personas/Persona-MobileUser.md +0 -139
- package/docs/personas/Persona-MotorTremor.md +0 -139
- package/docs/personas/Persona-PowerUser.md +0 -135
- package/docs/personas/Persona-ScreenReaderUser.md +0 -139
- package/docs/research/Bibliography.md +0 -275
- package/docs/research/Research-Methodology.md +0 -244
- package/docs/research/Values-Research.md +0 -432
- package/docs/traits/Trait-AnchoringBias.md +0 -227
- package/docs/traits/Trait-AttributionStyle.md +0 -280
- package/docs/traits/Trait-AuthoritySensitivity.md +0 -141
- package/docs/traits/Trait-ChangeBlindness.md +0 -171
- package/docs/traits/Trait-Comprehension.md +0 -180
- package/docs/traits/Trait-Curiosity.md +0 -189
- package/docs/traits/Trait-EmotionalContagion.md +0 -144
- package/docs/traits/Trait-FOMO.md +0 -150
- package/docs/traits/Trait-Index.md +0 -166
- package/docs/traits/Trait-InformationForaging.md +0 -217
- package/docs/traits/Trait-InterruptRecovery.md +0 -249
- package/docs/traits/Trait-MentalModelRigidity.md +0 -228
- package/docs/traits/Trait-MetacognitivePlanning.md +0 -164
- package/docs/traits/Trait-Patience.md +0 -137
- package/docs/traits/Trait-Persistence.md +0 -165
- package/docs/traits/Trait-ProceduralFluency.md +0 -205
- package/docs/traits/Trait-ReadingTendency.md +0 -216
- package/docs/traits/Trait-Resilience.md +0 -162
- package/docs/traits/Trait-RiskTolerance.md +0 -162
- package/docs/traits/Trait-Satisficing.md +0 -181
- package/docs/traits/Trait-SelfEfficacy.md +0 -199
- package/docs/traits/Trait-SocialProofSensitivity.md +0 -155
- package/docs/traits/Trait-TimeHorizon.md +0 -267
- package/docs/traits/Trait-TransferLearning.md +0 -249
- package/docs/traits/Trait-TrustCalibration.md +0 -227
- package/docs/traits/Trait-WorkingMemory.md +0 -192
|
@@ -1,569 +0,0 @@
|
|
|
1
|
-
> **This documentation is no longer maintained here.**
|
|
2
|
-
>
|
|
3
|
-
> For the latest version, please visit: **[Remote MCP Server Deployment Guide](https://cbrowser.ai/docs/REMOTE-MCP-SERVER)**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Remote MCP Server Deployment Guide
|
|
8
|
-
|
|
9
|
-
Deploy CBrowser (Cognitive Browser) as a remote MCP server for claude.ai custom connectors. This allows your entire team to use CBrowser through Claude without local installation.
|
|
10
|
-
|
|
11
|
-
## Architecture Overview
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
┌─────────────────┐ HTTPS ┌─────────────────┐ HTTP ┌─────────────────┐
|
|
15
|
-
│ claude.ai │ ──────────────>│ Nginx/Caddy │ ────────────> │ CBrowser MCP │
|
|
16
|
-
│ (Custom MCP) │ :443 │ Reverse Proxy │ :3100 │ Server │
|
|
17
|
-
└─────────────────┘ └─────────────────┘ └─────────────────┘
|
|
18
|
-
│
|
|
19
|
-
┌──────┴──────┐
|
|
20
|
-
│ Cloudflare │ (optional)
|
|
21
|
-
│ or SSL │
|
|
22
|
-
└─────────────┘
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
## Prerequisites
|
|
26
|
-
|
|
27
|
-
### System Requirements
|
|
28
|
-
|
|
29
|
-
| Requirement | Minimum | Recommended |
|
|
30
|
-
|-------------|---------|-------------|
|
|
31
|
-
| **OS** | Ubuntu 20.04+ / Debian 11+ | Ubuntu 22.04 LTS |
|
|
32
|
-
| **RAM** | 2 GB | 4 GB |
|
|
33
|
-
| **CPU** | 2 cores | 4 cores |
|
|
34
|
-
| **Storage** | 10 GB | 20 GB |
|
|
35
|
-
| **Node.js** | 18.x | 20.x LTS |
|
|
36
|
-
|
|
37
|
-
### Required Software
|
|
38
|
-
|
|
39
|
-
```bash
|
|
40
|
-
# Update system
|
|
41
|
-
sudo apt update && sudo apt upgrade -y
|
|
42
|
-
|
|
43
|
-
# Install Node.js 20.x
|
|
44
|
-
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
|
|
45
|
-
sudo apt install -y nodejs
|
|
46
|
-
|
|
47
|
-
# Install nginx
|
|
48
|
-
sudo apt install -y nginx
|
|
49
|
-
|
|
50
|
-
# Verify installations
|
|
51
|
-
node --version # Should be v20.x
|
|
52
|
-
nginx -v # Should show nginx version
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Domain & DNS
|
|
56
|
-
|
|
57
|
-
You'll need:
|
|
58
|
-
- A domain name (e.g., `cbrowser-mcp.yourdomain.com`)
|
|
59
|
-
- DNS A record pointing to your server's IP
|
|
60
|
-
- SSL certificate (Let's Encrypt or Cloudflare Origin)
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
## Step 1: Install CBrowser
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
# Create application directory
|
|
68
|
-
sudo mkdir -p /opt/cbrowser
|
|
69
|
-
cd /opt/cbrowser
|
|
70
|
-
|
|
71
|
-
# Install CBrowser globally or locally
|
|
72
|
-
npm init -y
|
|
73
|
-
npm install cbrowser
|
|
74
|
-
|
|
75
|
-
# Install Playwright browsers
|
|
76
|
-
npx playwright install chromium firefox webkit
|
|
77
|
-
npx playwright install-deps # Install system dependencies
|
|
78
|
-
|
|
79
|
-
# Create data directory
|
|
80
|
-
sudo mkdir -p /home/$USER/.cbrowser/{sessions,screenshots,videos,har,personas,scenarios,helpers,audit,baselines,browser-state,cache,journeys,performance,visual,tests,repairs,config,visual-baselines,cross-browser,responsive,ab-comparison}
|
|
81
|
-
sudo chown -R $USER:$USER /home/$USER/.cbrowser
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
---
|
|
85
|
-
|
|
86
|
-
## Step 2: Create Systemd Service
|
|
87
|
-
|
|
88
|
-
Create the service file:
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
sudo nano /etc/systemd/system/cbrowser-mcp.service
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Paste this configuration:
|
|
95
|
-
|
|
96
|
-
```ini
|
|
97
|
-
[Unit]
|
|
98
|
-
Description=CBrowser Remote MCP Server
|
|
99
|
-
After=network.target
|
|
100
|
-
|
|
101
|
-
[Service]
|
|
102
|
-
Type=simple
|
|
103
|
-
User=YOUR_USERNAME
|
|
104
|
-
Group=YOUR_GROUP
|
|
105
|
-
WorkingDirectory=/opt/cbrowser
|
|
106
|
-
|
|
107
|
-
# Create data directories on startup
|
|
108
|
-
ExecStartPre=/bin/bash -c 'mkdir -p /home/YOUR_USERNAME/.cbrowser/{sessions,screenshots,videos,har,personas,scenarios,helpers,audit,baselines,browser-state,cache,journeys,performance,visual,tests,repairs,config,visual-baselines,cross-browser,responsive,ab-comparison}'
|
|
109
|
-
|
|
110
|
-
# Start the MCP server
|
|
111
|
-
ExecStart=/usr/bin/node node_modules/cbrowser/dist/mcp-server-remote.js
|
|
112
|
-
|
|
113
|
-
Restart=on-failure
|
|
114
|
-
RestartSec=5
|
|
115
|
-
|
|
116
|
-
# Environment
|
|
117
|
-
Environment=NODE_ENV=production
|
|
118
|
-
Environment=PORT=3100
|
|
119
|
-
Environment=HOST=127.0.0.1
|
|
120
|
-
Environment=MCP_SESSION_MODE=stateless
|
|
121
|
-
Environment=CBROWSER_DATA_DIR=/home/YOUR_USERNAME/.cbrowser
|
|
122
|
-
|
|
123
|
-
# Authentication (optional - remove to allow open access)
|
|
124
|
-
# Generate a secure key: openssl rand -hex 32
|
|
125
|
-
Environment=MCP_API_KEY=your-secure-api-key-here
|
|
126
|
-
# Or use multiple keys: Environment=MCP_API_KEYS=key1,key2,key3
|
|
127
|
-
|
|
128
|
-
# Security hardening (optional but recommended)
|
|
129
|
-
NoNewPrivileges=yes
|
|
130
|
-
ProtectSystem=strict
|
|
131
|
-
ProtectHome=read-only
|
|
132
|
-
PrivateTmp=yes
|
|
133
|
-
ReadWritePaths=/opt/cbrowser /home/YOUR_USERNAME/.cbrowser /home/YOUR_USERNAME/.cache/ms-playwright
|
|
134
|
-
|
|
135
|
-
[Install]
|
|
136
|
-
WantedBy=multi-user.target
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
**Important:** Replace `YOUR_USERNAME` and `YOUR_GROUP` with your actual user/group.
|
|
140
|
-
|
|
141
|
-
Enable and start the service:
|
|
142
|
-
|
|
143
|
-
```bash
|
|
144
|
-
# Reload systemd
|
|
145
|
-
sudo systemctl daemon-reload
|
|
146
|
-
|
|
147
|
-
# Enable on boot
|
|
148
|
-
sudo systemctl enable cbrowser-mcp
|
|
149
|
-
|
|
150
|
-
# Start the service
|
|
151
|
-
sudo systemctl start cbrowser-mcp
|
|
152
|
-
|
|
153
|
-
# Check status
|
|
154
|
-
sudo systemctl status cbrowser-mcp
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
Verify it's running:
|
|
158
|
-
|
|
159
|
-
```bash
|
|
160
|
-
curl http://localhost:3100/health
|
|
161
|
-
# Should return: {"status":"ok","version":"7.x.x"}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Step 3: Configure Nginx Reverse Proxy
|
|
167
|
-
|
|
168
|
-
Create nginx configuration:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
sudo nano /etc/nginx/sites-available/cbrowser-mcp.conf
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
### Option A: With Cloudflare (Recommended)
|
|
175
|
-
|
|
176
|
-
```nginx
|
|
177
|
-
# HTTP redirect to HTTPS
|
|
178
|
-
server {
|
|
179
|
-
listen 80;
|
|
180
|
-
listen [::]:80;
|
|
181
|
-
server_name cbrowser-mcp.yourdomain.com;
|
|
182
|
-
return 301 https://$server_name$request_uri;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
# HTTPS with Cloudflare Origin Certificate
|
|
186
|
-
server {
|
|
187
|
-
listen 443 ssl http2;
|
|
188
|
-
listen [::]:443 ssl http2;
|
|
189
|
-
server_name cbrowser-mcp.yourdomain.com;
|
|
190
|
-
|
|
191
|
-
# Cloudflare Origin Certificate
|
|
192
|
-
ssl_certificate /etc/ssl/certs/yourdomain-origin.pem;
|
|
193
|
-
ssl_certificate_key /etc/ssl/private/yourdomain-origin.key;
|
|
194
|
-
|
|
195
|
-
# SSL security settings
|
|
196
|
-
ssl_protocols TLSv1.2 TLSv1.3;
|
|
197
|
-
ssl_prefer_server_ciphers on;
|
|
198
|
-
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
|
|
199
|
-
|
|
200
|
-
# Reverse proxy to MCP server
|
|
201
|
-
location / {
|
|
202
|
-
proxy_pass http://127.0.0.1:3100;
|
|
203
|
-
proxy_http_version 1.1;
|
|
204
|
-
|
|
205
|
-
# WebSocket/SSE support for MCP
|
|
206
|
-
proxy_set_header Upgrade $http_upgrade;
|
|
207
|
-
proxy_set_header Connection "upgrade";
|
|
208
|
-
|
|
209
|
-
# Standard proxy headers
|
|
210
|
-
proxy_set_header Host $host;
|
|
211
|
-
proxy_set_header X-Real-IP $remote_addr;
|
|
212
|
-
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
213
|
-
proxy_set_header X-Forwarded-Proto $scheme;
|
|
214
|
-
|
|
215
|
-
# Extended timeouts for long-running MCP operations
|
|
216
|
-
proxy_connect_timeout 300s;
|
|
217
|
-
proxy_send_timeout 300s;
|
|
218
|
-
proxy_read_timeout 300s;
|
|
219
|
-
|
|
220
|
-
# Disable buffering for SSE
|
|
221
|
-
proxy_buffering off;
|
|
222
|
-
proxy_cache off;
|
|
223
|
-
|
|
224
|
-
# MCP session header passthrough
|
|
225
|
-
proxy_pass_header Mcp-Session-Id;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
# Logging
|
|
229
|
-
access_log /var/log/nginx/cbrowser-mcp.access.log;
|
|
230
|
-
error_log /var/log/nginx/cbrowser-mcp.error.log;
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
### Option B: With Let's Encrypt
|
|
235
|
-
|
|
236
|
-
```bash
|
|
237
|
-
# Install Certbot
|
|
238
|
-
sudo apt install certbot python3-certbot-nginx
|
|
239
|
-
|
|
240
|
-
# Get certificate
|
|
241
|
-
sudo certbot --nginx -d cbrowser-mcp.yourdomain.com
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
Enable the site:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
# Enable site
|
|
248
|
-
sudo ln -s /etc/nginx/sites-available/cbrowser-mcp.conf /etc/nginx/sites-enabled/
|
|
249
|
-
|
|
250
|
-
# Test configuration
|
|
251
|
-
sudo nginx -t
|
|
252
|
-
|
|
253
|
-
# Reload nginx
|
|
254
|
-
sudo systemctl reload nginx
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
---
|
|
258
|
-
|
|
259
|
-
## Step 4: Cloudflare Configuration (Optional)
|
|
260
|
-
|
|
261
|
-
If using Cloudflare:
|
|
262
|
-
|
|
263
|
-
### DNS Settings
|
|
264
|
-
|
|
265
|
-
1. Add an **A record**:
|
|
266
|
-
- Name: `cbrowser-mcp`
|
|
267
|
-
- IPv4 address: Your server IP
|
|
268
|
-
- Proxy status: **Proxied** (orange cloud)
|
|
269
|
-
|
|
270
|
-
### SSL/TLS Settings
|
|
271
|
-
|
|
272
|
-
1. Go to **SSL/TLS → Overview**
|
|
273
|
-
2. Set encryption mode to **Full (strict)**
|
|
274
|
-
|
|
275
|
-
### Origin Certificates
|
|
276
|
-
|
|
277
|
-
1. Go to **SSL/TLS → Origin Server**
|
|
278
|
-
2. Click **Create Certificate**
|
|
279
|
-
3. Generate with:
|
|
280
|
-
- Key type: RSA (2048)
|
|
281
|
-
- Hostnames: `cbrowser-mcp.yourdomain.com`
|
|
282
|
-
- Validity: 15 years
|
|
283
|
-
4. Download and save:
|
|
284
|
-
- Certificate → `/etc/ssl/certs/yourdomain-origin.pem`
|
|
285
|
-
- Private key → `/etc/ssl/private/yourdomain-origin.key`
|
|
286
|
-
|
|
287
|
-
### Page Rules (Recommended)
|
|
288
|
-
|
|
289
|
-
Create a page rule to bypass caching:
|
|
290
|
-
|
|
291
|
-
1. Go to **Rules → Page Rules**
|
|
292
|
-
2. Create rule:
|
|
293
|
-
- URL: `cbrowser-mcp.yourdomain.com/*`
|
|
294
|
-
- Setting: **Cache Level → Bypass**
|
|
295
|
-
|
|
296
|
-
---
|
|
297
|
-
|
|
298
|
-
## Step 5: Test the Deployment
|
|
299
|
-
|
|
300
|
-
### Health Check
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
curl https://cbrowser-mcp.yourdomain.com/health
|
|
304
|
-
# {"status":"ok","version":"7.4.6","auth":true,"auth_methods":{"api_key":true,"oauth":true}}
|
|
305
|
-
```
|
|
306
|
-
|
|
307
|
-
### Info Endpoint
|
|
308
|
-
|
|
309
|
-
```bash
|
|
310
|
-
curl https://cbrowser-mcp.yourdomain.com/info
|
|
311
|
-
```
|
|
312
|
-
|
|
313
|
-
### MCP Initialize (for debugging)
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
curl -X POST https://cbrowser-mcp.yourdomain.com/mcp \
|
|
317
|
-
-H "Content-Type: application/json" \
|
|
318
|
-
-H "Accept: application/json, text/event-stream" \
|
|
319
|
-
-d '{"jsonrpc":"2.0","method":"initialize","id":1,"params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
---
|
|
323
|
-
|
|
324
|
-
## Step 6: Connect to Claude.ai
|
|
325
|
-
|
|
326
|
-
### Option A: With Auth0 OAuth (Recommended for production)
|
|
327
|
-
|
|
328
|
-
For secure authentication with claude.ai, set up Auth0 OAuth:
|
|
329
|
-
|
|
330
|
-
1. See the [Auth0 Setup Guide](AUTH0-SETUP.md) to configure Auth0
|
|
331
|
-
2. Add Auth0 environment variables to your systemd service:
|
|
332
|
-
```ini
|
|
333
|
-
Environment=AUTH0_DOMAIN=your-tenant.auth0.com
|
|
334
|
-
Environment=AUTH0_AUDIENCE=https://cbrowser-mcp.yourdomain.com/
|
|
335
|
-
```
|
|
336
|
-
3. Restart the service: `sudo systemctl restart cbrowser-mcp`
|
|
337
|
-
4. Go to [claude.ai](https://claude.ai) → **Settings → Connectors**
|
|
338
|
-
5. Click **Add Custom Connector**
|
|
339
|
-
6. Enter URL: `https://cbrowser-mcp.yourdomain.com/mcp`
|
|
340
|
-
7. Enter your Auth0 **Client ID** and **Client Secret** when prompted
|
|
341
|
-
8. Complete the OAuth login flow
|
|
342
|
-
|
|
343
|
-
### Option B: Open Access (Public Demo)
|
|
344
|
-
|
|
345
|
-
For a public demo server without authentication:
|
|
346
|
-
|
|
347
|
-
1. Remove `MCP_API_KEY` from your systemd service
|
|
348
|
-
2. Remove `AUTH0_*` variables
|
|
349
|
-
3. Add rate limiting in nginx (see Security section)
|
|
350
|
-
4. Go to [claude.ai](https://claude.ai) → **Settings → Connectors**
|
|
351
|
-
5. Add URL: `https://cbrowser-mcp.yourdomain.com/mcp`
|
|
352
|
-
|
|
353
|
-
You should see 40 CBrowser tools become available in Claude.
|
|
354
|
-
|
|
355
|
-
---
|
|
356
|
-
|
|
357
|
-
## Security Considerations
|
|
358
|
-
|
|
359
|
-
### Firewall Rules
|
|
360
|
-
|
|
361
|
-
```bash
|
|
362
|
-
# Allow only necessary ports
|
|
363
|
-
sudo ufw allow 22/tcp # SSH
|
|
364
|
-
sudo ufw allow 80/tcp # HTTP (redirect)
|
|
365
|
-
sudo ufw allow 443/tcp # HTTPS
|
|
366
|
-
sudo ufw enable
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Authentication (v7.4.6+)
|
|
370
|
-
|
|
371
|
-
CBrowser Remote MCP Server supports two authentication methods:
|
|
372
|
-
|
|
373
|
-
#### Method 1: Auth0 OAuth (for claude.ai)
|
|
374
|
-
|
|
375
|
-
Claude.ai requires OAuth 2.1 authentication. Set up Auth0:
|
|
376
|
-
|
|
377
|
-
```bash
|
|
378
|
-
# Auth0 OAuth (enables claude.ai login)
|
|
379
|
-
Environment=AUTH0_DOMAIN=your-tenant.auth0.com
|
|
380
|
-
Environment=AUTH0_AUDIENCE=https://cbrowser-mcp.yourdomain.com/
|
|
381
|
-
```
|
|
382
|
-
|
|
383
|
-
See [Auth0 Setup Guide](AUTH0-SETUP.md) for full configuration.
|
|
384
|
-
|
|
385
|
-
**OAuth Endpoints:**
|
|
386
|
-
- `/.well-known/oauth-protected-resource` - OAuth metadata discovery
|
|
387
|
-
- `/mcp` - MCP endpoint (requires valid JWT)
|
|
388
|
-
|
|
389
|
-
#### Method 2: API Key (for Claude Code CLI)
|
|
390
|
-
|
|
391
|
-
For programmatic access and Claude Code CLI:
|
|
392
|
-
|
|
393
|
-
```bash
|
|
394
|
-
# Single API key
|
|
395
|
-
Environment=MCP_API_KEY=your-secure-key
|
|
396
|
-
|
|
397
|
-
# Multiple API keys (for different users/services)
|
|
398
|
-
Environment=MCP_API_KEYS=user1-key,user2-key,service-key
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
**Generate a secure key:**
|
|
402
|
-
|
|
403
|
-
```bash
|
|
404
|
-
openssl rand -hex 32
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
**Client usage:**
|
|
408
|
-
|
|
409
|
-
```bash
|
|
410
|
-
# Bearer token (recommended)
|
|
411
|
-
curl -H "Authorization: Bearer your-api-key" https://your-server/mcp
|
|
412
|
-
|
|
413
|
-
# X-API-Key header (alternative)
|
|
414
|
-
curl -H "X-API-Key: your-api-key" https://your-server/mcp
|
|
415
|
-
```
|
|
416
|
-
|
|
417
|
-
#### Dual Authentication
|
|
418
|
-
|
|
419
|
-
Both methods can be enabled simultaneously:
|
|
420
|
-
- **OAuth** - For claude.ai web interface
|
|
421
|
-
- **API Key** - For Claude Code CLI and scripts
|
|
422
|
-
|
|
423
|
-
**Public Endpoints (no auth required):**
|
|
424
|
-
- `/health` - Server health status
|
|
425
|
-
- `/info` - Server information
|
|
426
|
-
- `/.well-known/oauth-protected-resource` - OAuth metadata
|
|
427
|
-
|
|
428
|
-
**Protected Endpoints:**
|
|
429
|
-
- `/mcp` - MCP endpoint (requires valid auth)
|
|
430
|
-
|
|
431
|
-
### Rate Limiting
|
|
432
|
-
|
|
433
|
-
Add to nginx config:
|
|
434
|
-
|
|
435
|
-
```nginx
|
|
436
|
-
# In http block of /etc/nginx/nginx.conf
|
|
437
|
-
limit_req_zone $binary_remote_addr zone=mcp:10m rate=10r/s;
|
|
438
|
-
|
|
439
|
-
# In server block
|
|
440
|
-
location / {
|
|
441
|
-
limit_req zone=mcp burst=20 nodelay;
|
|
442
|
-
# ... rest of config
|
|
443
|
-
}
|
|
444
|
-
```
|
|
445
|
-
|
|
446
|
-
---
|
|
447
|
-
|
|
448
|
-
## Monitoring
|
|
449
|
-
|
|
450
|
-
### View Logs
|
|
451
|
-
|
|
452
|
-
```bash
|
|
453
|
-
# Service logs
|
|
454
|
-
sudo journalctl -u cbrowser-mcp -f
|
|
455
|
-
|
|
456
|
-
# Nginx access logs
|
|
457
|
-
sudo tail -f /var/log/nginx/cbrowser-mcp.access.log
|
|
458
|
-
|
|
459
|
-
# Nginx error logs
|
|
460
|
-
sudo tail -f /var/log/nginx/cbrowser-mcp.error.log
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
### Health Check Script
|
|
464
|
-
|
|
465
|
-
Create `/opt/cbrowser/healthcheck.sh`:
|
|
466
|
-
|
|
467
|
-
```bash
|
|
468
|
-
#!/bin/bash
|
|
469
|
-
response=$(curl -s -o /dev/null -w "%{http_code}" http://localhost:3100/health)
|
|
470
|
-
if [ "$response" != "200" ]; then
|
|
471
|
-
echo "CBrowser MCP unhealthy, restarting..."
|
|
472
|
-
sudo systemctl restart cbrowser-mcp
|
|
473
|
-
fi
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
Add to cron:
|
|
477
|
-
|
|
478
|
-
```bash
|
|
479
|
-
# Run every 5 minutes
|
|
480
|
-
*/5 * * * * /opt/cbrowser/healthcheck.sh
|
|
481
|
-
```
|
|
482
|
-
|
|
483
|
-
---
|
|
484
|
-
|
|
485
|
-
## Troubleshooting
|
|
486
|
-
|
|
487
|
-
### Service Won't Start
|
|
488
|
-
|
|
489
|
-
```bash
|
|
490
|
-
# Check logs
|
|
491
|
-
sudo journalctl -u cbrowser-mcp -n 50 --no-pager
|
|
492
|
-
|
|
493
|
-
# Common fixes:
|
|
494
|
-
# 1. Permission issues
|
|
495
|
-
sudo chown -R $USER:$USER /home/$USER/.cbrowser
|
|
496
|
-
sudo chmod -R 755 /home/$USER/.cbrowser
|
|
497
|
-
|
|
498
|
-
# 2. Missing Playwright browsers
|
|
499
|
-
cd /opt/cbrowser && npx playwright install
|
|
500
|
-
|
|
501
|
-
# 3. Port already in use
|
|
502
|
-
sudo lsof -i :3100
|
|
503
|
-
```
|
|
504
|
-
|
|
505
|
-
### "Read-only filesystem" Error
|
|
506
|
-
|
|
507
|
-
The systemd security hardening may be too restrictive:
|
|
508
|
-
|
|
509
|
-
```bash
|
|
510
|
-
# Check ReadWritePaths includes all needed directories
|
|
511
|
-
sudo systemctl cat cbrowser-mcp | grep ReadWritePaths
|
|
512
|
-
```
|
|
513
|
-
|
|
514
|
-
### Browser Timeout Errors
|
|
515
|
-
|
|
516
|
-
```bash
|
|
517
|
-
# Install all browser dependencies
|
|
518
|
-
npx playwright install-deps
|
|
519
|
-
|
|
520
|
-
# Or install specific deps for Ubuntu
|
|
521
|
-
sudo apt install -y libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 \
|
|
522
|
-
libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \
|
|
523
|
-
libxrandr2 libgbm1 libpango-1.0-0 libcairo2 libasound2
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
### Cloudflare 522 Errors
|
|
527
|
-
|
|
528
|
-
1. Verify nginx is running: `sudo systemctl status nginx`
|
|
529
|
-
2. Check CBrowser is listening: `curl localhost:3100/health`
|
|
530
|
-
3. Check firewall allows 443: `sudo ufw status`
|
|
531
|
-
|
|
532
|
-
### MCP Connection Fails in Claude
|
|
533
|
-
|
|
534
|
-
1. Verify URL is correct: `https://your-domain/mcp` (not `/mcp/`)
|
|
535
|
-
2. Check SSL certificate: `curl -v https://your-domain/health`
|
|
536
|
-
3. Verify Accept header support (claude.ai sends `Accept: application/json, text/event-stream`)
|
|
537
|
-
|
|
538
|
-
---
|
|
539
|
-
|
|
540
|
-
## Updating CBrowser
|
|
541
|
-
|
|
542
|
-
```bash
|
|
543
|
-
# Stop service
|
|
544
|
-
sudo systemctl stop cbrowser-mcp
|
|
545
|
-
|
|
546
|
-
# Update package
|
|
547
|
-
cd /opt/cbrowser
|
|
548
|
-
npm update cbrowser
|
|
549
|
-
|
|
550
|
-
# Restart service
|
|
551
|
-
sudo systemctl start cbrowser-mcp
|
|
552
|
-
|
|
553
|
-
# Verify version
|
|
554
|
-
curl https://cbrowser-mcp.yourdomain.com/health
|
|
555
|
-
```
|
|
556
|
-
|
|
557
|
-
---
|
|
558
|
-
|
|
559
|
-
## Alternative: Docker Deployment
|
|
560
|
-
|
|
561
|
-
Coming soon. See [Docker documentation](./DOCKER.md).
|
|
562
|
-
|
|
563
|
-
---
|
|
564
|
-
|
|
565
|
-
## Getting Help
|
|
566
|
-
|
|
567
|
-
- **Issues:** [GitHub Issues](https://github.com/alexandriashai/cbrowser/issues)
|
|
568
|
-
- **Discussions:** [GitHub Discussions](https://github.com/alexandriashai/cbrowser/discussions)
|
|
569
|
-
- **Examples:** See the `deployment/` directory for reference configs
|