@ainecto/mcp 0.5.0 → 0.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 CHANGED
@@ -1,8 +1,6 @@
1
1
  # ainecto — AiNecto CLI and MCP connector
2
2
 
3
3
  Published as `ainecto`, `@ainecto/mcp` and `@ainecto/cli` — the same code. Command: `ainecto`.
4
- The older names (`ai-erd`, `@ai-erd/mcp`, `@ai-erd/cli`, command `ai-erd`) still get the same code and
5
- still work.
6
4
 
7
5
  **In a terminal, from your repository root:** `npx -y ainecto@latest init` — it asks which role this
8
6
  repository's AI sessions should have and which AiNecto project to use, and signs you in through the
@@ -42,34 +40,6 @@ codex mcp add ainecto --url https://ainecto.com/mcp #
42
40
  The client signs the user in on first use. That session has no role until `init` runs and a new
43
41
  session starts.
44
42
 
45
- ## Upgrading from ai-erd (0.4.x)
46
-
47
- Version 0.5.0 renamed what `init` writes into a repository. A repository set up by 0.4.x keeps
48
- working: the CLI reads the `ai-erd` server entry, the `.ai-erd/` folder, the `<!-- ai-erd:begin -->`
49
- block and `AI_ERD_ROLE` as its own. Running `npx -y ainecto@latest init` again moves them to the new
50
- names — nothing is left behind twice:
51
-
52
- | 0.4.x | 0.5.0 |
53
- | --- | --- |
54
- | server entry `"ai-erd"` (`npx -y @ai-erd/mcp --role …`) | `"ainecto"` (`npx -y @ainecto/mcp --role …`) — the old entry is replaced |
55
- | folder `.ai-erd/` (`HARNESS.md`, `config.json`, `init-record.json`) | `.ainecto/` — moved, and the old folder removed if 0.4.x created it |
56
- | block `<!-- ai-erd:begin -->` … `<!-- ai-erd:end -->` | `<!-- ainecto:begin -->` … — replaced in place |
57
- | `AI_ERD_ROLE` | `AINECTO_ROLE` — both are read; when both are set, `AINECTO_ROLE` wins |
58
-
59
- `ainecto init --undo` still puts back what was there before the 0.4.x `init`, with or without that
60
- second `init`. Not renamed: the role header and OAuth scope the server reads, and the sign-in on
61
- this machine.
62
-
63
- - If you added AiNecto earlier as `ai-erd` at Claude Code **user** scope or in Codex, remove it
64
- (`claude mcp remove ai-erd -s user`, `codex mcp remove ai-erd`) and add it as `ainecto` as above:
65
- under a different name it no longer hides behind the repository's entry.
66
- - Claude Code shows the tools as `mcp__ainecto__…` instead of `mcp__ai-erd__…` — update any allow
67
- list that names the old prefix.
68
- - An `ai-erd` 0.4.x installed globally does not know the new names: inside a repository set up by
69
- 0.5.0 it finds no role (so no restriction), and running its `init` there adds a second entry, block
70
- and folder. Update it (`npm install -g ai-erd@latest` gets this same code). If that already
71
- happened, 0.5.0 stops and says how to undo it (`npx -y -p @ai-erd/mcp@0.4.6 ai-erd init --undo`).
72
-
73
43
  ## Set up a repository (roles)
74
44
 
75
45
  ```bash
@@ -112,10 +82,9 @@ Anywhere else (an agent's shell, CI) it asks nothing. In both cases:
112
82
  ## Commands
113
83
 
114
84
  Prefer `npx -y ainecto@latest <command>`. To install once instead, use `npm install -g ainecto` — but
115
- install only **one** of `ainecto`, `@ainecto/mcp`, `@ainecto/cli`, `ai-erd`, `@ai-erd/mcp` and
116
- `@ai-erd/cli` globally: they are the same code and ship the same commands, so a second global install
117
- conflicts. (`ainecto` and `ai-erd` carry both commands, `ainecto` and `ai-erd`; `@ainecto/cli` carries
118
- only `ainecto`, `@ai-erd/cli` only `ai-erd`.)
85
+ install only **one** of `ainecto`, `@ainecto/mcp` and `@ainecto/cli` globally: they are the same code
86
+ and all ship the `ainecto` command, so a second global install conflicts. (`@ainecto/mcp` also carries
87
+ `mcp`, the bridge.)
119
88
 
120
89
  ```bash
