@relvo/mcp 0.1.2 → 0.1.3

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.
Files changed (50) hide show
  1. package/README.md +90 -5
  2. package/bin/relvo-mcp.mjs +1 -1
  3. package/dist/client/agent-run.js +681 -0
  4. package/dist/client/browser.js +650 -0
  5. package/dist/client/evm-wallet.js +214 -0
  6. package/dist/client/index.js +3 -360
  7. package/dist/client/local-input.js +18 -11
  8. package/dist/client/local-profile.js +22 -110
  9. package/dist/client/local-setup.js +0 -1
  10. package/dist/client/tool-name-hints.js +48 -0
  11. package/dist/client/wallet-access.js +207 -0
  12. package/dist/mcp/agent-server.js +237 -0
  13. package/dist/mcp/context.js +3 -2
  14. package/dist/mcp/host-schema.js +47 -0
  15. package/dist/mcp/instructions.js +12 -2
  16. package/dist/mcp/local-upload.js +12 -4
  17. package/dist/mcp/operations.js +30 -0
  18. package/dist/mcp/runtime.js +25 -5
  19. package/dist/mcp/server.js +191 -37
  20. package/dist/mcp/version.js +1 -0
  21. package/dist/schema/accountRequestMethods.js +1 -0
  22. package/dist/schema/cronValidator.js +150 -0
  23. package/dist/schema/platformApiKey.js +5 -5
  24. package/dist/schema/platformBillingConstants.js +3 -0
  25. package/dist/schema/platformCapabilityFamilies.js +217 -0
  26. package/dist/schema/platformConnectionCatalog.js +20 -3
  27. package/dist/schema/platformConnectionPolicy.js +26 -0
  28. package/dist/schema/platformCustomTools.js +113 -0
  29. package/dist/schema/platformFunding.js +9 -0
  30. package/dist/schema/platformHttpConstraints.js +7 -0
  31. package/dist/schema/platformMcpTools.js +7 -0
  32. package/dist/schema/platformMetaTools.js +8 -6
  33. package/dist/schema/platformMonitorSchedule.js +123 -0
  34. package/dist/schema/platformMonitors.js +159 -0
  35. package/dist/schema/platformOAuth.js +7 -0
  36. package/dist/schema/platformPublicExecution.js +53 -15
  37. package/dist/schema/platformRoutes.js +61 -1
  38. package/dist/schema/platformSkills.js +1 -1
  39. package/dist/schema/platformTeamSecretName.js +3 -0
  40. package/dist/schema/platformTeamSkills.js +49 -0
  41. package/dist/schema/platformToolAccess.js +13 -0
  42. package/dist/schema/platformTriggers.js +152 -0
  43. package/dist/schema/platformWorkflows.js +100 -0
  44. package/dist/schema/scheduleTimeZone.js +15 -0
  45. package/dist/schema/toolDiscovery.js +20 -3
  46. package/dist/schema/toolInputRepair.js +110 -0
  47. package/dist/schema/toolResultContext.js +1 -1
  48. package/package.json +1 -1
  49. package/dist/schema/amazonAds.js +0 -13
  50. package/dist/schema/oauth2.js +0 -64
package/README.md CHANGED
@@ -1,8 +1,7 @@
1
1
  # Relvo MCP
2
2
 
3
- The public package and executable are `@relvo/mcp` and `relvo-mcp`. Deployed
4
- `thk_` keys and `TOOLHUB_*` environment settings remain accepted. Prefer
5
- `RELVO_*` names; conflicting nonempty aliases fail before any request or upload.
3
+ The public package and executable are `@relvo/mcp` and `relvo-mcp`. Keys use
4
+ `rlv_` and settings use `RELVO_*` names.
6
5
 
7
6
  Standalone stdio MCP server for Relvo.
8
7
  Requires Node.js 22 or later. The CLI is a separate package: @relvo/cli.
@@ -10,6 +9,66 @@ It supports the MCP 2026-07-28 stateless core (`server/discover`, per-request
10
9
  metadata, no initialize handshake or protocol session) and keeps the 2025
11
10
  initialize flow as a compatibility fallback for older hosts.
12
11
 
