lcode-cli 0.63.1__py3-none-any.whl → 0.65.0__py3-none-any.whl

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.
lcode/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  From a program: `from lcode import Session` (see lcode.api).
4
4
  """
5
5
 
6
- __version__ = "0.63.1"
6
+ __version__ = "0.65.0"
7
7
 
8
8
  API = ("Session", "Result", "Options", "SetupError")
9
9
 
@@ -0,0 +1,346 @@
1
+ # MCP server guide
2
+
3
+ What each of lcode's ready-made MCP servers does, how to add it, and what to ask. How MCP works in lcode (sign-in,
4
+ settings, approvals, context) is on the [MCP servers](mcp.md) page.
5
+
6
+ ## The short version
7
+
8
+ ```bash
9
+ lcode mcp catalog # the ready-made servers, and what's missing on your machine
10
+ lcode mcp add github # add one: lcode asks for what it needs and tests the connection
11
+ lcode mcp list # your servers and whether they work
12
+ lcode mcp tools github # the tools a server offers
13
+ ```
14
+
15
+ Then start `lcode` and ask in plain words, naming the service. lcode shows each call and waits for your answer:
16
+ ++y++ for once, ++a++ for always in this session, ++n++ to refuse.
17
+
18
+ | To do this | Command |
19
+ |---|---|
20
+ | Turn a server off, and on again | `lcode mcp disable NAME`, `lcode mcp enable NAME` |
21
+ | Sign in again, or forget the sign-in | `lcode mcp login NAME`, `lcode mcp logout NAME` |
22
+ | Remove a server | `lcode mcp remove NAME` |
23
+ | See the servers in a session | `/mcp`, `/mcp tools NAME` |
24
+ | Start without any MCP server | `lcode --no-mcp` |
25
+
26
+ Settings are in `~/.config/lcode/mcp.json`. Add only the servers you use: each one takes context.
27
+ [Offering fewer tools](mcp.md#context) helps small models most.
28
+
29
+ ## All servers
30
+
31
+ | Server | What it's for | Can it change things? | You need |
32
+ |---|---|---|---|
33
+ | [`github`](#github) | Repositories, issues, pull requests, Actions | yes | a GitHub token |
34
+ | [`atlassian`](#atlassian) | Jira, Confluence, Bitbucket, Compass | yes | browser sign-in |
35
+ | [`linear`](#linear) | Issues, projects, comments | yes | browser sign-in |
36
+ | [`notion`](#notion) | Pages and databases | yes | browser sign-in |
37
+ | [`google-drive`](#google-drive) | Files in Google Drive | creates files | your own Google OAuth client |
38
+ | [`sentry`](#sentry) | Errors, traces and releases | yes | browser sign-in |
39
+ | [`grafana`](#grafana) | Dashboards, metrics, logs, alerts | read-only to start | `uvx`, a service account token |
40
+ | [`aws`](#aws) | AWS CLI commands | read-only to start | `uvx`, AWS credentials |
41
+ | [`aws-mcp`](#aws-mcp) | AWS API calls, docs and skills | yes, within your IAM permissions | `uvx`, AWS credentials |
42
+ | [`aws-knowledge`](#aws-knowledge) | AWS documentation | no | nothing |
43
+ | [`gcp`](#gcp) | `gcloud` commands | yes | `npx`, `gcloud` signed in |
44
+ | [`kubernetes`](#kubernetes) | Pods, logs, events | read-only to start | `npx`, a kubeconfig |
45
+ | [`postgres`](#postgres) | Schemas, queries, performance | read-only to start | `uvx`, a connection URL |
46
+ | [`metabase`](#metabase) | Questions about your data | yes | Metabase with MCP on |
47
+ | [`context7`](#context7) | Documentation of libraries | no | nothing |
48
+ | [`playwright`](#playwright) | A real browser | yes, on the sites it opens | `npx` |
49
+ | [`encord`](#encord) | Labeling projects | read-only to start | `uvx`, an SSH key |
50
+ | [`valohai`](#valohai) | ML executions and pipelines | read-only to start | `uvx`, an API token |
51
+ | [`rea`](#rea) | Reverse engineering of apps | writes extracted files | `npx`, Ghidra for native programs |
52
+
53
+ Whatever a server can do, your account's permissions limit it, and lcode asks before every call unless you put a
54
+ tool in the server's `allow` list or use `yolo` mode.
55
+
56
+ `npx` comes with [Node.js](https://nodejs.org) and `uvx` with [uv](https://docs.astral.sh/uv/getting-started/installation/).
57
+
58
+ ## Code and projects
59
+
60
+ ### github
61
+
62
+ ```bash
63
+ lcode mcp add github
64
+ ```
65
+
66
+ Uses the GitHub CLI's token if you have `gh`, or one [you create](mcp.md#github). Four toolsets are on:
67
+
68
+ - **Repositories:** read files, list branches, commits, tags and releases, search code and commits; also create and
69
+ change files, branches and repositories, and delete files or repositories.
70
+ - **Issues:** search, read, create and change issues and comments.
71
+ - **Pull requests:** search, read, create, review, update and merge.
72
+ - **Actions:** list runs, read job logs, start, rerun or cancel workflows.
73
+
74
+ > *"Read the logs of the last failed Actions run in OWNER/REPO and find the cause in this code."*
75
+
76
+ ### atlassian
77
+
78
+ ```bash
79
+ lcode mcp add atlassian
80
+ ```
81
+
82
+ Signs you in through the browser. The server covers Jira, Confluence, Bitbucket Cloud and Compass, and more of
83
+ Atlassian's products. It shows its most-used tools and lets the model look up the rest.
84
+
85
+ - An organization's admin decides which groups of tools (read, write, search) are allowed. Deleting and managing in
86
+ Jira is off unless an admin turns it on.
87
+ - Bitbucket works only if the workspace is linked to an Atlassian organization.
88
+ - Jira Service Management accepts API tokens only, so it isn't available after the browser sign-in. See
89
+ [Signing in](mcp.md#signing-in) for adding the server with a token.
90
+
91
+ > *"Summarize the open bugs assigned to me in Jira and find the code for the top one."*
92
+
93
+ ### linear
94
+
95
+ ```bash
96
+ lcode mcp add linear
97
+ ```
98
+
99
+ Signs you in through the browser. Finds, creates and updates issues, projects and comments. For read-only access,
100
+ change the address in `mcp.json` to `https://mcp.linear.app/mcp/readonly`.
101
+
102
+ > *"List my Linear issues in the current cycle and say which ones touch this repository."*
103
+
104
+ ### notion
105
+
106
+ ```bash
107
+ lcode mcp add notion
108
+ ```
109
+
110
+ Signs you in through the browser. Searches and reads Notion, drafts and updates pages, and manages databases,
111
+ views, comments and files.
112
+
113
+ > *"Find our API style guide in Notion and check this module against it."*
114
+
115
+ ### google-drive
116
+
117
+ ```bash
118
+ lcode mcp add google-drive
119
+ ```
120
+
121
+ Searches files, reads their content and metadata, downloads them and creates new ones. It needs an OAuth client from
122
+ your own Google Cloud project ([steps](mcp.md#google-drive)).
123
+
124
+ > *"Find the latest requirements document in my Drive and list what this project doesn't implement yet."*
125
+
126
+ ## Operations and cloud
127
+
128
+ ### sentry
129
+
130
+ ```bash
131
+ lcode mcp add sentry
132
+ ```
133
+
134
+ Signs you in through the browser. Looks up issues, errors, traces and logs, and can have Sentry's Seer analyze an
135
+ issue. Some tools create or change projects, alert rules and monitors, so read each call before you allow it.
136
+
137
+ > *"Fix this Sentry issue: PASTE-THE-ISSUE-URL"*
138
+
139
+ ### grafana
140
+
141
+ ```bash
142
+ lcode mcp add grafana
143
+ ```
144
+
145
+ Asks for Grafana's address and a service account token (**Administration > Users and access > Service accounts**).
146
+ Covers dashboards, Prometheus and Loki queries, other data sources, alert rules, incidents and on-call schedules.
147
+ It starts read-only: remove `--disable-write` from its `args` in `mcp.json` to let it change
148
+ dashboards and alert rules. It has about 80 tools, so list the ones you use under `tools` in `mcp.json`.
149
+
150
+ > *"Query Loki for errors of the checkout service in the last hour and find where this code logs them."*
151
+
152
+ ### aws
153
+
154
+ ```bash
155
+ lcode mcp add aws
156
+ ```
157
+
158
+ Uses your local AWS credentials.
159
+
160
+ - `call_aws` runs AWS CLI commands.
161
+ - `suggest_aws_commands` suggests commands for a task described in words.
162
+
163
+ It starts read-only: set `READ_OPERATIONS_ONLY` to `"false"` in `mcp.json` to allow changes. AWS says its newer
164
+ server, [`aws-mcp`](#aws-mcp), supersedes this one, which still works but shows a notice. Add one of the two, not both.
165
+
166
+ > *"Which Lambda functions in eu-central-1 still use Python 3.10?"*
167
+
168
+ ### aws-mcp
169
+
170
+ ```bash
171
+ lcode mcp add aws-mcp
172
+ ```
173
+
174
+ The [AWS MCP Server](https://docs.aws.amazon.com/agent-toolkit/latest/userguide/mcp-server.html), which AWS runs. A small
175
+ local proxy (`mcp-proxy-for-aws-cli`, through `uvx`) signs the requests with your AWS credentials.
176
+
177
+ | Tool | |
178
+ |---|---|
179
+ | `aws___run_script` | Runs Python with AWS API access in AWS's sandbox: list resources, check them, change them |
180
+ | `aws___get_tasks` | The status of a long-running script |
181
+ | `aws___get_presigned_url` | Upload and download links for S3 |
182
+ | `aws___search_documentation`, `aws___read_documentation`, `aws___retrieve_skill` | AWS documentation and AWS's step-by-step skills |
183
+ | `aws___list_regions`, `aws___get_regional_availability` | Regions, and what's available in each |
184
+
185
+ It **can change your resources**: unlike `aws`, it has no read-only setting that keeps API access. Your IAM permissions
186
+ decide what it can do, so use a profile with only the access you want, for example AWS's `ReadOnlyAccess` policy, and
187
+ read each script before you allow it. `--read-only` in its `args` in `mcp.json` hides the tools that can write, which
188
+ probably leaves only the documentation tools. Add either `aws` or `aws-mcp`, not both, and leave out `aws-knowledge`
189
+ too, since its tools are included: AWS says overlapping tools confuse the model.
190
+
191
+ > *"List my S3 buckets that aren't encrypted with KMS."*
192
+
193
+ ### aws-knowledge
194
+
195
+ ```bash
196
+ lcode mcp add aws-knowledge
197
+ ```
198
+
199
+ Needs no account. Five tools, about 2,600 tokens: search and read AWS documentation, list regions, check what's
200
+ available in a region, and fetch AWS's own skills (step-by-step guides).
201
+
202
+ > *"Look up the current limits of SQS FIFO queues."*
203
+
204
+ ### gcp
205
+
206
+ ```bash
207
+ lcode mcp add gcp
208
+ ```
209
+
210
+ One tool, `run_gcloud_command`, which runs `gcloud` with your own sign-in; the server refuses some commands. It isn't
211
+ read-only, so read each command before you allow it.
212
+
213
+ > *"List my Cloud Run services and their last deployment."*
214
+
215
+ ### kubernetes
216
+
217
+ ```bash
218
+ lcode mcp add kubernetes
219
+ ```
220
+
221
+ Uses your kubeconfig and its current context. Lists and reads pods, logs, events, nodes, namespaces and other
222
+ resources, and resource use. It starts read-only: remove `--read-only` in `mcp.json` to allow changes.
223
+
224
+ > *"Why does the api pod in the staging namespace keep restarting?"*
225
+
226
+ ## Data
227
+
228
+ ### postgres
229
+
230
+ ```bash
231
+ lcode mcp add postgres
232
+ ```
233
+
234
+ Asks for a connection URL. Read-only to start (restricted mode).
235
+
236
+ | Tool | |
237
+ |---|---|
238
+ | `list_schemas`, `list_objects`, `get_object_details` | What's in the database |
239
+ | `execute_sql` | Run a query |
240
+ | `explain_query` | A query's execution plan, also with hypothetical indexes |
241
+ | `get_top_queries` | The slowest queries (needs `pg_stat_statements`) |
242
+ | `analyze_workload_indexes`, `analyze_query_indexes` | Index recommendations |
243
+ | `analyze_db_health` | Health checks: caches, connections, indexes and more |
244
+
245
+ > *"Explain why this query in reports.py is slow and suggest an index."*
246
+
247
+ ### metabase
248
+
249
+ ```bash
250
+ lcode mcp add metabase
251
+ ```
252
+
253
+ Asks for your Metabase address, then signs you in through the browser. Searches, browses and queries your data through
254
+ Metabase's semantic layer, and creates content, within your Metabase permissions. An admin must have the MCP server on
255
+ ([details](mcp.md#metabase)). Inline charts aren't shown in a terminal.
256
+
257
+ > *"Using Metabase, what were the ten best-selling products last month?"*
258
+
259
+ ## Writing and testing code
260
+
261
+ ### context7
262
+
263
+ ```bash
264
+ lcode mcp add context7
265
+ ```
266
+
267
+ Needs no account; a free API key raises the rate limits. Two tools, about 1,700 tokens: `resolve-library-id` finds a
268
+ library and `query-docs` fetches its current documentation and examples.
269
+
270
+ > *"Use context7 to look up how Pydantic 2 validators work, then update this model."*
271
+
272
+ ### playwright
273
+
274
+ ```bash
275
+ lcode mcp add playwright
276
+ ```
277
+
278
+ A headless browser: open pages, click, type, fill forms, read the page, take screenshots, and look at the console and
279
+ network. The first use may download the browser. Pages it opens are untrusted content.
280
+
281
+ > *"Open http://localhost:3000, sign up with test data and tell me which errors appear in the console."*
282
+
283
+ ## Machine learning
284
+
285
+ ### encord
286
+
287
+ ```bash
288
+ lcode mcp add encord
289
+ ```
290
+
291
+ Ships with lcode and signs in with an SSH key you registered in Encord. Lists projects, datasets and tasks, shows
292
+ ontologies, workflow progress and the labels on a data unit. Assigning tasks and setting priorities needs
293
+ `--allow-writes` in the server's `args` ([tools](mcp.md#encord)).
294
+
295
+ > *"How many tasks are left in review in the project Street Scenes?"*
296
+
297
+ ### valohai
298
+
299
+ ```bash
300
+ lcode mcp add valohai
301
+ ```
302
+
303
+ Ships with lcode and needs an API token. Lists projects, executions and pipelines, reads logs, metrics and outputs, and
304
+ compares executions. Starting and stopping executions needs `--allow-writes` ([tools](mcp.md#valohai)).
305
+
306
+ > *"Compare the last two training executions and explain the drop in accuracy."*
307
+
308
+ ## Reverse engineering
309
+
310
+ ### rea
311
+
312
+ ```bash
313
+ lcode mcp add rea
314
+ ```
315
+
316
+ Only for software you own or are authorized to examine. Ten tools, about 4,700 tokens.
317
+
318
+ | Target | Tools the model uses | You need |
319
+ |---|---|---|
320
+ | Electron apps (`.asar`) and archives | `open_binary`, `extract_artifact`, then lcode reads the files | a recent Node.js |
321
+ | Native programs | `open_binary`, `binary_overview`, `list_procedures`, `search_strings`, `trace_feature`, `xrefs`, `procedure_callers`, `procedure_pseudo_code` | also Ghidra 12.2 and a full JDK 25 |
322
+
323
+ `close_binary` lets go of the target. Press Enter at both questions of `lcode mcp add rea` if you only need Electron
324
+ apps. With a local model, Electron apps worked in our tests, while native programs often didn't: see the
325
+ [measured results](mcp.md#rea), and check the answers.
326
+
327
+ > *"Use REA to extract /path/to/app.asar, then explain how search works in this app. Name the file and function."*
328
+
329
+ ## Any other server
330
+
331
+ ```bash
332
+ lcode mcp add NAME --url https://mcp.example.com/mcp # a remote server
333
+ lcode mcp add NAME -- npx -y some-mcp-server # a local one
334
+ ```
335
+
336
+ See [Adding your own servers](mcp.md#adding-your-own-servers). Anyone can write an MCP server, so add only those you
337
+ trust: a local one runs on your machine with your permissions.
338
+
339
+ ## If something doesn't work
340
+
341
+ `lcode mcp list` says what's wrong. `needs sign-in` means `lcode mcp login NAME`; see also
342
+ [Troubleshooting](mcp.md#troubleshooting).
343
+
344
+ The tools described here come from each project's own documentation in November 2026. lcode's maintainers tested
345
+ `aws-knowledge`, `context7` and `rea` for this page; the others can change on their side, so
346
+ `lcode mcp tools NAME` shows what a server offers today.
lcode/docs/mcp.md CHANGED
@@ -16,12 +16,15 @@ and find the code for the top one."*
16
16
 
17
17
  ## Ready-made servers
18
18
 
19
+ The [MCP server guide](mcp-guide.md) explains each one: what it does, how to add it and what to ask.
20
+
19
21
  `lcode mcp add <name>` sets these up, asks for anything they need and tests the connection:
20
22
 
21
23
  | Name | What it gives the model | You need |
22
24
  |---|---|---|
23
- | `atlassian` | Jira, Confluence, Jira Service Management, Compass, Bitbucket | an Atlassian account (browser sign-in) |
25
+ | `atlassian` | Jira, Confluence, Bitbucket, Compass | an Atlassian account (browser sign-in) |
24
26
  | `aws` | AWS CLI commands on your account, read-only unless you change it | `uvx` and AWS credentials |
27
+ | `aws-mcp` | AWS's newer managed server: API calls through Python scripts, docs and skills; can change things | `uvx` and AWS credentials |
25
28
  | `aws-knowledge` | Current AWS documentation, code samples, regional availability | nothing |
26
29
  | `google-drive` | Search, read and create files in Google Drive | your own Google OAuth client ([below](#google-drive)) |
27
30
  | `grafana` | Dashboards, Prometheus and Loki queries, alerts, incidents | `uvx`, a Grafana service account token |
@@ -37,12 +40,13 @@ and find the code for the top one."*
37
40
  | `metabase` | Explore your data and ask questions through Metabase's semantic layer | Metabase 60 or later with MCP on ([below](#metabase)) |
38
41
  | `encord` | Projects, datasets, ontologies, labeling progress, tasks and labels, read-only | `uvx`, an SSH key registered in Encord ([below](#encord)) |
39
42
  | `valohai` | ML executions with their logs, metrics and outputs, and pipelines, read-only | `uvx`, a Valohai API token ([below](#valohai)) |
43
+ | `rea` | Reverse engineering: unpack Electron apps and archives, decompile native programs | `npx` (a recent Node.js); Ghidra and a JDK for native programs ([below](#rea)) |
40
44
 
41
45
  `npx` comes with [Node.js](https://nodejs.org) (18 or newer) and `uvx` with
42
46
  [uv](https://docs.astral.sh/uv/getting-started/installation/). `lcode mcp catalog` shows what's missing
43
47
  on your machine.
44
48
 
45
- Servers that can change things start read-only where the server supports it (`aws`, `postgres`,
49
+ Servers that can change things start read-only where the server supports it (`aws`, `grafana`, `postgres`,
46
50
  `kubernetes`, `encord`, `valohai`); the setup note tells you which setting to change to allow writes.
47
51
 
48
52
  ### Signing in
@@ -75,14 +79,16 @@ keep the tool list short; change `X-MCP-Toolsets` in `mcp.json` for
75
79
  ### Google Drive
76
80
 
77
81
  Google doesn't let apps register themselves, so the Drive server needs an OAuth client from your own
78
- Google Cloud project:
82
+ Google Cloud project. For your own Google account, the quickest way is Google Cloud's **personal mode** setup
83
+ (described in Google's guide below): choose a **Desktop app** client, then go to step 4. Otherwise:
79
84
 
80
85
  1. In a Google Cloud project, enable the **Google Drive API** and the **Google Drive MCP API**.
81
86
  2. Configure the OAuth consent screen (while it's in testing, add yourself as a test user).
82
- 3. Create an **OAuth client ID** of type **Desktop app**, and copy its ID and secret.
87
+ 3. Create an **OAuth client ID** of type **Desktop app**, with **Use this client for an AI-powered agent**
88
+ selected, and copy its ID and secret.
83
89
  4. Run `lcode mcp add google-drive` and paste them; lcode then signs you in through the browser.
84
90
 
85
- See [Google's guide](https://developers.google.com/workspace/guides/configure-mcp-servers) for
91
+ See [Google's guide](https://developers.google.com/workspace/drive/api/guides/configure-mcp-server) for
86
92
  details.
87
93
 
88
94
  ### Images and videos
@@ -140,6 +146,41 @@ Both servers are ordinary MCP servers: other MCP clients can use them too, for e
140
146
  `uvx --isolated --from lcode-cli lcode-mcp-valohai` with `VALOHAI_TOKEN` set. Keep `--isolated`: without it,
141
147
  `uvx` reuses an lcode you installed with `uv tool install`, which may be older or lack the Encord SDK.
142
148
 
149
+ ### REA
150
+
151
+ [REA](https://github.com/morluto/rea) (Reverse Engineer Anything) lets the model examine an app without its
152
+ source code. Use it only for software you own or are authorized to examine.
153
+
154
+ ```bash
155
+ lcode mcp add rea
156
+ ```
157
+
158
+ Then ask, for example: *"Use REA to extract /path/to/app.asar, then explain how search works in this app.
159
+ Name the file and function for each point."*
160
+
161
+ | Target | You need |
162
+ |---|---|
163
+ | Electron apps (`.asar`) and other archives | Node.js 22.23.4 or later in its 22 line, or a current 24 or 26 |
164
+ | Native programs | Node.js as above, [Ghidra](https://github.com/NationalSecurityAgency/ghidra/releases) 12.2 and a full JDK 25 (the Java runtime alone isn't enough). Give both folders when `lcode mcp add rea` asks |
165
+
166
+ The first start downloads REA from npm (42 MB, 186 MB unpacked), without install scripts and without its
167
+ optional packages. lcode sets up the version it was tested with; to try a newer one, change the version in
168
+ `mcp.json`.
169
+
170
+ - **Context.** All of REA's 263 tools would take about 82,000 tokens. lcode offers 10, about 4,700 tokens, so
171
+ they're sent with every request at 32K. Add others under `tools` in `mcp.json`, at the cost of context.
172
+ - **Electron apps.** The model opens the app and extracts it; `extract_artifact` writes the files to a folder,
173
+ and the model then reads them with lcode's own tools.
174
+ - **Permission.** Every call asks first, as with any MCP server. As REA documents them, the 10 tools read and unpack the target but
175
+ don't run it. Some of REA's other tools do run programs or attach to them, so think before you add them.
176
+ - **What to expect from a local model.** This was measured with qwen3.6-35b at 32K. On a tiny Electron app, four
177
+ runs (three with an earlier set of 8 tools) took 1 to 2 minutes each: three answers were right and one had a small
178
+ mistake. Native programs are much harder. On a small stripped program (a license-key check), three runs were tried: two finished in
179
+ 4 to 5 minutes, and one ran out of its 15. Of the two, one worked out a key the program accepts, with a mistake in
180
+ its explanation; the other misread a number format and its key was rejected. Check the answers, and
181
+ expect larger apps to be harder.
182
+ - **REA's workflow skill** is about 34 KB, too long for a 32K window, so lcode doesn't install it.
183
+
143
184
  ## Adding your own servers
144
185
 
145
186
  Any MCP server works. For a remote server, give its URL; for a local one, the command that starts it:
@@ -137,6 +137,43 @@ result dropped beyond the noise, so a script can stop on it.
137
137
  if the dev slice doesn't drop beyond the noise against the last baseline, and the comparison goes on
138
138
  its pull request. See the [release steps](contributing.md#releases).
139
139
 
140
+ ## Baselines
141
+
142
+ lcode 0.63.0 on the dev slice, on a laptop with a 12 GB GPU (RTX 4080 Laptop) and 31 GB of RAM, with
143
+ nothing else running:
144
+
145
+ | Model | Context | Attempts | pass@1 | Terminal-Bench | SWE-bench | pass^3 | Speed | Time |
146
+ |---|---|---|---|---|---|---|---|---|
147
+ | qwen3.6-35b | 32K | 3 | 55% | 51% | 60% | 36% | 73 tokens/s | 11.4 h |
148
+ | qwen3.6-35b | 64K | 3 | 61% | 51% | 77% | 40% | 67 tokens/s | 11.8 h |
149
+ | qwen3.6-35b | 256K | – | stopped after 2 h | | | | 26–46 tokens/s | |
150
+ | qwen3.8-27b | 32K | 1 | 36% of 22 tasks | 20% | 71% of 7 | – | 9 tokens/s | stopped after 9 h |
151
+
152
+ To reproduce them:
153
+
154
+ ```bash
155
+ lcode bench --harbor dev qwen3.6-35b --context 32k
156
+ lcode bench --harbor dev qwen3.6-35b --context 64k
157
+ lcode bench --harbor dev qwen3.6-35b --context 256k
158
+ lcode bench --harbor dev qwen3.8-27b --context 32k --attempts 1
159
+ ```
160
+
161
+ - **32K or 64K:** 64K passed 7 points more, within the noise (±11), so this slice doesn't show that 64K
162
+ helps. It did waste less: 5 replies that went nowhere instead of 20. The 32K run is the baseline the
163
+ [release rule](#comparing-two-runs) compares against.
164
+ - **256K doesn't fit this machine.** Ollama kept 4 of the model's 9 GB on the GPU and took 23 GB of
165
+ RAM, so the system started swapping. Generation fell from 40–46 to 26 tokens/s, and the run was
166
+ stopped after 2 hours. By then 2 of 8 Terminal-Bench attempts had passed and 6 had run out of time,
167
+ `crack-7z-hash` among them, which passed 3 times out of 3 at 32K. With 12 GB of GPU memory, use 64K
168
+ at most.
169
+ - **qwen3.8-27b is too slow on a 12 GB GPU.** The dense 27B model is larger than the GPU (8 of its
170
+ 20 GB fit), so it generates 9 tokens/s, and 12 of the 15 Terminal-Bench tasks ran out of time. The
171
+ run was stopped after 9 hours, when generation fell to 4 tokens/s, and 3 SWE-bench tasks didn't
172
+ run. On the 22 tasks it ran, qwen3.6-35b at 32K passed 56%.
173
+
174
+ Runs on other machines differ, mostly through the model's speed: a faster GPU runs into the tasks' time
175
+ limits less often.
176
+
140
177
  ## Other agents on the same model
141
178
 
142
179
  `--agent` runs Claude Code, OpenCode or Codex on the same tasks, with the same model, context
lcode/docs/quickstart.md CHANGED
@@ -12,7 +12,7 @@ lcode
12
12
 
13
13
  ```text
14
14
  ╭──────────────────────────────────────────────╮
15
- │ lcode v0.63.1 — local coding agent │
15
+ │ lcode v0.65.0 — local coding agent │
16
16
  │ │
17
17
  │ model lcode-qwen3.6-35b │
18
18
  │ context 256K tokens │
lcode/mcp/catalog.toml CHANGED
@@ -7,11 +7,11 @@
7
7
  # requires commands that must be installed.
8
8
  # login sign in through the browser (OAuth) after adding.
9
9
  #
10
- # Commands and URLs were checked against each project's documentation in September and October 2026.
10
+ # Commands and URLs were checked against each project's documentation in September to November 2026.
11
11
 
12
12
  [atlassian]
13
13
  name = "Atlassian"
14
- description = "Jira, Confluence, Jira Service Management, Compass and Bitbucket"
14
+ description = "Jira, Confluence, Bitbucket and Compass"
15
15
  homepage = "https://github.com/atlassian/atlassian-mcp-server"
16
16
  login = true
17
17
  setup = "Sign in with your Atlassian account in the browser."
@@ -22,7 +22,7 @@ name = "AWS"
22
22
  description = "Run AWS CLI commands against your account (read-only unless you change it)"
23
23
  homepage = "https://awslabs.github.io/mcp/servers/aws-api-mcp-server"
24
24
  requires = ["uvx"]
25
- setup = "Uses your local AWS credentials (aws configure or aws sso login). Read-only to start: set READ_OPERATIONS_ONLY to \"false\" in mcp.json to allow changes; lcode still asks before every call."
25
+ setup = "Uses your local AWS credentials (aws configure or aws sso login). AWS now recommends its newer server: lcode mcp add aws-mcp. Read-only to start: set READ_OPERATIONS_ONLY to \"false\" in mcp.json to allow changes; lcode still asks before every call."
26
26
 
27
27
  [aws.server]
28
28
  command = "uvx"
@@ -39,6 +39,34 @@ var = "AWS_PROFILE"
39
39
  prompt = "AWS profile (from ~/.aws/config)"
40
40
  default = "default"
41
41
 
42
+ [aws-mcp]
43
+ name = "AWS MCP Server"
44
+ description = "AWS's newer managed server: AWS API calls through Python scripts, documentation and skills (can change things)"
45
+ homepage = "https://docs.aws.amazon.com/agent-toolkit/latest/userguide/mcp-server.html"
46
+ requires = ["uvx"]
47
+ setup = """AWS runs this server; a local proxy signs requests with your AWS credentials (aws configure, aws sso login or
48
+ aws login). It can change resources: your IAM permissions decide what it can do, so use a profile with only the access
49
+ you want, and lcode asks before every call. Add --read-only to its args in mcp.json to hide the tools that can write.
50
+ Add either this or "aws", not both: their tools overlap."""
51
+
52
+ [aws-mcp.server]
53
+ command = "uvx"
54
+ # mcp-proxy-for-aws-cli pins all of its dependencies, and signs requests with your credentials (SigV4).
55
+ args = [
56
+ "--python", "3.12", "mcp-proxy-for-aws-cli@1.8.0", "https://aws-mcp.us-east-1.api.aws/mcp",
57
+ "--profile", "${AWS_PROFILE}", "--metadata", "AWS_REGION=${AWS_REGION}", "--disable-telemetry",
58
+ ]
59
+
60
+ [[aws-mcp.inputs]]
61
+ var = "AWS_REGION"
62
+ prompt = "AWS region for your resources"
63
+ default = "us-east-1"
64
+
65
+ [[aws-mcp.inputs]]
66
+ var = "AWS_PROFILE"
67
+ prompt = "AWS profile (from ~/.aws/config)"
68
+ default = "default"
69
+
42
70
  [aws-knowledge]
43
71
  name = "AWS Knowledge"
44
72
  description = "Up-to-date AWS documentation, code samples and regional availability (no AWS account needed)"
@@ -50,11 +78,13 @@ name = "Google Drive"
50
78
  description = "Search, read and create files in your Google Drive"
51
79
  homepage = "https://developers.google.com/workspace/drive/api/guides/configure-mcp-server"
52
80
  login = true
53
- setup = """Google needs an OAuth client from your own Google Cloud project:
81
+ setup = """Google needs an OAuth client from your own Google Cloud project. For your own account, the quickest way is Google
82
+ Cloud's personal mode setup, with a "Desktop app" client. Otherwise:
54
83
  1. In a Google Cloud project, enable the Google Drive API and the Google Drive MCP API.
55
84
  2. Configure the OAuth consent screen (add yourself as a test user if the app is in testing).
56
- 3. Create an OAuth client ID of type "Desktop app" and copy its client ID and secret.
57
- Guide: https://developers.google.com/workspace/guides/configure-mcp-servers"""
85
+ 3. Create an OAuth client ID of type "Desktop app", with "Use this client for an AI-powered agent" selected, and
86
+ copy its client ID and secret.
87
+ Guide: https://developers.google.com/workspace/drive/api/guides/configure-mcp-server"""
58
88
 
