@smartergpt/lex-mcp 2.5.1 → 2.7.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 +18 -4
- package/index.mjs +7 -3
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# @smartergpt/lex-mcp
|
|
2
2
|
|
|
3
|
-
MCP
|
|
3
|
+
Thin MCP stdio wrapper for [@smartergpt/lex](https://github.com/Guffawaffle/lex) episodic memory.
|
|
4
|
+
|
|
5
|
+
Lex owns all capabilities. This package owns delivery over [Model Context Protocol](https://modelcontextprotocol.io/).
|
|
4
6
|
|
|
5
7
|
## Quick Start
|
|
6
8
|
|
|
@@ -43,17 +45,26 @@ Add to `claude_desktop_config.json`:
|
|
|
43
45
|
}
|
|
44
46
|
```
|
|
45
47
|
|
|
48
|
+
### Quick Smoke Test
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' | npx @smartergpt/lex-mcp
|
|
52
|
+
```
|
|
53
|
+
|
|
46
54
|
## Environment Variables
|
|
47
55
|
|
|
48
56
|
| Variable | Description | Default |
|
|
49
57
|
|----------|-------------|---------|
|
|
50
58
|
| `LEX_WORKSPACE_ROOT` | Workspace root directory | Current directory |
|
|
51
|
-
| `
|
|
52
|
-
| `
|
|
59
|
+
| `LEX_DB_PATH` | SQLite database path (canonical) | `.smartergpt/lex/memory.db` |
|
|
60
|
+
| `LEX_MEMORY_DB` | Alias for `LEX_DB_PATH` (compat only) | — |
|
|
61
|
+
| `LEX_DEBUG` | Enable debug logging to stderr | Off |
|
|
62
|
+
|
|
63
|
+
When both `LEX_DB_PATH` and `LEX_MEMORY_DB` are set, `LEX_DB_PATH` wins.
|
|
53
64
|
|
|
54
65
|
## Tools
|
|
55
66
|
|
|
56
|
-
This MCP server provides
|
|
67
|
+
This MCP server provides 14 tools for episodic memory management:
|
|
57
68
|
|
|
58
69
|
- `frame_create` - Store episodic memory snapshot
|
|
59
70
|
- `frame_search` - Search frames by reference, branch, or ticket
|
|
@@ -66,6 +77,9 @@ This MCP server provides 11 tools for episodic memory management:
|
|
|
66
77
|
- `system_introspect` - Discover Lex capabilities and state
|
|
67
78
|
- `help` - Usage help and examples
|
|
68
79
|
- `hints_get` - Retrieve error recovery hints
|
|
80
|
+
- `contradictions_scan` - Detect conflicting information across frames
|
|
81
|
+
- `db_stats` - Database statistics and activity metrics
|
|
82
|
+
- `turncost_calculate` - Turn Cost governance metrics
|
|
69
83
|
|
|
70
84
|
## Learn More
|
|
71
85
|
|
package/index.mjs
CHANGED
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
*
|
|
11
11
|
* Environment Variables:
|
|
12
12
|
* LEX_WORKSPACE_ROOT - Workspace root directory (default: cwd)
|
|
13
|
-
*
|
|
13
|
+
* LEX_DB_PATH - SQLite database path (default: .smartergpt/lex/memory.db)
|
|
14
|
+
* LEX_MEMORY_DB - Alias for LEX_DB_PATH (for backwards compatibility)
|
|
14
15
|
* LEX_DEBUG - Enable debug logging to stderr
|
|
15
16
|
*/
|
|
16
17
|
|
|
@@ -26,9 +27,12 @@ if (!process.env.LEX_WORKSPACE_ROOT) {
|
|
|
26
27
|
process.env.LEX_WORKSPACE_ROOT = repoRoot;
|
|
27
28
|
}
|
|
28
29
|
|
|
29
|
-
// Database path
|
|
30
|
+
// Database path: LEX_DB_PATH (canonical) > LEX_MEMORY_DB (compat alias) > default
|
|
31
|
+
// Default matches Lex core: .smartergpt/lex/memory.db
|
|
30
32
|
const dbPath =
|
|
31
|
-
process.env.
|
|
33
|
+
process.env.LEX_DB_PATH ||
|
|
34
|
+
process.env.LEX_MEMORY_DB ||
|
|
35
|
+
join(repoRoot, ".smartergpt", "lex", "memory.db");
|
|
32
36
|
|
|
33
37
|
// Ensure the database directory exists (first-time setup)
|
|
34
38
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartergpt/lex-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.7.0",
|
|
4
4
|
"description": "MCP server for Lex episodic memory - stdio transport wrapper",
|
|
5
5
|
"mcpName": "dev.smartergpt/lex",
|
|
6
6
|
"type": "module",
|
|
@@ -10,13 +10,19 @@
|
|
|
10
10
|
"README.md"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
+
"test": "node test-contract.mjs && node test-mcp-server.mjs --local --clean",
|
|
14
|
+
"test:contract": "node test-contract.mjs",
|
|
15
|
+
"test:contract:verbose": "node test-contract.mjs --verbose",
|
|
13
16
|
"test:mcp": "node test-mcp-server.mjs --local --clean",
|
|
14
17
|
"test:mcp:verbose": "node test-mcp-server.mjs --local --clean --verbose",
|
|
18
|
+
"test:pack": "node test-pack-smoke.mjs",
|
|
19
|
+
"test:pack:verbose": "node test-pack-smoke.mjs --verbose",
|
|
20
|
+
"test:pack:keep": "node test-pack-smoke.mjs --keep",
|
|
15
21
|
"test:published": "node test-mcp-server.mjs --clean",
|
|
16
22
|
"link:local": "rm -rf node_modules/@smartergpt/lex && mkdir -p node_modules/@smartergpt && ln -s /srv/lex-mcp/lex node_modules/@smartergpt/lex"
|
|
17
23
|
},
|
|
18
24
|
"dependencies": {
|
|
19
|
-
"@smartergpt/lex": "^2.
|
|
25
|
+
"@smartergpt/lex": "^2.7.0"
|
|
20
26
|
},
|
|
21
27
|
"publishConfig": {
|
|
22
28
|
"access": "public",
|
|
@@ -24,8 +30,7 @@
|
|
|
24
30
|
},
|
|
25
31
|
"repository": {
|
|
26
32
|
"type": "git",
|
|
27
|
-
"url": "https://github.com/Guffawaffle/lex.git"
|
|
28
|
-
"directory": "lex-mcp"
|
|
33
|
+
"url": "https://github.com/Guffawaffle/lex-mcp.git"
|
|
29
34
|
},
|
|
30
35
|
"keywords": [
|
|
31
36
|
"mcp",
|