12
+ By default the server exposes only `platform_tools`, `platform_run` and
13
+ `platform`; operation schemas load on demand. The first `platform_tools` match
14
+ includes its input schema. `platform_run` accepts `{tool, arguments,
15
+ idempotencyKey}`. Do not ask for or invent a budget when none was specified.
16
+ `maximumChargeMicros` is optional: omit it or use null for no user ceiling;
17
+ 0 permits only zero Relvo charges. The run quotes the exact input internally,
18
+ rejects quotes above an explicit ceiling, saves the actual quote amount/version
19
+ when no ceiling was supplied, submits and waits for a bounded result.
20
+ Project/account limits still apply. Externally billed usage requires existing
21
+ authorization and `externalBillingAccepted:true`; the Relvo ceiling does not
22
+ limit external charges.
23
+ Set `RELVO_MCP_MODE=full` to list every original operation as its own tool
24
+ instead. The hosted remote MCP URL serves the same compact surface, without
25
+ local result files.
26
+
27
+ Full results stay available through `platform` with `operation: "result"` and `{id, path,
28
+ fields}` or `pick` (labels mapped to exact paths). A run can use `selection`
29
+ or `pick` to request that same view before data enters the model context. Only
30
+ select paths known from the actual output; missing fields are reported.
31
+ Large collections automatically return a fitting page. Very long rows use
32
+ `rowWindows`: complete small `fields`, explicitly partial text `fragments`, and
33
+ references to other large values. Fragments carry exact source paths and text
34
+ cursors; read missing details from the same execution. Never use a partial URL
35
+ or identifier as a complete value. Collection and text cursors retain access to
36
+ all original records without purchasing them again. To work through many rows,
37
+ `file: true` (on `platform_run` or a result read) writes the whole selected path
38
+ (with `fields` applied; an envelope holding one array writes that array) to an
39
+ owner-only file, as JSON Lines for an array, and returns its path instead of the
40
+ rows, so the host's own file tools (Read, Grep, jq) can search or read it. Files
41
+ go to `.relvo/results` in the server's working directory, which is the host's
42
+ project when the host starts the server, so its tools reach them without extra
43
+ approval; git ignores that directory. `RELVO_RESULT_DIRECTORY` selects another
44
+ directory.
45
+ Use `operation: "schema"` to inspect one original operation, then `operation:
46
+ "call"` with `{name, input}` to invoke it. Original validation and permissions
47
+ still apply. A quote-only approval flow must use `platform_quote` and wait for
48
+ approval before any run. A spending cap does not authorize external writes.
49
+ When an unpinned Auto quote exceeds the cap, a run can return unpurchased native
50
+ candidate tools with explicitly pinned, free example quotes. Inspect their
51
+ schemas and check that they fit the task; actual inputs are always quoted again
52
+ before execution. Example quotes never authorize spending or a larger budget.
53
+
54
+ The exact purchase is saved in an owner-only local journal scoped to the API
55
+ origin and credential. `RELVO_RUN_DIRECTORY` may select a private directory;
56
+ saved arguments can contain private task data. Keep it until uncertain work is
57
+ reconciled. After a lost reply, resend the same run body/key or use `operation:
58
+ "resume"` with the received `runId`. Never replace unknown work with a new key.
59
+ Pending or `needs_review` is not success; its final charge remains unknown.
60
+ Current run IDs can recover an accepted purchase from another server instance
61
+ without the local journal. Repeating the original body/key also works after a
62
+ quote changes or becomes unavailable; a different request is refused. Recovery
63
+ requires the same API origin and credential and the matching API/worker release.
64
+ Older purchases without recovery metadata may need their original journal or
65
+ execution history for reconciliation. Legacy 64-character run IDs still use
66
+ their local journal.
67
+
68
+ The rest of this guide describes the original operations. With
69
+ `RELVO_MCP_MODE=full` each is its own tool; by default, reach them through
70
+ `platform` with `operation: "call"`.
71
+
13
72
  Six session helpers are available: `platform_search_tools`,
14
73
  `platform_get_tool_schemas`, `platform_manage_connections`,
15
74
  `platform_multi_execute`, `platform_remote_workbench` and `platform_remote_bash`.
