cbrowser 9.3.1 → 9.4.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/README.md +43 -10
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/mcp-server-remote.d.ts +1 -1
- package/dist/mcp-server-remote.js +4 -4
- package/dist/mcp-server-remote.js.map +1 -1
- package/dist/visual/responsive.js +1 -1
- package/dist/visual/responsive.js.map +1 -1
- package/docs/AUTH0-SETUP.md +5 -5
- package/docs/DEMO-DEPLOYMENT.md +171 -0
- package/docs/REMOTE-MCP-SERVER.md +2 -7
- package/examples/remote-mcp.ts +10 -36
- package/package.json +9 -5
package/examples/remote-mcp.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CBrowser
|
|
2
|
+
* CBrowser Remote MCP Server Examples
|
|
3
3
|
*
|
|
4
4
|
* Demonstrates:
|
|
5
5
|
* - Starting a remote MCP server
|
|
@@ -48,22 +48,21 @@ async function startRemoteMCPServer() {
|
|
|
48
48
|
function claudeAISetup() {
|
|
49
49
|
console.log("=== claude.ai Custom Connector Setup ===\n");
|
|
50
50
|
|
|
51
|
-
console.log("Demo Server (rate-limited, no auth):");
|
|
51
|
+
console.log("Public Demo Server (rate-limited, no auth):");
|
|
52
52
|
console.log(" URL: https://cbrowser-mcp-demo.wyldfyre.ai/mcp");
|
|
53
53
|
console.log(" Rate limit: 5 requests/minute, burst of 10");
|
|
54
54
|
console.log(" Purpose: Evaluation only\n");
|
|
55
55
|
|
|
56
|
-
console.log("
|
|
57
|
-
console.log(" URL: https://
|
|
58
|
-
console.log(" Auth: Auth0 OAuth 2.1");
|
|
59
|
-
console.log(" Rate limit: None\n");
|
|
56
|
+
console.log("Self-hosted Server (with auth):");
|
|
57
|
+
console.log(" URL: https://your-server.com/mcp");
|
|
58
|
+
console.log(" Auth: Auth0 OAuth 2.1 or API key\n");
|
|
60
59
|
|
|
61
60
|
console.log("Setup Steps:");
|
|
62
61
|
console.log(" 1. Go to claude.ai");
|
|
63
62
|
console.log(" 2. Open Settings -> Integrations -> Custom MCP Servers");
|
|
64
63
|
console.log(" 3. Add the server URL");
|
|
65
|
-
console.log(" 4. Complete OAuth login when prompted (
|
|
66
|
-
console.log(" 5. You now have
|
|
64
|
+
console.log(" 4. Complete OAuth login when prompted (if auth configured)");
|
|
65
|
+
console.log(" 5. You now have 40 browser automation tools!\n");
|
|
67
66
|
}
|
|
68
67
|
|
|
69
68
|
/**
|
|
@@ -76,34 +75,15 @@ function apiKeyAuth() {
|
|
|
76
75
|
console.log(" MCP_API_KEY=your-secret-key npx cbrowser mcp-remote\n");
|
|
77
76
|
|
|
78
77
|
console.log("Client usage (Bearer token - recommended):");
|
|
79
|
-
console.log(' curl -H "Authorization: Bearer your-api-key" https://server/mcp\n');
|
|
78
|
+
console.log(' curl -H "Authorization: Bearer your-api-key" https://your-server/mcp\n');
|
|
80
79
|
|
|
81
80
|
console.log("Client usage (X-API-Key header):");
|
|
82
|
-
console.log(' curl -H "X-API-Key: your-api-key" https://server/mcp\n');
|
|
81
|
+
console.log(' curl -H "X-API-Key: your-api-key" https://your-server/mcp\n');
|
|
83
82
|
|
|
84
83
|
console.log("Generate a secure key:");
|
|
85
84
|
console.log(" openssl rand -hex 32\n");
|
|
86
85
|
}
|
|
87
86
|
|
|
88
|
-
/**
|
|
89
|
-
* Example: OAuth Protected Resource Metadata
|
|
90
|
-
*/
|
|
91
|
-
function oauthMetadata() {
|
|
92
|
-
console.log("=== OAuth Protected Resource Metadata ===\n");
|
|
93
|
-
|
|
94
|
-
console.log("Endpoint: /.well-known/oauth-protected-resource\n");
|
|
95
|
-
|
|
96
|
-
console.log("Response example:");
|
|
97
|
-
const metadata = {
|
|
98
|
-
resource: "https://cbrowser-mcp.wyldfyre.ai",
|
|
99
|
-
authorization_servers: ["https://your-tenant.auth0.com"],
|
|
100
|
-
bearer_methods_supported: ["header"],
|
|
101
|
-
scopes_supported: ["openid", "profile", "cbrowser:read", "cbrowser:write"],
|
|
102
|
-
};
|
|
103
|
-
console.log(JSON.stringify(metadata, null, 2));
|
|
104
|
-
console.log();
|
|
105
|
-
}
|
|
106
|
-
|
|
107
87
|
/**
|
|
108
88
|
* Example: Health Check
|
|
109
89
|
*/
|
|
@@ -115,12 +95,7 @@ function healthCheck() {
|
|
|
115
95
|
console.log("Response example:");
|
|
116
96
|
const health = {
|
|
117
97
|
status: "ok",
|
|
118
|
-
version: "
|
|
119
|
-
auth: true,
|
|
120
|
-
auth_methods: {
|
|
121
|
-
api_key: true,
|
|
122
|
-
oauth: true,
|
|
123
|
-
},
|
|
98
|
+
version: "9.3.0",
|
|
124
99
|
};
|
|
125
100
|
console.log(JSON.stringify(health, null, 2));
|
|
126
101
|
console.log();
|
|
@@ -130,7 +105,6 @@ async function main() {
|
|
|
130
105
|
await startRemoteMCPServer();
|
|
131
106
|
claudeAISetup();
|
|
132
107
|
apiKeyAuth();
|
|
133
|
-
oauthMetadata();
|
|
134
108
|
healthCheck();
|
|
135
109
|
}
|
|
136
110
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cbrowser",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Cognitive browser automation that thinks like your users. Simulate real user cognition with abandonment detection, constitutional safety, chaos engineering, and UX friction discovery.",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -42,8 +42,11 @@
|
|
|
42
42
|
"mcp": "node dist/mcp-server.js",
|
|
43
43
|
"mcp-remote": "node dist/mcp-server-remote.js",
|
|
44
44
|
"test": "bun test",
|
|
45
|
+
"test:coverage": "bun test --coverage",
|
|
45
46
|
"lint": "eslint src/",
|
|
46
47
|
"clean": "rm -rf dist/",
|
|
48
|
+
"docs": "typedoc",
|
|
49
|
+
"docs:watch": "typedoc --watch",
|
|
47
50
|
"prepare": "husky || true",
|
|
48
51
|
"release": "release-it",
|
|
49
52
|
"release:dry": "release-it --dry-run",
|
|
@@ -99,12 +102,12 @@
|
|
|
99
102
|
"dependencies": {
|
|
100
103
|
"@anthropic-ai/sdk": "^0.32.1",
|
|
101
104
|
"@modelcontextprotocol/sdk": "^1.25.3",
|
|
102
|
-
"jose": "^
|
|
105
|
+
"jose": "^6.1.3",
|
|
103
106
|
"playwright": "^1.40.0",
|
|
104
|
-
"zod": "^3.
|
|
107
|
+
"zod": "^4.3.6"
|
|
105
108
|
},
|
|
106
109
|
"devDependencies": {
|
|
107
|
-
"@commitlint/cli": "^
|
|
110
|
+
"@commitlint/cli": "^20.4.1",
|
|
108
111
|
"@commitlint/config-conventional": "^19.0.0",
|
|
109
112
|
"@release-it/conventional-changelog": "^8.0.0",
|
|
110
113
|
"@types/node": "^20.10.0",
|
|
@@ -112,8 +115,9 @@
|
|
|
112
115
|
"@typescript-eslint/parser": "^6.13.0",
|
|
113
116
|
"eslint": "^8.55.0",
|
|
114
117
|
"husky": "^9.0.0",
|
|
115
|
-
"lint-staged": "^
|
|
118
|
+
"lint-staged": "^16.2.7",
|
|
116
119
|
"release-it": "^17.0.0",
|
|
120
|
+
"typedoc": "^0.28.16",
|
|
117
121
|
"typescript": "^5.3.0"
|
|
118
122
|
},
|
|
119
123
|
"lint-staged": {
|