@hediet/linkrpc-cli 0.0.3-next.20261030.2 → 0.0.3-next.20261101.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/README.md CHANGED
@@ -935,9 +935,11 @@ idle minutes.
935
935
 
936
936
  ### Hub MCP aggregation
937
937
 
938
- `linkrpc hub mcp` is a lightweight stdio MCP server that discovers services
939
- exposing `vscode.mcp-forward` in the selected Hub and aggregates their tools.
940
- No service IDs, filters, or principal overrides are required:
938
+ `linkrpc hub mcp` is a lightweight stdio MCP server that discovers every MCP
939
+ server published in the selected Hub and aggregates their tools: MCP services
940
+ (`mcp.tools`) and forwarded servers (`mcp.forward`, or the legacy
941
+ `vscode.mcp-forward`). No service IDs, filters, or principal overrides are
942
+ required:
941
943
 
942
944
  ```json
943
945
  {
@@ -955,8 +957,15 @@ Endpoint/context/environment and identity selection follow the normal Hub CLI
955
957
  rules. An explicit endpoint can be supplied before `mcp`, for example
956
958
  `linkrpc hub --endpoint npipe://./pipe/my-hub mcp`. Signing and capability
957
959
  negotiation remain enabled by default; discovery does not bypass authorization.
958
- Inaccessible directories and failed servers are reported on stderr; stdout
959
- contains only MCP protocol frames.
960
+ Service tools are called through their generated methods, so capabilities and
961
+ consent apply per tool; a forwarded server needs one capability for all its
962
+ tools. Inaccessible directories and failed servers are reported on stderr;
963
+ stdout contains only MCP protocol frames.
964
+
965
+ `--scripts` additionally serves the LinkRPC script tools (`runLinkRpcScript`,
966
+ `awaitLinkRpcTask`, `cancelLinkRpcTask`) of `@hediet/linkrpc-mcp` on the same
967
+ connection, so one MCP entry gives both the hub's MCP tools and scripted access
968
+ to every hub service.
960
969
 
961
970
  The command watches directory changes, refreshes changed tool lists (including
962
971
  paginated lists), and retries failed connections while they remain advertised.
@@ -965,17 +974,46 @@ remaining unique and MCP-safe even for long service paths. Descriptions identify
965
974
  the source service. Disconnecting stdio closes this client's forwarding sessions.
966
975
  This version aggregates tools, not resources, prompts, or sampling.
967
976
 
968
- The producer stays separate:
977
+ ### Publishing MCP servers
978
+
979
+ Producers stay separate. `mcp-publish` publishes one MCP server, given as a
980
+ command after `--`, as a Streamable HTTP `--url` (with repeatable `--header`),
981
+ or (forward only) as `--stdio`:
982
+
983
+ ```sh
984
+ linkrpc hub mcp-publish --service --forward --serviceId <authorized-service-id> -- npx -y @modelcontextprotocol/server-everything
985
+ ```
986
+
987
+ - `--service` publishes the MCP server as a LinkRPC service: every MCP tool is
988
+ a method of a generated `mcp.tools.<name>` interface (`--name`, derived from
989
+ the service ID by default), and `mcp.tools::listTools`/`callTool` list and
990
+ call tools by name. All callers share one MCP session; a caller can open an
991
+ exclusive one with `mcp.server::openSession`. Repeatable
992
+ `--group <group>=<keyword,...>` moves tools whose name contains a keyword into
993
+ `mcp.tools.<name>.<group>`, so capabilities can cover a whole group, e.g.
994
+ `--group admin=delete,merge`.
995
+ - `--forward` relays MCP verbatim over `mcp.forward`. Each connection gets its
996
+ own MCP session: a fresh child process, or a new HTTP session.
997
+ - `--stdio` forwards an MCP server that is already running and attached to this
998
+ process's stdin/stdout, one connection at a time. Later connections reach the
999
+ same server; the command exits when stdin ends.
1000
+
1001
+ `mcp-forward` is shorthand for `mcp-publish --forward`:
969
1002
 
970
1003
  ```sh
971
1004
  linkrpc hub mcp-forward --serviceId <authorized-service-id> -- component-explorer mcp -p <config> --use-daemon --no-daemon-autostart
972
1005
  ```
973
1006
 
1007
+ To forward a server that must not be restarted per connection, start it
1008
+ yourself and connect its stdio, e.g. with a named pipe pair or a supervisor:
1009
+ `linkrpc hub mcp-forward --stdio --serviceId <id>`.
1010
+
974
1011
  Manage that producer and `component-explorer serve -p <same-config>` with your
975
1012
  workspace daemon. The aggregator opens lightweight MCP connections; it does not
976
1013
  start workspace builds or explorer daemons. Each forwarded connection spawns
977
1014
  the configured MCP child, so producers must use attach-only commands when
978
- heavyweight services are managed separately.
1015
+ heavyweight services are managed separately. Children inherit the producer's
1016
+ environment plus `--env` values.
979
1017
 
980
1018
  ### Participant proxy
981
1019