@@ -20,8 +79,10 @@ reservation cap. `isError:true` can contain accepted siblings: inspect every
20
79
  structured admission and wait/read its execution ID. Recover uncertain admission
21
80
  with the exact original request/session/keys, without replacement purchases.
22
81
 
23
- Tool replies share a 24,000-byte envelope budget, including compatible JSON text
24
- and structured data. Large `platform_tool` definitions and `platform_skill`
82
+ The larger of a reply's JSON text and structured data is kept below 24,000 UTF-8
83
+ bytes, including its data framing. Both representations are returned for
84
+ compatibility; the combined protocol envelope can be larger.
85
+ Large `platform_tool` definitions and `platform_skill`
25
86
  guides expose exact `path`/`offset` pages: follow entry paths lacking `value`
26
87
  and `nextOffset` only as needed. Compact batches preserve every index/admission/ID;
27
88
  match indices to saved original calls when `requestFieldsOmitted` is present.
@@ -45,6 +106,30 @@ OR within lists, AND across include lists; any exclusion wins. Empty/null is
45
106
  neutral. Excluding a provider removes every tool listing it, including fallbacks;
46
107
  discovery filters do not pin a later execution.
47
108
 
109
+ The compact `platform_tools` accepts these options directly, without switching
110
+ to full mode. Its `queries` accepts up to four strings or discovery-option
111
+ objects in one call; shared options are defaults and each object may override
112
+ them, including its limit. For example:
113
+
114
+ ~~~json
115
+ {
116
+ "mode": "keyword",
117
+ "limit": 2,
118
+ "queries": [
119
+ "Instagram profiles",
120
+ {"query": "web search", "provider": "brave", "limit": 3},
121
+ {"category": "enrichment", "exclude": {"tools": ["unwanted_tool"]}}
122
+ ]
123
+ }
124
+ ~~~
125
+
126
+ Batch results are summaries with per-query counts and truncation; they do not
127
+ represent every operation of an app. Inspect selected definitions as needed.
128
+ Load the full discovery contract with `platform` / `operation: "schema"` /
129
+ `input: {"name": "platform_tools"}`. Unknown options fail validation before a
130
+ request; discovery never executes the tools it finds. CLI batches use the same
131
+ per-query options, for example `relvo meta search '{"queries":[{"query":"Instagram profiles"},{"query":"web search","provider":"brave"}]}'`.
132
+
48
133
  platform_manage_connections returns a trusted console URL and target project for explicit user
49
134
  OAuth consent, followed by a status recheck. It does not initiate OAuth itself.
50
135
  Remote Python/Bash require an explicitly enabled persistent sandbox deployment
package/bin/relvo-mcp.mjs CHANGED
@@ -7,7 +7,7 @@ if (args.length === 1 && args[0] === "--version") {
7
7
  const manifest = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
8
8
  console.log(manifest.version);
9
9
  } else if (args.length === 1 && ["--help", "-h", "help"].includes(args[0])) {
10
- console.log("Usage: relvo-mcp\nStart the Relvo MCP server over stdio.\nEnvironment: RELVO_API_URL, RELVO_API_KEY\nLocal uploads are disabled unless RELVO_MCP_ALLOWED_UPLOAD_ROOTS lists allowed absolute directories.\nExample: npx -y @relvo/mcp\nStandard output is reserved for MCP protocol messages.");
10
+ console.log("Usage: relvo-mcp\nStart the Relvo MCP server over stdio.\nEnvironment: RELVO_API_URL, RELVO_API_KEY\nOptional: RELVO_MCP_MODE=full loads every operation as its own tool; the compact agent surface is the default.\nOptional: RELVO_MCP_TOOLS=web_search,serp_lookup also lists those catalog tools as tools of their own, to call without discovery (agent surface, at most 20).\nLocal uploads are disabled unless RELVO_MCP_ALLOWED_UPLOAD_ROOTS lists allowed absolute directories.\nExample: npx -y @relvo/mcp\nStandard output is reserved for MCP protocol messages.");
11
11
  } else if (args.length && !(args.length === 2 && args[0] === "--profile")) {
12
12
  console.error("Usage: relvo-mcp [--help | --version]");
13
13
  process.exitCode = 2;