@procedures/mcp-dev-tools 0.2.3 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,65 @@
1
1
  # @procedures/mcp-dev-tools
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 29a7b29: Outputs of the compiler (roadmap R23). `toMermaid()`, `diagramProgram()` and the procedure `program.diagram` draw a program as a Mermaid flowchart from its IR: the steps of a chain in order, the fork and the join of `client.parallel`, the decision of `client.conditional`, the `try` part and the `error` arrow of `client.tryCatch`, the loop of `client.map` and `client.reduce`, the stop arrows of `client.and` and `client.or`, and a dotted arrow from each name to each `$ref` that reads it. Dynamic and deferred calls have their own class, and `mermaidText()` writes each unsafe character as an entity code, so no label can break the syntax. `explainProgram()` and the procedure `program.explain` give the effects of a program, each call with its declared effects and the answer of `explainInvocation()` under the capability (the capability of the caller when the input has none), the diagnostics and a short summary. `toOpenRpc()` and the procedure `sdk.openrpc` write the manifest as an OpenRPC 1.3 document, with the effects as `x-effects`. `toTypeScriptSdk()` and the procedure `sdk.typescript` write a typed TypeScript SDK: an input type and an output type for each procedure, and `createSdk(client)` with `sdk.<namespace>.<name>(input)` methods. A test type-checks the SDK of the core procedures. `sdk` is not an MCP tool namespace. In `@procedures/mcp`, the description of a tool for a defined procedure with `inferredEffects` gets a sentence such as "It reads fs and changes store." (`toolDescription()`). The MCP server of `@procedures/mcp-dev-tools` has the tools `program.diagram` and `program.explain` (67 tools).
8
+ - c66f0c4: Twelve new `docker.*` tools of roadmap R41: `compose.build`, `compose.logs`, `compose.ps`, `compose.restart`, `images`, `inspect`, `network.create`, `network.list`, `network.remove`, `tag`, `volume.create` and `volume.list`. The MCP server has 79 tools. `docker.prune`, `docker.push` and `docker.volume.remove` are not tools: the first one deletes in bulk, the second one can carry an image out, and the third one deletes the data of a volume.
9
+ - 1779d96: The pure transforms of `@procedures/json` are MCP tools (roadmap R39): `json.query`, `json.patch`, `json.diff`, `json.merge`, `json.validate`, `yaml.parse` and `yaml.stringify`. A program that Claude runs through `client.chain` can use them in its steps. The MCP server has 86 tools. `@procedures/http` is not a tool namespace, because a request can carry data out.
10
+ - 3d24d5b: MCP over Streamable HTTP (roadmap R26), the HTTP transport of the current MCP specification. `McpServerTransport` takes `transport: "http"` and `httpOptions` (port, host, path, token, allowed origins, or an HTTP server of its own). Each client gets a session with an MCP server of its own, and so gets the progress of a tool call and the `list_changed` notifications. The endpoint listens on loopback by default, refuses a web page of another host or origin, and with a token refuses a request without the token. `mark mcp --http <port> [--host <host>] [--token <token>]` (or `MCP_HTTP_PORT`, `MCP_HTTP_HOST`, `MCP_HTTP_TOKEN`) serves the dev tools over it. Before, the package had only stdio, and its SSE transport only threw.
11
+ - 956e88b: One manifest type (roadmap R17). `describeRegistry(registry, { expose })` and `describeProcedure` (exported as `describeProcedureEntry`) describe each procedure: the path, the description, the tags, the effects, the JSON Schemas of the input and the output, the calls, an unbounded stream, the command-line metadata, and a hash of the manifest (`procedures.manifest/1`). The new procedure `procedure.manifest` gives it, and it is an MCP tool of the dev tools (63 tools). `procedure.get` gives the JSON Schemas and the effects. The context of a handler has the expose rule of its host (`ctx.expose`), and `procedure.get`, `procedure.list`, `procedure.manifest`, `procedure.export`, `client.lookup`, `mcp.list-tools`, `manifest.generate` and `_discovery.announce` show only the exposed procedures: before, an MCP tool could list the procedures that the host hides. `_discovery.announce` gives the JSON Schemas, and `manifest.generate`, `getProcedureInfos` and the manifest of `mark` use the one description.
12
+ - f5ed492: The check before the run in the hosts (roadmap R22). `programCheckInterceptor()` of `@procedures/compiler` checks the program of each call to a data-driven procedure before the first step. When the check finds an error, no step starts, so a refusal in step 3 comes before the write of step 1. The MCP server of `@procedures/mcp-dev-tools` uses it (`MCP_PROGRAM_CHECK=false` turns it off). `bundle-mcp` and `bundle-dev` have the compiler module, so Claude gets the tools `program.check` and `program.compile` (65 tools), and `mark program check` works.
13
+ - 5b7b673: Five new tools of roadmap R44: `db.tables`, `db.schema`, `lib.graph`, `mongo.documents.distinct` and `mongo.documents.explain`. They change nothing. The MCP server has 91 tools. `mongo.watch`, `mongo.documents.bulk`, `db.transaction`, `db.migrate` and `db.backup` are not tools: the first one is a stream without an end, and the others change data in bulk or change the database file.
14
+
15
+ ### Patch Changes
16
+
17
+ - fb30718: Typed durations (roadmap R11). This change breaks the API. Each public option that is a time takes a `Duration` of `@mark1russell7/quantity`, made with `ms()`, `seconds()`, `minutes()` or `hours()` of `@procedures/client`. A plain number is a type error, and at run time the option throws a `TypeError` that names it. This covers the timeouts and `resilience()`, the retry delays, the cache, the circuit breaker, the rate limit, the HTTP, WebSocket and mock transports, the WebSocket server heartbeat, `timeoutInterceptor({ limit })` (was `ms`), `hostPolicy({ timeout })` (was `timeoutMs`), the idempotency cache (`ttl`, was `ttlMs`), `ApiStorage`, `HybridStorage`, the synced registry and `connect()` of the peer. The per-call overrides in a context (`timeout`, `retry.delay`, `cache.ttl`) and the `route()` overrides (`timeout.overall`, was `timeout.ms`) take durations too. The wire and the inputs of procedures keep milliseconds.
18
+
19
+ Migration: `createOverallTimeoutMiddleware({ overall: 5000 })` becomes `createOverallTimeoutMiddleware({ overall: seconds(5) })`.
20
+ - Updated dependencies [ddea529]
21
+ - Updated dependencies [b2a3e3a]
22
+ - Updated dependencies [a8c47f1]
23
+ - Updated dependencies [381ce3a]
24
+ - Updated dependencies [0c627f8]
25
+ - Updated dependencies [ae7f05f]
26
+ - Updated dependencies [7873940]
27
+ - Updated dependencies [29a7b29]
28
+ - Updated dependencies [9bc2ddb]
29
+ - Updated dependencies [a70d445]
30
+ - Updated dependencies [c66f0c4]
31
+ - Updated dependencies [bc70357]
32
+ - Updated dependencies [07cc998]
33
+ - Updated dependencies [a6b01a9]
34
+ - Updated dependencies [c799cdd]
35
+ - Updated dependencies [1779d96]
36
+ - Updated dependencies [3d24d5b]
37
+ - Updated dependencies [540f8d9]
38
+ - Updated dependencies [b6daaec]
39
+ - Updated dependencies [5b9264e]
40
+ - Updated dependencies [956e88b]
41
+ - Updated dependencies [ff62281]
42
+ - Updated dependencies [d81d0ed]
43
+ - Updated dependencies [f5ed492]
44
+ - Updated dependencies [aa67cc7]
45
+ - Updated dependencies [061fa22]
46
+ - Updated dependencies [5b7b673]
47
+ - Updated dependencies [cfb9d69]
48
+ - Updated dependencies [43f7de5]
49
+ - Updated dependencies [b07bb50]
50
+ - Updated dependencies [4a3bfa1]
51
+ - Updated dependencies [bd0b626]
52
+ - Updated dependencies [a6be873]
53
+ - Updated dependencies [fb30718]
54
+ - Updated dependencies [c5528e4]
55
+ - Updated dependencies [fee5d9c]
56
+ - Updated dependencies [21f7743]
57
+ - Updated dependencies [31a0b46]
58
+ - @procedures/client@0.3.0
59
+ - @procedures/compiler@0.3.0
60
+ - @procedures/bundle-mcp@0.3.0
61
+ - @procedures/mcp-server@0.3.0
62
+
3
63
  ## 0.2.3