121
90
  ainecto auth login # once per machine (and per --env); not per role
@@ -131,25 +100,22 @@ ainecto projects list
131
100
  ainecto erd apply-changes -f erd-operations.json --yes
132
101
  ```
133
102
 
134
- `ai-erd` is the same command under its older name — every `ainecto …` line works as `ai-erd …`.
135
-
136
103
  **The role comes from the repository.** Inside a folder set up with `ainecto init` (the command looks
137
- from the current folder upward for the first `.mcp.json`/`.cursor/mcp.json` with an `ainecto` entry —
138
- or, from 0.4.x, an `ai-erd` entry), every command uses that folder's role without `--role`. A `--role`
139
- or `AINECTO_ROLE` (or `AI_ERD_ROLE`) that differs from it is refused — the role changes only with
140
- `ainecto init --role <role>`, after asking the user. If the role there cannot be read (the
141
- `@ainecto/mcp` bridge entry without a valid `--role`, configs that disagree, an `ainecto` and an
142
- `ai-erd` bridge with different roles, broken JSON that mentions `ainecto` or `ai-erd`, a link that
143
- points outside the folder), the command stops. An entry that is not this bridge (for example an HTTP
104
+ from the current folder upward for the first `.mcp.json`/`.cursor/mcp.json` with an `ainecto` entry),
105
+ every command uses that folder's role without `--role`. A `--role` or `AINECTO_ROLE` that differs from
106
+ it is refused — the role changes only with `ainecto init --role <role>`, after asking the user. If the
107
+ role there cannot be read (the `@ainecto/mcp` bridge entry without a valid `--role`, configs that
108
+ disagree, broken JSON that mentions `ainecto`, a link that points outside the folder), the command
109
+ stops. An entry that is not this bridge (for example an HTTP
144
110
  `url` or `mcp-remote` entry) means no role there. Your home folder itself is never read as a
145
111
  repository (`~/.cursor/mcp.json` is Cursor's global config). Outside such a folder there is no role
146
112
  (no restriction), and `--role` narrows it.
147
113
  Tool names are the server's own names (`list_projects`, `erd_apply_changes`, …). Your AI client
148
- shows them with its own prefix, for example `mcp__ainecto__list_projects` in Claude Code
149
- (`mcp__ai-erd__…` for a 0.4.x setup); the CLI does not use that prefix. A tool name that starts with
114
+ shows them with its own prefix, for example `mcp__ainecto__list_projects` in Claude Code; the CLI
115
+ does not use that prefix. A tool name that starts with
150
116
  the server's older `mcp__ainecto__` prefix is still accepted.
151
117
 
152
- Every command takes `--env dev` for `https://dev.ai-erd.com/mcp`. Endpoint resolution priority:
118
+ Every command takes `--env dev` for `https://dev.ainecto.com/mcp`. Endpoint resolution priority:
153
119
 
154
120
  1. `--endpoint <url>`
155
121
  2. `AINECTO_MCP_ENDPOINT`
@@ -160,10 +126,8 @@ Endpoint URLs must use `https:`. Plain `http:` is accepted only for localhost lo
160
126
  as `127.0.0.1`. When `AINECTO_TOKEN` is set, the CLI only sends it to the default prod/dev endpoints
161
127
  unless `AINECTO_ALLOW_CUSTOM_ENDPOINT_TOKEN=1` is set for an explicitly trusted custom endpoint.
162
128
 
