codeatlas-enterprise 1.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 ADDED
@@ -0,0 +1,76 @@
1
+ # CodeAtlas Enterprise MCP Gateway
2
+
3
+ An ultra-lightweight, high-performance Model Context Protocol (MCP) gateway that securely bridges your local AI editors (Cursor, Claude Code, Roo Code, VS Code) to the remote **CodeAtlas Enterprise Server**.
4
+
5
+ This client-only gateway requires no heavy database engines, AST parsers, or workspace indexers locally. All complex AI analysis and persistence run secure and isolated in the cloud, giving you instant, lightning-fast response times with zero local CPU overhead.
6
+
7
+ ---
8
+
9
+ ## 🚀 Installation
10
+
11
+ Install globally using `npm` (or `yarn`/`pnpm`):
12
+
13
+ ```bash
14
+ npm install -g codeatlas-enterprise
15
+ ```
16
+
17
+ ---
18
+
19
+ ## 🔑 Authentication
20
+
21
+ The gateway communicates securely with the CodeAtlas server using your personal **API Key**. You can provide the API Key in one of three ways:
22
+
23
+ 1. **Environment Variable**:
24
+ ```bash
25
+ export CODEATLAS_API_KEY="your_api_key_here"
26
+ ```
27
+ 2. **Local `.env` File**:
28
+ Create a `.env` file in the directory where you run the command:
29
+ ```env
30
+ CODEATLAS_API_KEY="your_api_key_here"
31
+ ```
32
+ 3. **CLI Argument**:
33
+ ```bash
34
+ codeatlas-mcp --apiKey="your_api_key_here"
35
+ ```
36
+
37
+ ---
38
+
39
+ ## 🛠 AI Editor Integration
40
+
41
+ ### 1. Cursor / Claude Desktop / VS Code
42
+ Add the following to your global MCP settings file (e.g., `mcp_config.json` or `.cursor/mcp.json`):
43
+
44
+ ```json
45
+ {
46
+ "mcpServers": {
47
+ "codeatlas": {
48
+ "command": "codeatlas-mcp",
49
+ "args": [
50
+ "--apiKey",
51
+ "YOUR_API_KEY_HERE"
52
+ ]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ ### 2. Custom Command Line Execution
59
+ You can also launch it manually in standard input/output mode:
60
+
61
+ ```bash
62
+ codeatlas-mcp --apiKey="YOUR_API_KEY_HERE"
63
+ ```
64
+
65
+ ---
66
+
67
+ ## 🔒 Absolute Privacy & Security
68
+
69
+ * **Zero Local Code Storage**: This client package contains only the necessary transport bridge code. Your intellectual property, credentials, and structural data are never saved on the local machine where this package is installed.
70
+ * **Encrypted Transmission**: All data exchanged between your local editor and the server is fully encrypted via secure HTTPS/SSE channels.
71
+
72
+ ---
73
+
74
+ ## 📄 License
75
+
76
+ UNLICENSED — All Rights Reserved. Used exclusively for licensed CodeAtlas Enterprise customers.
@@ -0,0 +1,69 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { spawn } from 'child_process';
4
+ import * as fs from 'fs';
5
+ import * as path from 'path';
6
+
7
+ // Load API Key from environment or arguments or local .env
8
+ let apiKey = process.env.CODEATLAS_API_KEY;
9
+
10
+ // Check command line arguments for --apiKey=<value> or -k <value>
11
+ const args = process.argv.slice(2);
12
+ for (let i = 0; i < args.length; i++) {
13
+ if (args[i].startsWith('--apiKey=')) {
14
+ apiKey = args[i].split('=')[1];
15
+ } else if (args[i] === '-k' || args[i] === '--apiKey') {
16
+ apiKey = args[i + 1];
17
+ }
18
+ }
19
+
20
+ // Fallback to local .env file in the current working directory
21
+ if (!apiKey) {
22
+ try {
23
+ const envPath = path.join(process.cwd(), '.env');
24
+ if (fs.existsSync(envPath)) {
25
+ const envContent = fs.readFileSync(envPath, 'utf8');
26
+ const match = envContent.match(/CODEATLAS_API_KEY=["']?([^"'\s]+)["']?/);
27
+ if (match) {
28
+ apiKey = match[1];
29
+ }
30
+ }
31
+ } catch (e) {
32
+ // Ignore .env read error
33
+ }
34
+ }
35
+
36
+ if (!apiKey) {
37
+ console.error('Error: CODEATLAS_API_KEY is not set.');
38
+ console.error('Please set it in your environment variables, a local .env file, or pass it as an argument:');
39
+ console.error(' codeatlas-mcp --apiKey=YOUR_API_KEY');
40
+ process.exit(1);
41
+ }
42
+
43
+ // Target remote SSE URL
44
+ const sseUrl = `https://atlas.genrostore.com/sse?apiKey=${apiKey}`;
45
+
46
+ console.error(`Connecting to CodeAtlas Remote Server via Supergateway...`);
47
+ console.error(`SSE URL: https://atlas.genrostore.com/sse?apiKey=***`);
48
+
49
+ // Spawn supergateway
50
+ // We try to run the local/global 'supergateway' binary first.
51
+ // If it fails or is not found, we run it via npx.
52
+ const gatewayArgs = ['--sse', sseUrl];
53
+
54
+ let child;
55
+ try {
56
+ child = spawn('supergateway', gatewayArgs, { stdio: 'inherit' });
57
+ } catch (err) {
58
+ // If global 'supergateway' is not found, spawn it via 'npx'
59
+ child = spawn('npx', ['-y', '@modelcontextprotocol/supergateway', ...gatewayArgs], { stdio: 'inherit' });
60
+ }
61
+
62
+ child.on('error', (err) => {
63
+ console.error('Failed to start supergateway process:', err);
64
+ process.exit(1);
65
+ });
66
+
67
+ child.on('exit', (code) => {
68
+ process.exit(code || 0);
69
+ });
package/package.json ADDED
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "codeatlas-enterprise",
3
+ "version": "1.0.0",
4
+ "description": "Ultra-lightweight MCP Gateway for CodeAtlas Remote Enterprise Server",
5
+ "type": "module",
6
+ "bin": {
7
+ "codeatlas-mcp": "bin/codeatlas.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node bin/codeatlas.js"
11
+ },
12
+ "keywords": [
13
+ "mcp",
14
+ "modelcontextprotocol",
15
+ "codeatlas",
16
+ "enterprise"
17
+ ],
18
+ "author": "giauphan",
19
+ "license": "UNLICENSED",
20
+ "dependencies": {
21
+ "@modelcontextprotocol/supergateway": "^0.2.0"
22
+ }
23
+ }