59
89
  [google-drive.server]
60
90
  type = "http"
@@ -80,11 +110,11 @@ name = "Grafana"
80
110
  description = "Dashboards, Prometheus and Loki queries, alerts and incidents"
81
111
  homepage = "https://github.com/grafana/mcp-grafana"
82
112
  requires = ["uvx"]
83
- setup = "Create a service account token in Grafana: Administration > Users and access > Service accounts. The server has about 80 tools; list the ones you use under \"tools\" in mcp.json to save context."
113
+ setup = "Create a service account token in Grafana: Administration > Users and access > Service accounts. Read-only to start: remove --disable-write in mcp.json to let it change dashboards and alert rules. The server has about 80 tools; list the ones you use under \"tools\" in mcp.json to save context."
84
114
 
85
115
  [grafana.server]
86
116
  command = "uvx"
87
- args = ["--python", "3.12", "mcp-grafana"]
117
+ args = ["--python", "3.12", "mcp-grafana", "--disable-write"]
88
118
  env = { GRAFANA_URL = "${GRAFANA_URL}", GRAFANA_SERVICE_ACCOUNT_TOKEN = "${GRAFANA_SERVICE_ACCOUNT_TOKEN}" }
89
119
 
90
120
  [[grafana.inputs]]
@@ -254,3 +284,41 @@ var = "VALOHAI_HOST"
254
284
  prompt = "Valohai address (Enter for app.valohai.com; for a self-hosted installation, its URL)"
