entroly-mcp 0.4.0 → 0.8.5

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.
Files changed (3) hide show
  1. package/README.md +64 -32
  2. package/index.js +33 -33
  3. package/package.json +25 -33
package/README.md CHANGED
@@ -1,32 +1,64 @@
1
- # @ebbiforge/entroly-mcp
2
-
3
- NPM bridge for the Entroly MCP server. This package wraps the Python `entroly` CLI so you can use it with Cursor, VS Code, and other MCP clients that prefer npm-based tool installation.
4
-
5
- ## Prerequisites
6
-
7
- You need the Python `entroly` package installed:
8
-
9
- ```bash
10
- pip install entroly
11
- ```
12
-
13
- ## Usage with Cursor
14
-
15
- Add to your Cursor MCP config (`.cursor/mcp.json`):
16
-
17
- ```json
18
- {
19
- "mcpServers": {
20
- "entroly": {
21
- "command": "npx",
22
- "args": ["-y", "@ebbiforge/entroly-mcp"]
23
- }
24
- }
25
- }
26
- ```
27
-
28
- ## What this does
29
-
30
- This is a **thin bridge** — it simply calls `entroly serve` under the hood. All the actual context optimization runs in the Entroly Python package backed by the `entroly-core` Rust engine.
31
-
32
- For more info, see the [main repo](https://github.com/juyterman1000/entroly).
1
+ # @ebbiforge/entroly-mcp
2
+
3
+ An MCP (Model Context Protocol) server for information-theoretic context optimization.
4
+ Use it to optimize Claude/Cursor's context window by selecting only the most relevant, high-entropy, and critical code fragments based on a Knapsack constraint.
5
+
6
+ ## Installation & Usage
7
+
8
+ This package is a universal `npx` bridge to the Entroly Python engine.
9
+
10
+ You can use it directly in any MCP-compatible client like Cursor or Claude Desktop:
11
+
12
+ ### Method 1: entroly-wasm (Recommended — zero dependencies)
13
+ ```json
14
+ {
15
+ "mcpServers": {
16
+ "entroly": {
17
+ "command": "npx",
18
+ "args": ["-y", "entroly-wasm", "serve"],
19
+ "env": {
20
+ "ENTROLY_BUDGET": "200000"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### Method 2: NPX Bridge to Python (requires `pip install entroly`)
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "entroly": {
32
+ "command": "npx",
33
+ "args": [
34
+ "-y",
35
+ "@ebbiforge/entroly-mcp",
36
+ "serve"
37
+ ],
38
+ "env": {
39
+ "ENTROLY_BUDGET": "200000"
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ *Note: You must have the core Python engine installed on your system:*
47
+ ```bash
48
+ pip install entroly
49
+ # or
50
+ pipx install entroly
51
+ ```
52
+
53
+ ### Features
54
+
55
+ - **Knapsack Token Optimization**: Fits the absolute maximum value into your token budget.
56
+ - **Shannon Entropy Scoring**: Prioritizes complex, high-entropy logic over repetitive boilerplate.
57
+ - **SimHash Deduplication**: Never wastes tokens on duplicate file contents.
58
+ - **Predictive Pre-fetch**: Learns your co-access patterns to predict what file you'll need next.
59
+ - **Feedback Loop**: Agentic feedback (`record_success` / `record_failure`) continuously tunes the RL weights.
60
+
61
+ ## Links
62
+
63
+ - **PyPI**: [entroly](https://pypi.org/project/entroly/)
64
+ - **Repository**: [juyterman1000/entroly](https://github.com/juyterman1000/entroly)
package/index.js CHANGED
@@ -1,33 +1,33 @@
1
- #!/usr/bin/env node
2
-
3
- const { spawnSync } = require('child_process');
4
- const path = require('path');
5
-
6
- // Pass all arguments straight through to the Python MCP server
7
- const args = process.argv.slice(2);
8
-
9
- // Check if 'entroly' command is available (installed via pip/pipx)
10
- const checkCmd = process.platform === 'win32' ? 'where' : 'which';
11
- const checkStatus = spawnSync(checkCmd, ['entroly'], { stdio: 'ignore' });
12
-
13
- if (checkStatus.status !== 0) {
14
- console.error("=====================================================================");
15
- console.error(" Error: 'entroly' Python package is not installed.");
16
- console.error("");
17
- console.error(" The @ebbiforge/entroly-mcp package is a bridge. To use it,");
18
- console.error(" you must have the Python engine installed on your system.");
19
- console.error("");
20
- console.error(" Please run:");
21
- console.error(" pip install entroly");
22
- console.error(" or");
23
- console.error(" pipx install entroly");
24
- console.error("=====================================================================");
25
- process.exit(1);
26
- }
27
-
28
- // Spawn the Python process, replacing the current node process's stdio directly
29
- const pyProcess = spawnSync('entroly', args, {
30
- stdio: 'inherit'
31
- });
32
-
33
- process.exit(pyProcess.status !== null ? pyProcess.status : 1);
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require('child_process');
4
+ const path = require('path');
5
+
6
+ // Pass all arguments straight through to the Python MCP server
7
+ const args = process.argv.slice(2);
8
+
9
+ // Check if 'entroly' command is available (installed via pip/pipx)
10
+ const checkCmd = process.platform === 'win32' ? 'where' : 'which';
11
+ const checkStatus = spawnSync(checkCmd, ['entroly'], { stdio: 'ignore' });
12
+
13
+ if (checkStatus.status !== 0) {
14
+ console.error("=====================================================================");
15
+ console.error(" Error: 'entroly' Python package is not installed.");
16
+ console.error("");
17
+ console.error(" The @ebbiforge/entroly-mcp package is a bridge. To use it,");
18
+ console.error(" you must have the Python engine installed on your system.");
19
+ console.error("");
20
+ console.error(" Please run:");
21
+ console.error(" pip install entroly");
22
+ console.error(" or");
23
+ console.error(" pipx install entroly");
24
+ console.error("=====================================================================");
25
+ process.exit(1);
26
+ }
27
+
28
+ // Spawn the Python process, replacing the current node process's stdio directly
29
+ const pyProcess = spawnSync('entroly', args, {
30
+ stdio: 'inherit'
31
+ });
32
+
33
+ process.exit(pyProcess.status !== null ? pyProcess.status : 1);
package/package.json CHANGED
@@ -1,33 +1,25 @@
1
- {
2
- "name": "entroly-mcp",
3
- "version": "0.4.0",
4
- "description": "Information-theoretic context optimization MCP server for AI coding agents. Bridge package that wraps the Entroly Python engine.",
5
- "main": "index.js",
6
- "bin": {
7
- "entroly-mcp": "index.js"
8
- },
9
- "files": [
10
- "index.js",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "test": "node index.js --help || true"
15
- },
16
- "repository": {
17
- "type": "git",
18
- "url": "https://github.com/juyterman1000/entroly"
19
- },
20
- "homepage": "https://github.com/juyterman1000/entroly",
21
- "keywords": [
22
- "mcp",
23
- "context-optimization",
24
- "entroly",
25
- "ai",
26
- "agents",
27
- "cursor",
28
- "claude",
29
- "vscode"
30
- ],
31
- "author": "Ebbiforge Team",
32
- "license": "MIT"
33
- }
1
+ {
2
+ "name": "entroly-mcp",
3
+ "version": "0.8.5",
4
+ "description": "Information-theoretic context optimization MCP server for AI coding agents.",
5
+ "main": "index.js",
6
+ "bin": {
7
+ "entroly-mcp": "./index.js"
8
+ },
9
+ "scripts": {
10
+ "test": "echo \"No JS tests yet\""
11
+ },
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/juyterman1000/entroly"
15
+ },
16
+ "keywords": [
17
+ "mcp",
18
+ "context-optimization",
19
+ "entroly",
20
+ "ai",
21
+ "agents"
22
+ ],
23
+ "author": "entroly",
24
+ "license": "Apache-2.0"
25
+ }