4
64
 
5
65
  ### Patch Changes
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@procedures/mcp-dev-tools?color=2346c4&label=npm)](https://www.npmjs.com/package/@procedures/mcp-dev-tools)
4
4
 
5
- `mcp-dev-tools` is the MCP server that gives procedures to Claude as tools. Its folder in the monorepo is `packages/impl-mcp-dev`. Claude Code (or Claude Desktop) starts it over stdio. By default it loads `bundle-mcp`, which selects 62 tools.
5
+ `mcp-dev-tools` is the MCP server that gives procedures to Claude as tools. Its folder in the monorepo is `packages/impl-mcp-dev`. Claude Code (or Claude Desktop) starts it over stdio. By default it loads `bundle-mcp`, which selects 91 tools.
6
6
 
7
7
  ## Set up Claude Code
8
8
 
@@ -37,10 +37,14 @@ Claude Code starts the server once for each session. After a rebuild, restart th
37
37
 
38
38
  | Environment variable | Default | Function |
39
39
  |---|---|---|
40
- | `MCP_BUNDLES` | `@procedures/bundle-mcp` | The bundles to load, separated by commas. The server imports `<bundle>/register.js` for each one. |
40
+ | `MCP_BUNDLES` | `@procedures/bundle-mcp` | The bundles to load, separated by commas. The server imports `<bundle>/register.js` for each one. `@procedures/bundle-assistant` adds the tools of the assistant. |
41
41
  | `MCP_SERVER_NAME` | `impl-mcp-dev` | The server name in the MCP handshake |
42
42
  | `MCP_SERVER_VERSION` | `1.0.0` | The server version in the MCP handshake |
43
43
  | `MCP_DEBUG` | `false` | With `true`, the server writes debug lines to stderr |
44
+ | `MCP_TOOL_TIMEOUT_MS` | `600000` | The time limit of a tool call, in milliseconds. `0` turns the limit off. |
45
+ | `MCP_READ_ONLY` | `false` | With `true`, the tools are only the procedures that change nothing |
46
+ | `MCP_HTTP_PORT`, `MCP_HTTP_HOST`, `MCP_HTTP_TOKEN` | not set | The server uses Streamable HTTP on this port, not stdio. The host is `127.0.0.1` by default. |
47
+ | `MCP_PROGRAM_CHECK` | `true` | With `false`, a program starts without the check before the run |
44
48
 
45
49
  ## How it selects the tools
46
50
 
@@ -48,6 +52,7 @@ Claude Code starts the server once for each session. After a rebuild, restart th
48
52
  2. A procedure is a tool when its namespace is in `mcpNamespaces` of a bundle, and its key is not in `mcpExclude`.
49
53
  3. A `ProcedureServer` serves the registry with that rule as its `expose` rule. A data-driven procedure (`client.chain`, `client.eval`, a procedure of `procedure.define`) can use only exposed procedures.
50
54
  4. `McpServerTransport` gives the exposed procedures as tools over stdio. It tells Claude when the list of tools changes.
55
+ 5. The host checks the program of each call to a data-driven procedure before the first step (`programCheckInterceptor` of `@procedures/compiler`). When the check finds an error, no step starts. Thus a refusal in step 3 comes before the write of step 1.
51
56
 
52
57
  > [!WARNING]
53
58
  > A bundle without `mcpNamespaces` exposes every registered procedure, `shell.exec` too. `bundle-dev` has no `mcpNamespaces`. Thus `MCP_BUNDLES=@procedures/bundle-dev` gives Claude shell access through this server.
@@ -56,7 +61,7 @@ The server sends `console.log` output to stderr, because stdout carries the MCP
56
61
 
57
62
  ## The tool list
58
63
 
59
- `tools.snapshot.txt` has the names of the 62 tools. `src/tools.test.ts` starts the real server over stdio and compares its tools with the file. It also examines that a `docker.*` tool cannot start a shell command. To change the tools, change `bundle-mcp` and `tools.snapshot.txt` in one commit. The [bundle-mcp README](../bundle-mcp/README.md) lists the tools and the reasons for the procedures that stay out.
64
+ `tools.snapshot.txt` has the names of the 91 tools. `src/tools.test.ts` starts the real server over stdio and compares its tools with the file. It also examines that a `docker.*` tool cannot start a shell command. To change the tools, change `bundle-mcp` and `tools.snapshot.txt` in one commit. The [bundle-mcp README](../bundle-mcp/README.md) lists the tools and the reasons for the procedures that stay out.
60
65
 
61
66
  ## Troubleshooting
62
67