255
285
  optional = true
256
286
 
287
+ [rea]
288
+ name = "REA"
289
+ description = "Reverse engineering: unpack Electron apps and archives, decompile native programs with Ghidra"
290
+ homepage = "https://github.com/morluto/rea"
291
+ requires = ["npx"]
292
+ setup = """Only for software you own or are authorized to examine. Electron apps and archives need only a recent Node.js (22.23.4
293
+ or later in its 22 line, or a current 24 or 26). Native programs also need Ghidra 12.2 and a full JDK 25, not just the Java
294
+ runtime: give their folders, or press Enter to skip them."""
295
+
296
+ [rea.server]
297
+ command = "npx"
298
+ # The version lcode was tested with. No install scripts and no optional packages: frida, for hooking into running
299
+ # programs, is one, and lcode doesn't offer the tools that use it.
300
+ args = ["-y", "rea-agents@6.10.1", "mcp"]
301
+ env = { npm_config_ignore_scripts = "true", npm_config_omit = "optional", NO_UPDATE_NOTIFIER = "1", GHIDRA_INSTALL_DIR = "${GHIDRA_INSTALL_DIR}", JAVA_HOME = "${JAVA_HOME}" }
302
+ # All 263 definitions take about 82,000 tokens. These fit in a 32K window and don't launch the target.
303
+ tools = [
304
+ "open_binary",
305
+ "extract_artifact",
306
+ "binary_overview",
307
+ "list_procedures",
308
+ "search_strings",
309
+ "trace_feature",
310
+ "xrefs",
311
+ "procedure_callers",
312
+ "procedure_pseudo_code",
313
+ "close_binary",
314
+ ]
315
+
316
+ [[rea.inputs]]
317
+ var = "GHIDRA_INSTALL_DIR"
318
+ prompt = "Ghidra folder, full path (Enter to skip native programs)"
319
+ optional = true
320
+
321
+ [[rea.inputs]]
322
+ var = "JAVA_HOME"
323
+ prompt = "JDK 25 folder, full path (Enter to use the java on your PATH)"
324
+ optional = true
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: lcode-cli
3
- Version: 0.63.1
3
+ Version: 0.65.0
4
4
  Summary: A local-first terminal coding agent powered by open-weight models on your own GPU or Mac, via Ollama.
