@smartergpt/lex-mcp 3.0.1 → 4.0.2
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 +226 -103
- package/index.mjs +1 -1
- package/package.json +9 -6
- package/stdio.mjs +2 -2
package/README.md
CHANGED
|
@@ -1,64 +1,97 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# @smartergpt/lex-mcp
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
## Give an MCP client a stdio doorway into Lex.
|
|
4
6
|
|
|
5
|
-
Lex
|
|
6
|
-
|
|
7
|
+
[Lex](https://github.com/Guffawaffle/lex) remembers decisions, blockers, next steps, and repository
|
|
8
|
+
boundaries across agent sessions. Lex-MCP does one narrower job: it delivers Lex's tools to an MCP
|
|
9
|
+
client through a standalone newline-delimited JSON-RPC process.
|
|
7
10
|
|
|
8
|
-
|
|
11
|
+
**Use it when your agent host needs an MCP command. Skip it when you already invoke or compose Lex
|
|
12
|
+
directly.**
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
compatibility layer. Each wrapper release pins `@smartergpt/lex` to the same
|
|
12
|
-
exact version, reports that version through MCP `serverInfo`, and supports the
|
|
13
|
-
same Node range as Lex (`>=20 <25`). Publish the matching Lex release before
|
|
14
|
-
publishing this wrapper.
|
|
14
|
+
</div>
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
checkout, then builds, installs, and packs that local source. After Lex is
|
|
18
|
-
published, refresh this repository's registry lock with
|
|
19
|
-
`npm install --package-lock-only --ignore-scripts`, verify no `file:` dependency
|
|
20
|
-
was introduced, commit the resulting integrity, and only then tag or publish
|
|
21
|
-
Lex MCP. The release workflow enforces that post-publish integrity gate.
|
|
16
|
+
[Do I need Lex-MCP?](#do-i-need-lex-mcp) · [Read-only smoke test](#smallest-reversible-smoke-test) · [Client setup](#connect-an-mcp-client) · [Trusted hosts](#trusted-lex-4-hosts) · [Release contract](#release-contract)
|
|
22
17
|
|
|
23
|
-
##
|
|
18
|
+
## Do I need Lex-MCP?
|
|
24
19
|
|
|
25
|
-
|
|
26
|
-
npx @smartergpt/lex-mcp
|
|
27
|
-
```
|
|
20
|
+
Use Lex-MCP when all of these are true:
|
|
28
21
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
process; they do not establish canonical authority, grants, or a tenant scope.
|
|
22
|
+
- your agent host supports MCP over stdio;
|
|
23
|
+
- it expects a standalone command such as `npx @smartergpt/lex-mcp`;
|
|
24
|
+
- you want that client to call Lex's Frame, policy, Atlas, introspection, and maintenance tools.
|
|
33
25
|
|
|
34
|
-
|
|
26
|
+
You probably do **not** need this package when:
|
|
35
27
|
|
|
36
|
-
|
|
37
|
-
|
|
28
|
+
- the Lex CLI already gives your workflow the continuity it needs;
|
|
29
|
+
- your application embeds `@smartergpt/lex/mcp-server` and already owns transport;
|
|
30
|
+
- AXF or another trusted host already composes the relevant Lex capability;
|
|
31
|
+
- you expect an MCP wrapper to provide authentication, tenant authority, orchestration, or cloud
|
|
32
|
+
storage. It does not.
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
Lex owns the capabilities, storage contracts, policy behavior, and authorization decisions. The
|
|
35
|
+
agent host owns what it authenticates and which workspace it selects. Lex-MCP owns only stdio
|
|
36
|
+
delivery and process lifecycle.
|
|
42
37
|
|
|
43
|
-
|
|
44
|
-
authorityPool, // read-only runtime authority connection
|
|
45
|
-
selection, // authenticated tenant/workspace selection owned by this host
|
|
46
|
-
frameStoreBinder, // scope-bound PostgreSQL frame store binder
|
|
47
|
-
process: capturedProcessEvidence,
|
|
48
|
-
runtimeId,
|
|
49
|
-
traceId,
|
|
50
|
-
emitDiagnostics,
|
|
51
|
-
});
|
|
38
|
+
### Two launch modes
|
|
52
39
|
|
|
53
|
-
|
|
40
|
+
| Mode | Use it for | What establishes scope |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| Local compatibility launcher | One operator-controlled workspace and an MCP client that needs a command | Current directory, `LEX_WORKSPACE_ROOT`, and Lex's local compatibility configuration |
|
|
43
|
+
| Trusted Lex 4 host | A host that already authenticates principals and binds tenant/workspace-scoped authority | Explicit host inputs and Lex's trusted runtime-scope composition |
|
|
44
|
+
|
|
45
|
+
The local launcher is convenient, but its environment values are configuration—not proof of
|
|
46
|
+
identity, grants, or tenant authority. A multi-tenant deployment must use trusted-host composition;
|
|
47
|
+
setting PostgreSQL environment variables on the compatibility launcher does not make it trusted.
|
|
48
|
+
|
|
49
|
+
Not sure which path applies? Give an agent the bounded, read-only
|
|
50
|
+
[fit evaluation](./docs/agent-evaluation.md). It returns one recommendation: `adopt`, `pilot`,
|
|
51
|
+
`defer`, or `not a fit`.
|
|
52
|
+
|
|
53
|
+
## Smallest reversible smoke test
|
|
54
|
+
|
|
55
|
+
This POSIX-shell test launches version `4.0.2`, performs only the MCP handshake and `tools/list`,
|
|
56
|
+
and confines the package cache and any Lex compatibility state to one temporary directory. It does
|
|
57
|
+
not call a write tool or modify the repository.
|
|
58
|
+
|
|
59
|
+
`npx` may contact the npm registry and execute package installation code. Run this only after that
|
|
60
|
+
network and code-execution boundary is approved.
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
smoke_dir="$(mktemp -d)"
|
|
64
|
+
|
|
65
|
+
(
|
|
66
|
+
cd "$smoke_dir"
|
|
67
|
+
printf '%s\n' \
|
|
68
|
+
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"lex-mcp-smoke","version":"1.0.0"}}}' \
|
|
69
|
+
'{"jsonrpc":"2.0","method":"notifications/initialized"}' \
|
|
70
|
+
'{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' \
|
|
71
|
+
| LEX_WORKSPACE_ROOT="$smoke_dir" \
|
|
72
|
+
LEX_DB_PATH="$smoke_dir/memory.db" \
|
|
73
|
+
npm_config_cache="$smoke_dir/npm-cache" \
|
|
74
|
+
npx --yes @smartergpt/lex-mcp@4.0.2
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
find "$smoke_dir" -maxdepth 4 -print
|
|
54
78
|
```
|
|
55
79
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
80
|
+
A successful response identifies `lex-mcp` version `4.0.2` and returns Lex's tool list. Review the
|
|
81
|
+
printed temporary path, then remove only that directory:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
test -n "$smoke_dir" && test -d "$smoke_dir" && rm -rf -- "$smoke_dir"
|
|
85
|
+
unset smoke_dir
|
|
86
|
+
```
|
|
60
87
|
|
|
61
|
-
|
|
88
|
+
This is read-only at the MCP tool surface. Compatibility startup may initialize SQLite state, which
|
|
89
|
+
is why the test redirects both the database and npm cache into the disposable directory.
|
|
90
|
+
|
|
91
|
+
## Connect an MCP client
|
|
92
|
+
|
|
93
|
+
Lex-MCP requires Node.js 24 or newer (`>=24`). Pinning the wrapper version makes the launched
|
|
94
|
+
artifact reproducible; that wrapper in turn pins the exact matching Lex release.
|
|
62
95
|
|
|
63
96
|
### VS Code / Copilot
|
|
64
97
|
|
|
@@ -68,8 +101,9 @@ Add to `.vscode/mcp.json`:
|
|
|
68
101
|
{
|
|
69
102
|
"servers": {
|
|
70
103
|
"lex": {
|
|
104
|
+
"type": "stdio",
|
|
71
105
|
"command": "npx",
|
|
72
|
-
"args": ["@smartergpt/lex-mcp"],
|
|
106
|
+
"args": ["--yes", "@smartergpt/lex-mcp@4.0.2"],
|
|
73
107
|
"env": {
|
|
74
108
|
"LEX_WORKSPACE_ROOT": "${workspaceFolder}"
|
|
75
109
|
}
|
|
@@ -80,76 +114,165 @@ Add to `.vscode/mcp.json`:
|
|
|
80
114
|
|
|
81
115
|
### Claude Desktop
|
|
82
116
|
|
|
83
|
-
Add to `claude_desktop_config.json
|
|
117
|
+
Add to `claude_desktop_config.json`, using the absolute project path the server should treat as its
|
|
118
|
+
local workspace:
|
|
84
119
|
|
|
85
120
|
```json
|
|
86
121
|
{
|
|
87
122
|
"mcpServers": {
|
|
88
123
|
"lex": {
|
|
89
124
|
"command": "npx",
|
|
90
|
-
"args": ["@smartergpt/lex-mcp"]
|
|
125
|
+
"args": ["--yes", "@smartergpt/lex-mcp@4.0.2"],
|
|
126
|
+
"env": {
|
|
127
|
+
"LEX_WORKSPACE_ROOT": "/absolute/path/to/project"
|
|
128
|
+
}
|
|
91
129
|
}
|
|
92
130
|
}
|
|
93
131
|
}
|
|
94
132
|
```
|
|
95
133
|
|
|
96
|
-
|
|
134
|
+
These examples use the local compatibility launcher. In controlled or offline environments,
|
|
135
|
+
install the reviewed package through your normal dependency process and configure the client to use
|
|
136
|
+
that installed executable instead of allowing `npx` to fetch it.
|
|
137
|
+
|
|
138
|
+
To remove a pilot, delete the MCP client entry. Remove a package dependency only if the pilot added
|
|
139
|
+
one. Do not delete an existing Lex database, configuration, or Frame history as part of wrapper
|
|
140
|
+
cleanup.
|
|
141
|
+
|
|
142
|
+
## What crosses the boundary
|
|
143
|
+
|
|
144
|
+
| Concern | Owner |
|
|
145
|
+
|---|---|
|
|
146
|
+
| MCP line parsing, response serialization, ordered dispatch, EOF, and shutdown | Lex-MCP |
|
|
147
|
+
| Tool registry, Frames, policy, Atlas, store contracts, validation, and authorization outcomes | Lex |
|
|
148
|
+
| Authenticated principal, tenant/workspace selection, process evidence, pools, and runtime IDs | Trusted host |
|
|
149
|
+
| MCP client configuration and the project data submitted to tools | Operator and agent host |
|
|
150
|
+
|
|
151
|
+
Lex-MCP does not mint authority, infer a trusted tenant from environment variables, or broaden a
|
|
152
|
+
caller's grants. Stored Frame bodies are historical project data; clients should not treat recalled
|
|
153
|
+
text as executable instructions.
|
|
154
|
+
|
|
155
|
+
## Local compatibility configuration
|
|
156
|
+
|
|
157
|
+
The executable uses the current directory or `LEX_WORKSPACE_ROOT` as the project root and delegates
|
|
158
|
+
store and policy resolution to Lex.
|
|
159
|
+
|
|
160
|
+
| Variable | Description | Default |
|
|
161
|
+
|---|---|---|
|
|
162
|
+
| `LEX_WORKSPACE_ROOT` | Local project root | Current directory |
|
|
163
|
+
| `LEX_STORE` | Compatibility Frame backend (`sqlite` or `postgres`) | `sqlite` |
|
|
164
|
+
| `LEX_DATABASE_URL` | Compatibility PostgreSQL connection URL | — |
|
|
165
|
+
| `LEX_POSTGRES_PASSWORD` | Password for a credential-free compatibility URL | — |
|
|
166
|
+
| `LEX_POSTGRES_POOL_MAX` | Compatibility PostgreSQL pool size | `10` |
|
|
167
|
+
| `LEX_DB_PATH` | SQLite database path; ignored by PostgreSQL | `.smartergpt/lex/memory.db` |
|
|
168
|
+
| `LEX_MEMORY_DB` | Compatibility alias for `LEX_DB_PATH` | — |
|
|
169
|
+
| `LEX_DEBUG` | Enable diagnostic logging to stderr | Off |
|
|
170
|
+
|
|
171
|
+
When both SQLite path variables are set, `LEX_DB_PATH` wins. For a multi-root local setup, use the
|
|
172
|
+
same absolute `LEX_DB_PATH` for direct Lex, Lex-MCP, and any routed Lex process. Keep database
|
|
173
|
+
credentials in the host environment or a secret manager, not in checked-in MCP configuration.
|
|
174
|
+
|
|
175
|
+
## Trusted Lex 4 hosts
|
|
176
|
+
|
|
177
|
+
Use the public transport export when a trusted host needs Lex-MCP's ordered stdio delivery. The host
|
|
178
|
+
must construct canonical authority and pass Lex's `host.mcp` options through unchanged:
|
|
179
|
+
|
|
180
|
+
```js
|
|
181
|
+
import { startLexMcpStdio } from "@smartergpt/lex-mcp";
|
|
182
|
+
import { createPostgresTrustedRuntimeHost } from "@smartergpt/lex/runtime-scope";
|
|
183
|
+
|
|
184
|
+
const host = createPostgresTrustedRuntimeHost({
|
|
185
|
+
authorityPool, // read-only runtime authority connection, never the admin pool
|
|
186
|
+
authoritySchema, // explicit PostgreSQL schema containing canonical authority
|
|
187
|
+
selection, // authenticated tenant/workspace selection owned by this host
|
|
188
|
+
frameStoreBinder, // scope-bound PostgreSQL FrameStore binder
|
|
189
|
+
process: capturedProcessEvidence,
|
|
190
|
+
runtimeId,
|
|
191
|
+
traceId,
|
|
192
|
+
emitDiagnostics,
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const transport = startLexMcpStdio({ serverOptions: host.mcp });
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
The host supplies its pools, authority schema, authenticated selection, captured process evidence,
|
|
199
|
+
and IDs. Lex resolves and enforces the resulting authorized scope. Neither Lex nor this wrapper
|
|
200
|
+
reconstructs trusted authority from ambient environment variables. See Lex's
|
|
201
|
+
[runtime-scope contract](https://github.com/Guffawaffle/lex/blob/main/docs/RUNTIME_SCOPE_CONTRACT.md)
|
|
202
|
+
and [PostgreSQL scope security](https://github.com/Guffawaffle/lex/blob/main/docs/POSTGRES_SCOPE_SECURITY.md)
|
|
203
|
+
for the complete host contract.
|
|
204
|
+
|
|
205
|
+
## Agent and automation output
|
|
206
|
+
|
|
207
|
+
Agents can request `format: "compact"` on supported Frame and introspection tools to reduce
|
|
208
|
+
presentation metadata. Runtime-scope diagnostics are absent by default. They appear only when a
|
|
209
|
+
caller explicitly requests `diagnostics: "summary"` or `"full"` and has the required authority.
|
|
210
|
+
Formatting and diagnostics never change scope or authorization outcomes.
|
|
211
|
+
|
|
212
|
+
## Tools delivered from Lex
|
|
213
|
+
|
|
214
|
+
The current coordinated release exposes 14 tools:
|
|
215
|
+
|
|
216
|
+
- `frame_create`, `frame_validate`, `frame_search`, `frame_get`, and `frame_list`;
|
|
217
|
+
- `policy_check`, `timeline_show`, and `atlas_analyze`;
|
|
218
|
+
- `system_introspect`, `help`, and `hints_get`;
|
|
219
|
+
- `contradictions_scan`, `db_stats`, and `turncost_calculate`.
|
|
220
|
+
|
|
221
|
+
Lex defines these tools and their behavior. Lex-MCP transports their requests and responses.
|
|
222
|
+
|
|
223
|
+
## Release contract
|
|
224
|
+
|
|
225
|
+
`@smartergpt/lex-mcp` is a coordinated Lex release, not a floating compatibility layer. Each
|
|
226
|
+
wrapper release:
|
|
227
|
+
|
|
228
|
+
- pins `@smartergpt/lex` to the same exact version;
|
|
229
|
+
- reports that version through MCP `serverInfo` and Lex introspection;
|
|
230
|
+
- supports the exact same Node.js range as Lex.
|
|
231
|
+
|
|
232
|
+
For this release, the wrapper, dependency pin, installed Lex core, and server-reported version are
|
|
233
|
+
all `4.0.2`; the Node range is `>=24`.
|
|
234
|
+
|
|
235
|
+
Publish the matching Lex release before publishing this wrapper. Candidate CI installs the exact
|
|
236
|
+
public dependency graph from the committed lockfile, rebuilds native dependencies, runs the delivery
|
|
237
|
+
gate, and packs one retained wrapper artifact. It must not use or persist a `file:` dependency.
|
|
238
|
+
|
|
239
|
+
After Lex is public:
|
|
240
|
+
|
|
241
|
+
1. run `npm install --package-lock-only --ignore-scripts` in this repository;
|
|
242
|
+
2. verify the lock resolves the exact registry tarball and includes `sha512-` integrity;
|
|
243
|
+
3. verify no `file:` dependency was introduced;
|
|
244
|
+
4. commit the resulting lockfile before creating the signed release tag or publishing Lex-MCP.
|
|
245
|
+
|
|
246
|
+
An explicit `workflow_dispatch` from the exact current `main` commit with `publish=true` builds and
|
|
247
|
+
tests the retained candidate on Linux and Windows, rechecks live `main`, and publishes those exact
|
|
248
|
+
bytes through npm Trusted Publishing with provenance. The `npm-release` environment restricts that
|
|
249
|
+
OIDC authority to `main`; npm holds no long-lived automation token for this repository. The workflow
|
|
250
|
+
then verifies public integrity and binds npm's signed provenance to this repository, workflow, ref,
|
|
251
|
+
and source commit.
|
|
252
|
+
|
|
253
|
+
After public verification, create and push the signed annotated release tag at that same commit. The
|
|
254
|
+
tag lane re-verifies the immutable tag, public package, retained artifact, and live `main` identity
|
|
255
|
+
before creating the GitHub release.
|
|
256
|
+
|
|
257
|
+
## Develop and verify
|
|
97
258
|
|
|
98
259
|
```bash
|
|
99
|
-
|
|
260
|
+
npm ci --ignore-scripts
|
|
261
|
+
npm rebuild better-sqlite3-multiple-ciphers
|
|
262
|
+
npm test
|
|
263
|
+
npm run test:pack
|
|
100
264
|
```
|
|
101
265
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
When both `LEX_DB_PATH` and `LEX_MEMORY_DB` are set, `LEX_DB_PATH` wins.
|
|
116
|
-
|
|
117
|
-
For multi-root compatibility launches using SQLite, set the same absolute
|
|
118
|
-
`LEX_DB_PATH` for direct Lex, this MCP wrapper, and AXF-routed Lex. The wrapper
|
|
119
|
-
delegates `.lex.config.json`, environment, and local store resolution to Lex
|
|
120
|
-
core, so installed launches honor caller-project config files. Shared trusted
|
|
121
|
-
PostgreSQL deployments must instead inject canonical authority and a scoped
|
|
122
|
-
store binder as shown above; environment configuration alone is never a trusted
|
|
123
|
-
multi-tenant bootstrap.
|
|
124
|
-
|
|
125
|
-
## Agent Output
|
|
126
|
-
|
|
127
|
-
Agents can request `format: "compact"` on supported frame and introspection
|
|
128
|
-
tools to avoid redundant presentation metadata. Runtime-scope diagnostics are
|
|
129
|
-
absent by default and appear only when a caller explicitly requests
|
|
130
|
-
`diagnostics: "summary"` or `"full"` and has the required authority. Output
|
|
131
|
-
format and diagnostics affect presentation only; they never change scope or
|
|
132
|
-
authorization outcomes.
|
|
133
|
-
|
|
134
|
-
## Tools
|
|
135
|
-
|
|
136
|
-
This MCP server provides 14 tools for episodic memory management:
|
|
137
|
-
|
|
138
|
-
- `frame_create` - Store episodic memory snapshot
|
|
139
|
-
- `frame_search` - Search frames by reference, branch, or ticket
|
|
140
|
-
- `frame_get` - Retrieve specific frame by ID
|
|
141
|
-
- `frame_list` - List recent frames with filtering
|
|
142
|
-
- `frame_validate` - Validate frame input (dry-run)
|
|
143
|
-
- `policy_check` - Validate code against policy rules
|
|
144
|
-
- `timeline_show` - Visual timeline of frame evolution
|
|
145
|
-
- `atlas_analyze` - Analyze code structure and dependencies
|
|
146
|
-
- `system_introspect` - Discover Lex capabilities and state
|
|
147
|
-
- `help` - Usage help and examples
|
|
148
|
-
- `hints_get` - Retrieve error recovery hints
|
|
149
|
-
- `contradictions_scan` - Detect conflicting information across frames
|
|
150
|
-
- `db_stats` - Database statistics and activity metrics
|
|
151
|
-
- `turncost_calculate` - Turn Cost governance metrics
|
|
152
|
-
|
|
153
|
-
## Learn More
|
|
154
|
-
|
|
155
|
-
See the [Lex documentation](https://github.com/Guffawaffle/lex) for full details.
|
|
266
|
+
`npm test` covers the public TypeScript surface, stdio lifecycle and error behavior, exact release
|
|
267
|
+
contract, local compatibility resolution, MCP handshake, introspection, and the 14-tool inventory.
|
|
268
|
+
`npm run test:pack` installs locally packed Lex and Lex-MCP artifacts into a clean temporary project
|
|
269
|
+
and repeats the public launch checks.
|
|
270
|
+
|
|
271
|
+
## Learn more
|
|
272
|
+
|
|
273
|
+
- [Agent fit evaluation](./docs/agent-evaluation.md)
|
|
274
|
+
- [Lex](https://github.com/Guffawaffle/lex): durable agent work context, policy, Atlas, storage, and
|
|
275
|
+
trusted runtime scope
|
|
276
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
277
|
+
|
|
278
|
+
Lex-MCP is available under the MIT License.
|
package/index.mjs
CHANGED
|
@@ -22,7 +22,7 @@ const projectRoot = process.env.LEX_WORKSPACE_ROOT || process.cwd();
|
|
|
22
22
|
|
|
23
23
|
// This executable preserves the local, single-workspace compatibility launch.
|
|
24
24
|
// Environment and cwd select local configuration; they never establish trusted
|
|
25
|
-
// Lex
|
|
25
|
+
// Lex authority. Trusted hosts import startLexMcpStdio and inject host.mcp.
|
|
26
26
|
let transport;
|
|
27
27
|
try {
|
|
28
28
|
transport = startLexMcpStdio({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartergpt/lex-mcp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "MCP server for Lex episodic memory - stdio transport wrapper",
|
|
5
5
|
"mcpName": "dev.smartergpt/lex",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"import": "./stdio.mjs"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
|
-
"bin":
|
|
19
|
+
"bin": {
|
|
20
|
+
"lex-mcp": "index.mjs"
|
|
21
|
+
},
|
|
20
22
|
"files": [
|
|
21
23
|
"index.mjs",
|
|
22
24
|
"stdio.mjs",
|
|
@@ -24,8 +26,9 @@
|
|
|
24
26
|
"README.md"
|
|
25
27
|
],
|
|
26
28
|
"scripts": {
|
|
27
|
-
"test": "npm run test:types && node test-stdio.mjs && node test-contract.mjs && node test-mcp-server.mjs --local --clean",
|
|
29
|
+
"test": "npm run test:types && npm run test:release-policy && node test-stdio.mjs && node test-contract.mjs && node test-mcp-server.mjs --local --clean",
|
|
28
30
|
"test:types": "tsc --noEmit --skipLibCheck --module NodeNext --moduleResolution NodeNext --target ES2022 stdio.d.ts test-types.mts",
|
|
31
|
+
"test:release-policy": "node test-release-policy.mjs",
|
|
29
32
|
"test:stdio": "node test-stdio.mjs",
|
|
30
33
|
"test:contract": "node test-contract.mjs",
|
|
31
34
|
"test:contract:verbose": "node test-contract.mjs --verbose",
|
|
@@ -38,7 +41,7 @@
|
|
|
38
41
|
"link:local": "rm -rf node_modules/@smartergpt/lex && mkdir -p node_modules/@smartergpt && ln -s /srv/lex-mcp/lex node_modules/@smartergpt/lex"
|
|
39
42
|
},
|
|
40
43
|
"dependencies": {
|
|
41
|
-
"@smartergpt/lex": "
|
|
44
|
+
"@smartergpt/lex": "4.0.2"
|
|
42
45
|
},
|
|
43
46
|
"publishConfig": {
|
|
44
47
|
"access": "public",
|
|
@@ -46,7 +49,7 @@
|
|
|
46
49
|
},
|
|
47
50
|
"repository": {
|
|
48
51
|
"type": "git",
|
|
49
|
-
"url": "https://github.com/Guffawaffle/lex-mcp.git"
|
|
52
|
+
"url": "git+https://github.com/Guffawaffle/lex-mcp.git"
|
|
50
53
|
},
|
|
51
54
|
"keywords": [
|
|
52
55
|
"mcp",
|
|
@@ -58,7 +61,7 @@
|
|
|
58
61
|
"author": "Guffawaffle",
|
|
59
62
|
"license": "MIT",
|
|
60
63
|
"engines": {
|
|
61
|
-
"node": ">=
|
|
64
|
+
"node": ">=24"
|
|
62
65
|
},
|
|
63
66
|
"homepage": "https://github.com/Guffawaffle/lex#readme",
|
|
64
67
|
"bugs": {
|
package/stdio.mjs
CHANGED
|
@@ -69,7 +69,7 @@ function isValidRequestId(id) {
|
|
|
69
69
|
/**
|
|
70
70
|
* Start a Lex MCP server on newline-delimited JSON stdio.
|
|
71
71
|
*
|
|
72
|
-
* Trusted Lex
|
|
72
|
+
* Trusted Lex 4 hosts pass the unmodified `host.mcp` object returned by
|
|
73
73
|
* `createPostgresTrustedRuntimeHost`. The optional `serverFactory` is intended
|
|
74
74
|
* for embedding and transport tests; it receives the same options object by
|
|
75
75
|
* identity.
|
|
@@ -141,7 +141,7 @@ export function startLexMcpStdio({
|
|
|
141
141
|
}
|
|
142
142
|
|
|
143
143
|
// Only an absent id denotes a notification. JSON-RPC permits clients to
|
|
144
|
-
// send null, but Lex
|
|
144
|
+
// send null, but Lex treats it as invalid so request/response ownership
|
|
145
145
|
// remains unambiguous.
|
|
146
146
|
if (!Object.hasOwn(request, "id")) {
|
|
147
147
|
if (debug) {
|