@procedures/mcp-server 0.16.0 → 0.17.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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # @procedures/mcp-server
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [1ceb990]
8
+ - @procedures/client@0.17.1
9
+ - @procedures/mcp@0.17.1
10
+
11
+ ## 0.17.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 5fbc976: The Streamable HTTP face of an MCP host has no listener of its own (CLI-11, step 2). The runner of the process owns the port, the stop in stages and the exit.
16
+
17
+ MINOR: a breaking change before 1.0. Version 0.14.x deprecated each part that this release removes (decision D13).
18
+
19
+ Removed:
20
+
21
+ - The options `port`, `host` and `server` of `HttpTransportOptions`, and the function `listen()` of `McpHttpTransport`. The endpoint answers only through its handler: `McpHost.handleHttp`, `McpServerTransport.handleHttp` or the face of `mcpFace()`. A request of another path gets false from the handler, and the listener answers it.
22
+ - `McpServerTransportState.url` of an HTTP face is the path of the endpoint (`/mcp`), not a URL. The owner of the listener knows the address.
23
+ - `startDevToolsServer()` of `@procedures/mcp-dev-tools`. Use `runDevToolsServer()`, which runs the server under `run()` of `@mark1russell7/service`.
24
+
25
+ The option `mount` has no effect now, because the endpoint is always mounted. It stays one more release as a deprecated option, so code that followed the migration of 0.14.x compiles.
26
+
27
+ Migration:
28
+
29
+ - A host with `faces.http: { port, host }`: give `faces.http: {}`. Mount `host.handleHttp` on a listener, for example an `httpTransport` of `@mark1russell7/service/http`, and declare the listener and the host on a service (`host.declare(svc)`). The README of `@procedures/mcp-server` has the example.
30
+ - A caller of `startDevToolsServer()`: call `runDevToolsServer(config)`.
31
+ - The site, MiniMongo, Graph and jarvis: no change. Graph mounts `mcpFace()` on its procedures host, and its stdio MCP host and the host of jarvis use stdio and SDK faces.
32
+
33
+ ### Patch Changes
34
+
35
+ - @procedures/client@0.17.0
36
+ - @procedures/mcp@0.17.0
37
+
3
38
  ## 0.16.0
4
39
 
5
40
  ### Patch Changes
package/README.md CHANGED
@@ -104,8 +104,7 @@ Each face is one `McpServerTransport` on the server of the host. A host can have
104
104
  |---|---|
105
105
  | `stdio: true` | The standard input and output. Over stdio, `console.log` writes to stderr from `start()` on, because stdout carries the protocol. |
106
106
  | `stdio: { stdin, stdout, stopOnEnd, redirectConsole }` | Other streams, for a test or an embedding. With `stopOnEnd: true` (the default), the host stops when the input ends. |
107
- | `http: { mount: true, path, token, allowedOrigins, allowedHosts, maxSessions, maxBodyBytes }` | Streamable HTTP on a listener of the app. Mount `host.handleHttp` on the listener. Without a token, the face takes the token of the policy. |
108
- | `http: { port, host, path, token, allowedOrigins }` | Deprecated. The face has a listener of its own, on `127.0.0.1` by default. The next MINOR removes it (CLI-11). |
107
+ | `http: { path, token, allowedOrigins, allowedHosts, maxSessions, maxBodyBytes }` | Streamable HTTP on a listener of the app. Mount `host.handleHttp` on the listener. Without a token, the face takes the token of the policy. |
109
108
  | `sdk` | One or more MCP SDK transports, for example the `InMemoryTransport` of a test. |
110
109
 
111
110
  When the client closes the input of stdio, the host stops, and `closed` resolves.
@@ -126,7 +125,7 @@ The Streamable HTTP face checks each request with `guardMcpRequest` before the r
126
125
 
127
126
  - The server of the host is the transport part `mcp`. Each storage of the server is a dependency.
128
127
  - A host with a stdio face declares the trigger `stdin-close`. The end of the input starts the stop in stages, and the face does not stop the host by itself.
129
- - The HTTP face (`mount: true`) has no listener. Mount `host.handleHttp` on an `httpTransport` of `@mark1russell7/service/http`, and declare that transport on the service.
128
+ - The HTTP face has no listener. Mount `host.handleHttp` on an `httpTransport` of `@mark1russell7/service/http`, and declare that transport on the service.
130
129
 
131
130
  ```typescript
132
131
  import { createServer } from "node:http";
@@ -138,7 +137,7 @@ const stdioHost = createMcpHost({ registry, faces: { stdio: true } });
138
137
  await stdioHost.declare(service("my-mcp").profile(ephemeral)).run();
139
138
 
140
139
  // Over Streamable HTTP: a listener of the service, and the face at /mcp on it
141
- const httpHost = createMcpHost({ registry, policy: { token }, faces: { http: { mount: true } } });
140
+ const httpHost = createMcpHost({ registry, policy: { token }, faces: { http: {} } });
142
141
  const listener = httpTransport(createServer(), knobs, { listen: { port: 3003, host: "127.0.0.1" } });
143
142
  listener.mount((req, res) => httpHost.handleHttp(req, res));
144
143
  const svc = httpHost.declare(service("my-mcp").profile(localDev));
@@ -324,7 +323,7 @@ await server.start();
324
323
  - The tools follow the registry. When the list of tools changes, the transport sends `notifications/tools/list_changed`.
325
324
  - The options `instructions`, `stdio`, `elicitation`, `untrusted` and `content` are the same as the options of the host.
326
325
  - `toolFilter` selects the tools: `include` (a function of the path), `pathPrefix`, `includeTags`, `excludeTags` and `excludeInternal`.
327
- - `transport: "http"` with `httpOptions` gives Streamable HTTP. `sdkTransport` connects an MCP SDK transport.
326
+ - `transport: "http"` with `httpOptions` gives Streamable HTTP. The endpoint has no listener: mount `handleHttp` on a listener. `sdkTransport` connects an MCP SDK transport.
328
327
  - `transport: "sse"` is not implemented.
329
328
 
330
329
  ## The face of a procedures host