163
- The commands are `ainecto` and `ai-erd` (the same CLI), `ai-erd-mcp`, and `mcp` (which
164
- `npx -y @ainecto/mcp` runs). The `AINECTO_*` environment variables above are the **only** names for
165
- those settings — there is no `AI_ERD_*` equivalent, so do not guess one. (The one `AI_ERD_*` variable
166
- is `AI_ERD_ROLE`, the older name of `AINECTO_ROLE`.)
129
+ The commands are `ainecto` and `mcp` (which `npx -y @ainecto/mcp` runs). The `AINECTO_*` environment
130
+ variables above are the **only** names for those settings — do not guess another prefix.
167
131
 
168
132
  ## Generated Friendly Commands
169
133
 
@@ -195,6 +159,26 @@ ainecto attachments upload --document-uuid <documentUuid> ./diagram.png ./notes.
195
159
  The generated `request_upload_token` and `upload_attachments` paths remain raw MCP argument-contract
196
160
  commands and do not read local files.
197
161
 
162
+ Inbox polling — for a scheduler (cron, launchd) that wakes an agent only when something is new. Exit
163
+ codes: `0` new items, `3` nothing new, `1` error, `2` usage error. `notifications poll` saves the batch
164
+ to the cursor file before printing it and prints the same batch again until `notifications ack` (run
165
+ it only after the agent handled the batch). `agent-todos poll --only-new` exits 0 only for to-dos it
166
+ has not seen before (kept in the seen file). Both take `--workspace <uuid>` and `--project <uuid>`,
167
+ each repeatable: any of the given workspaces AND any of the given projects. Each filter is its
168
+ own notification stream, so use one cursor file per filter.
169
+
170
+ ```bash
171
+ ainecto notifications poll --direct-only --cursor-file ~/.ainecto/inbox.cursor --json > /tmp/inbox.json \
172
+ && claude -p "Summarize these AiNecto notifications: $(cat /tmp/inbox.json)" \
173
+ && ainecto notifications ack --cursor-file ~/.ainecto/inbox.cursor
174
+ ainecto agent-todos poll --only-new --seen-file ~/.ainecto/todos.seen --json > /tmp/todos.json \
175
+ && claude -p "Review these AiNecto to-dos and only summarize them: $(cat /tmp/todos.json)"
176
+ ```
177
+
178
+ The server tools behind them (`list_notifications`, `list_agent_todos`, `update_agent_todos`,
179
+ `list_history`) are generated commands too (`ainecto notifications list`, `ainecto agent-todos list`,
180
+ `ainecto agent-todos update -f …`, `ainecto history list`) once the server exposes them.
181
+
198
182
  ## Connector Mode
199
183
 
200
184
  ```bash
@@ -205,7 +189,7 @@ The package doubles as a stdio-to-HTTP proxy for the resolved `/mcp` endpoint. I
205
189
  `initialize`, `tools/list`, and `tools/call`, does not rewrite remote schemas, and does not interpret
206
190
  local file references. It uses this machine's one sign-in (`ainecto auth login`, or the sign-in
207
191
  `ainecto init` performs) and never opens a browser on its own. Its role comes only from `--role` (or
208
- `AINECTO_ROLE`, or the older `AI_ERD_ROLE`) and is sent with every request; the server applies it.
192
+ `AINECTO_ROLE`) and is sent with every request; the server applies it.
209
193
 
210
194
  This is the entry `ainecto init` writes into a repository's MCP config — you normally do not add it
211
195
  by hand:
@@ -223,8 +207,8 @@ by hand:
223
207
 
224
208
  A bridge without a role has no restriction. If a session inside a set-up repository still has no role,
225
209
  another `ainecto` entry (for example Claude Code's local scope) is usually hiding the one `init` wrote —
226
- check with `claude mcp get ainecto`. An entry under another name (an older `ai-erd` one, say) does not
227
- hide it but adds a second server with no role — remove it.
210
+ check with `claude mcp get ainecto`. An entry under another name does not hide it but adds a second
211
+ server with no role — remove it.
228
212
 
229
213
  ### MCP Registry
230
214
 
@@ -236,13 +220,10 @@ Registration is done by a person:
236
220
  1. `npm run release -- --otp=<code>` (below) so that `@ainecto/mcp@<version>` is on npm.
237
221
  2. GitHub org namespace login as a `codelives` org **Owner** — a classic PAT with only `read:org`
238
222
  works where the browser login did not: `MCP_GITHUB_TOKEN=<pat> mcp-publisher login github`.
239
- 3. `mcp-publisher publish` from this folder. The new version simply replaces the package identifier
240
- (`@ai-erd/mcp` up to 0.4.x → `@ainecto/mcp`); the server name does not change.
223
+ 3. `mcp-publisher publish` from this folder.
241
224
 
242
- Leave the other entry, `com.ai-erd/ai-erd` (the remote `https://ai-erd.com/mcp`, ai-erd.com domain
243
- namespace), as it is. One remote URL can belong to one server only; listing `https://ainecto.com/mcp`
244
- as a remote here, or a `com.ainecto/*` name, would need ainecto.com domain auth
245
- (`mcp-publisher login dns|http --domain ainecto.com`) and is not part of this release.
225
+ Listing `https://ainecto.com/mcp` as a remote here, or a `com.ainecto/*` name, would need ainecto.com
226
+ domain auth (`mcp-publisher login dns|http --domain ainecto.com`) and is not part of this release.
246
227
 
