@procedures/mcp-dev-tools 0.8.0 → 0.8.1
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 +22 -0
- package/README.md +3 -0
- package/dist/.tsbuildinfo +1 -1
- package/dist/host.d.ts +7 -3
- package/dist/host.d.ts.map +1 -1
- package/dist/host.js +46 -57
- package/dist/host.js.map +1 -1
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +9 -1
- package/dist/server.js.map +1 -1
- package/package.json +6 -6
- package/src/host.ts +54 -60
- package/src/server.ts +12 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @procedures/mcp-dev-tools
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 2523b1b: One MCP host factory, `createMcpHost()`, and the questions of a procedure to the person at the caller (CLI-10, CLI-12). PATCH: new exports and new optional options before 1.0.0. The old exports and their behavior stay.
|
|
8
|
+
|
|
9
|
+
- `@procedures/mcp-server`: `createMcpHost(options)` builds the registry (or the modules), the tool surface, the read-only narrowing, the host policy, the `ProcedureServer` and one `McpServerTransport` for each face (stdio, Streamable HTTP, SDK transports). The stdio face stops the host when its input ends, and `host.closed` resolves. `mcp.serve` and the dev-tools server use the factory. Thus `mcp.serve` gets its options from `hostPolicy()`, and it takes `readOnly` and `instructions`.
|
|
10
|
+
- `@procedures/client`: `ctx.elicit` asks the person at the caller for input or a confirmation. The helpers `elicitInput()` and `elicitConfirmation()` give the action `unavailable` with a reason when no one can answer. `elicitWithPolicy()` adds the consents of the operator (`operatorConsent`), and `ask: false` turns the questions off. The operator answers only when the face cannot ask. A failed question of a face that can ask (a timeout, a lost connection) gives `unavailable`, and an abort gives `cancel`. `ServerRequest` and `InvokeOptions` get `elicit` and `progress`.
|
|
11
|
+
- `@procedures/client`: `ctx.progress` tells the caller the progress of the call of the host. `metadata.untrusted` declares the output fields with text from outside the host, and `metadata.title` gives the title of a tool. `metadata.toolHints` can make a tool look more dangerous than its effects (`readOnlyHint: false`, `idempotentHint: false`, `destructiveHint: true`, `openWorldHint: true`). The registry refuses each other value, and `toolHintsOf()` gives the hints with the override.
|
|
12
|
+
- `@procedures/mcp-server`: `McpServerTransport` answers `ctx.elicit` with MCP elicitation (form and URL), over stdio and Streamable HTTP. It sends `ctx.progress` as `notifications/progress`, and it gives the instructions of the server. An untrusted field goes in envelopes with a random id, and its text cannot close its envelope. The option `content` can give other text blocks for a result. The option `json: "compact"` gives the JSON of the default blocks on one line. The option `toolName` gives the name of each tool, so a server that moves to the host keeps its tool names. A call finds its procedure by the tool, not by the decoded name. Each tool call over Streamable HTTP carries the credentials of its HTTP request, so the request hook `principalOf` and the token check of the server apply to it. A server that reads cookies gets the CSRF rule on this face too.
|
|
13
|
+
- `@procedures/mcp`: a tool gets `title` from `metadata.title`. In the output schema, each untrusted field is a string.
|
|
14
|
+
- `@procedures/mcp-dev-tools`: `createDevToolsHost()` gives the MCP host as `mcp`. `dist/server.js` ends its process when the client closes the input of stdio. The tool list stays the same.
|
|
15
|
+
- Updated dependencies [2d3f235]
|
|
16
|
+
- Updated dependencies [1aa9ef7]
|
|
17
|
+
- Updated dependencies [2523b1b]
|
|
18
|
+
- Updated dependencies [c559b00]
|
|
19
|
+
- @procedures/client@0.8.1
|
|
20
|
+
- @procedures/mcp-server@0.8.1
|
|
21
|
+
- @procedures/bundle-mcp@0.8.1
|
|
22
|
+
- @procedures/fs@0.8.1
|
|
23
|
+
- @procedures/compiler@0.8.1
|
|
24
|
+
|
|
3
25
|
## 0.8.0
|
|
4
26
|
|
|
5
27
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -33,6 +33,8 @@ The package has the bin `mcp-dev-tools`, which starts the same file.
|
|
|
33
33
|
|
|
34
34
|
Claude Code starts the server once for each session. After a rebuild, restart the MCP server (or the session) to get the changes.
|
|
35
35
|
|
|
36
|
+
When the client closes the input of stdio, the server stops: the calls in flight get their grace time, and then the process ends.
|
|
37
|
+
|
|
36
38
|
## Configuration
|
|
37
39
|
|
|
38
40
|
| Environment variable | Default | Function |
|
|
@@ -83,6 +85,7 @@ The rules and the table of all the procedures are in [CAPABILITIES-2026-10.md](.
|
|
|
83
85
|
2. A procedure is a tool when its namespace is in `mcpNamespaces` of a bundle, and its key is not in `mcpExclude`.
|
|
84
86
|
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.
|
|
85
87
|
4. `McpServerTransport` gives the exposed procedures as tools over stdio. It tells Claude when the list of tools changes.
|
|
88
|
+
`createMcpHost()` of `@procedures/mcp-server` builds the host: the same factory as `mcp.serve` and the MCP hosts of the apps.
|
|
86
89
|
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.
|
|
87
90
|
|
|
88
91
|
> [!WARNING]
|