5
5
  Project-URL: Homepage, https://nasser1941.github.io/lcode/
6
6
  Project-URL: Documentation, https://nasser1941.github.io/lcode/
@@ -117,8 +117,9 @@ through [Ollama](https://ollama.com), and when it needs current information it c
117
117
  - **Bring your own model.** Eight curated open-weight models, all tested end to end, or any Ollama model
118
118
  with tool calling. Or use LM Studio, llama.cpp, vLLM or MLX instead of Ollama.
119
119
  - **MCP servers, ready to go.** Connect Jira and Confluence, GitHub, AWS, Google Drive, Grafana,
120
- Google Cloud, Sentry, Linear, Notion, Postgres, Kubernetes, Metabase, Encord, Valohai and more with one command
121
- (`lcode mcp add atlassian`), or any other MCP server. Browser sign-in (OAuth) is built in.
120
+ Google Cloud, Sentry, Linear, Notion, Postgres, Kubernetes, Metabase, Encord, Valohai, REA (reverse engineering)
121
+ and more with one command (`lcode mcp add atlassian`), or any other MCP server. Browser sign-in (OAuth) is built in.
122
+ See the [MCP server guide](https://nasser1941.github.io/lcode/mcp-guide/).
122
123
  - **Sees images.** Attach a screenshot or mockup with `@path` and lcode looks at it, using the
123
124
  vision part of your model.
124
125
  - **Images, videos and films.** Image and video [modes](https://nasser1941.github.io/lcode/modes/)
@@ -10,19 +10,20 @@ lcode/docs/how-it-works.md,sha256=AzL29CBueTf5t6NF_xCer3QdXiWcGZ-y7-glm6zD4VU,15
10
10
  lcode/docs/index.md,sha256=MbXP--ui-OwfNE4Q91oRh7TubdFNMH-RrliHkld6lYE,3815
11
11
  lcode/docs/installation.md,sha256=vaMYDEinR04A3neUUJx5bP2PlIyfhk6miarUrnq4rKg,7257
12
12
  lcode/docs/lsp.md,sha256=tou-eJFMPvAJt0_-NaCm-c4OtfgVhok4Ig8NJnj6Rhs,3405
13
- lcode/docs/mcp.md,sha256=Ol3ScuP4i2KsoN9xaSEbnm86Tvoc1qnUV7zkRprWwHo,15168
13
+ lcode/docs/mcp-guide.md,sha256=zxsPcfHbX5RN1yjMaYG7y-qR5-EZBG7M-TwmM7AQjZs,13743
14
+ lcode/docs/mcp.md,sha256=TWX9BDA9xGLUGr-O66mi6EePr5ERvNG--S_vVy9yrOI,18136
14
15
  lcode/docs/memory.md,sha256=XbsNnTwRdnUEYW7_2U1GHbtK0uOjTxR-s2EujgJbR0Y,6889
15
16
  lcode/docs/models.md,sha256=OE_Lp_rLHiCSWPApHqKkv2GzRb81udGJqamGdx-Gy7A,18280
16
17
  lcode/docs/modes.md,sha256=q5ut1jR1PWnyMmXNT0cq7adCqj-bWrZDD2Y2X-L5ty0,34197
17
- lcode/docs/public-benchmarks.md,sha256=vYv4-kUV0RN3G-FK_YCcr2_WkIgn41kgtA_DDqwKNkA,11052
18
- lcode/docs/quickstart.md,sha256=RTvGNmy94AZNjmFvyr3gILNXrc4_ClfooGSYF--NHs0,3403
18
+ lcode/docs/public-benchmarks.md,sha256=W45-jWSgCLf7-F8QAxm8vzNvvHDzVPKbWz1jmWoJxC8,13059
19
+ lcode/docs/quickstart.md,sha256=IS9h7KapLP9eTkz4879EJ3GqOSUtWKdjWQg_FB4UF1w,3403
19
20
  lcode/docs/sandbox.md,sha256=-_jc2I0LXKQIYCz_JOuHGaP2ehVuEqEepKqMATlFpZY,4064
20
21
  lcode/docs/search.md,sha256=1Sqkfc9NRftpcfBFG9b_D8Ns-octH399AaaSNBPHq28,4251
21
22
  lcode/docs/servers.md,sha256=0ddumHseQXx0CP0nqzgwV-493s81kdEBa6qtUYe9t6k,5718
22
23
  lcode/docs/traces.md,sha256=_rP0XIgyeiZPld4VjP-ISlyf6ZPoKQBTQPLVbyp5fUE,10201
23
24
  lcode/docs/troubleshooting.md,sha256=iD72y6GOlwLK0HNA1mxfucSU40Iwp7kGyGJa_AX1OWs,9052
24
25
  lcode/docs/usage.md,sha256=cIq3cQjnb71DRJN7JXW-DBLFC8bn9680PvU1249h_rI,52175
25
- lcode/__init__.py,sha256=P4GUmWuUGc0syg6iFxtkWjnjp_qTeIutfDQe_424CF8,473
26
+ lcode/__init__.py,sha256=vPl2L9QyLmXxLkulgeIO4ZaA3ogJ5D6gUyweW0sVRoI,473
26
27
  lcode/__main__.py,sha256=s5N5pryX2FAu93GGZ3FxUrIXHWGzxz66lKUoaV_h8Ws,35
27
28
  lcode/acp.py,sha256=9S2n1ycB_IWeOv3zIbuwa6oFW2wyC-GKXcc3Jg5AfQk,30326
28
29
  lcode/action.py,sha256=wuT5F9EJCdEligPeytzmEi8FpahWBhXer528tpuTj_k,16711
@@ -124,7 +125,7 @@ lcode/web.py,sha256=vyxKbSRJTl1Lj3hj7Yd_NwTgbv0Xi6dup2YfUXjqp-Y,14579
124
125
  lcode/mcp/__init__.py,sha256=XujtAmRoXW9S0uq1XPf_CAeCkHh_UvA8FCmoAKP9j1Y,171
125
126
  lcode/mcp/auth.py,sha256=XH52GaonFCaCxhpNyMmD7iRDeDURV9rBIboJdWJjNqc,16704
126
127
  lcode/mcp/catalog.py,sha256=_NnnM0pfTuEzQebeamrOHLni8KiFldfW-3kkwUNpTnc,3911
127
- lcode/mcp/catalog.toml,sha256=LTby0I98ajZS2aXZpaBq09p1nnt77xs6bngpVMWO-t4,10324
128
+ lcode/mcp/catalog.toml,sha256=HrNYWGeacFVeV2-4adDKeF3j0B9MaapqKHpZLriZD6M,13401
128
129
  lcode/mcp/client.py,sha256=3Gen7zRvWehngXn_dAMOAdKqFkFkQZIQW96hQcW4N4k,7119
129
130
  lcode/mcp/commands.py,sha256=hOND7SsJjz5Hp2CY81PHPsB4R9i8CwhBQeQi-oB8Wg4,16721
130
131
  lcode/mcp/config.py,sha256=PpTF-cEFfNnurjgypXi17_6Uoa3VGyJSXxrO5AmrbRA,8938
@@ -149,8 +150,8 @@ lcode/workflows/wan21-vace.json,sha256=vJsiRvLCXCjKIibOO0SGM3fT6bedAGxF8N2sN2vcP
149
150
  lcode/workflows/wan22-fun-inp-5b.json,sha256=4HbKEezik8MHvxTMP6PjQUPQPfCeSu10U9FrC-DHKYw,3327
150
151
  lcode/workflows/wan22-ti2v-5b.json,sha256=RcTehoC2pNizzlb7Ed3keJ56DiE7V5lhXmsvR2Y0smQ,3371
151
152
  lcode/workflows/z-image-turbo-t2i.json,sha256=sHsL7xnnuULOuWGYlQrDl4jOTySdAmb2T82c_cChv0s,1585
152
- lcode_cli-0.63.1.dist-info/METADATA,sha256=6rdZty39fMGcGeH4_IB8zuE9uAUn7wfpEbrJ--ogNqc,14260
153
- lcode_cli-0.63.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
154
- lcode_cli-0.63.1.dist-info/entry_points.txt,sha256=Hxsn_itbnbgft3U0FwxWdmEt0yoAV2LB-nJDnL9WT20,172
155
- lcode_cli-0.63.1.dist-info/licenses/LICENSE,sha256=JWjmoL7nNIC1XUa-dZm2hwLUgjUQMFo6k8APb0idNzs,1074
156
- lcode_cli-0.63.1.dist-info/RECORD,,
153
+ lcode_cli-0.65.0.dist-info/METADATA,sha256=zSDbfdH8suZjLisa0-Gg-Pe43aJjM_2DOYz-WvtEMu0,14364
154
+ lcode_cli-0.65.0.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
155
+ lcode_cli-0.65.0.dist-info/entry_points.txt,sha256=Hxsn_itbnbgft3U0FwxWdmEt0yoAV2LB-nJDnL9WT20,172
156
+ lcode_cli-0.65.0.dist-info/licenses/LICENSE,sha256=JWjmoL7nNIC1XUa-dZm2hwLUgjUQMFo6k8APb0idNzs,1074
157
+ lcode_cli-0.65.0.dist-info/RECORD,,