247
228
  ## Development
248
229
 
@@ -251,7 +232,7 @@ npm install
251
232
  npm run typecheck
252
233
  npm test
253
234
  npm run build
254
- npm link # puts `ainecto` (and `ai-erd`) on your PATH
235
+ npm link # puts `ainecto` on your PATH
255
236
  ```
256
237
 
257
238
  ### Catalog Sync
@@ -266,7 +247,7 @@ AINECTO_CATALOG_SYNC_TOKEN=... npm run sync:tools -- --env dev --check
266
247
  ```
267
248
 
268
249
  The checked-in generated catalogs are deterministic output from `tools/list`, live-synced from
269
- `https://ainecto.com/mcp` and `https://dev.ai-erd.com/mcp`. Presentation metadata lives separately in
250
+ `https://ainecto.com/mcp` and `https://dev.ainecto.com/mcp`. Presentation metadata lives separately in
270
251
  `src/core/catalog/enrichments.ts`. `ainecto tools catalog` prints the local generated catalog.
271
252
 
272
253
  ### Local Tarball Smoke
@@ -304,15 +285,10 @@ temp file, and stored upload file unless `--keep` is supplied.
304
285
  ### Releasing
305
286
 
306
287
  `npm run release -- --otp=<code>` runs typecheck, test and build once, then publishes that build under
307
- six names: `@ainecto/mcp` (primary), `ainecto`, `@ainecto/cli` (only the `ainecto` command), and the
308
- older `@ai-erd/mcp`, `ai-erd`, `@ai-erd/cli` (only the `ai-erd` command). `--dry-run` shows what would
309
- go out. An already-published name is skipped, so a retry after an expired code is safe.
310
-
311
- Before the first 0.5.0 release, by hand: the npm account needs write access to both the `@ainecto` and
312
- `@ai-erd` orgs (the script checks), and `@ainecto/mcp` versions up to 0.3.0 still carry the 2026-09-29
313
- deprecation «moved to @ai-erd/mcp» — replace it, for example
314
- `npm deprecate "@ainecto/mcp@<=0.3.0" "Old version — use @ainecto/mcp@latest"` (new versions are not
315
- deprecated). Do not unpublish any name.
288
+ three names: `@ainecto/mcp` (primary), `ainecto`, and `@ainecto/cli` (only the `ainecto` command).
289
+ `--dry-run` shows what would go out. An already-published name is skipped, so a retry after an expired
290
+ code is safe. The npm account needs write access to the `@ainecto` org (the script checks). Do not
291
+ unpublish any name.
316
292
 
317
293
  ## Known Limitations
318
294