tereno-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.
- package/README.md +1 -0
- package/bin/tereno-mcp.mjs +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -107,6 +107,7 @@ and **this package never touches a private key**.
|
|
|
107
107
|
| `TERENO_WALLET` | — | Base address announced before payment, so a challenge can be bound to the wallet that will settle it. Optional. |
|
|
108
108
|
| `TERENO_BASE_URL` | `https://www.tereno.xyz` | Point at another Tereno deployment. |
|
|
109
109
|
| `TERENO_TIMEOUT_MS` | `45000` | Upstream request timeout. |
|
|
110
|
+
| `TERENO_EVIDENCE_INSTALLATION_ID` | — | Optional stable random id for this MCP installation. It is hashed only when resolving evidence received from another agent; never use a wallet or secret. |
|
|
110
111
|
|
|
111
112
|
## 🔐 What this package does and does not do
|
|
112
113
|
|
package/bin/tereno-mcp.mjs
CHANGED
|
@@ -15,10 +15,13 @@ import { createInterface } from "node:readline";
|
|
|
15
15
|
|
|
16
16
|
// Travels in the user-agent, and the demand panel counts installs by it, so it
|
|
17
17
|
// has to track the published version rather than drift from it.
|
|
18
|
-
const VERSION = "0.1.
|
|
18
|
+
const VERSION = "0.1.3";
|
|
19
19
|
const BASE_URL = (process.env.TERENO_BASE_URL || "https://www.tereno.xyz").replace(/\/+$/, "");
|
|
20
20
|
const ENDPOINT = BASE_URL + "/api/mcp";
|
|
21
21
|
const WALLET = process.env.TERENO_WALLET?.trim();
|
|
22
|
+
// Stable opaque id, supplied by the operator. The hosted server hashes it only
|
|
23
|
+
// when evidence received from another agent is resolved; it is never a wallet.
|
|
24
|
+
const EVIDENCE_INSTALLATION_ID = process.env.TERENO_EVIDENCE_INSTALLATION_ID?.trim();
|
|
22
25
|
const TIMEOUT_MS = Number(process.env.TERENO_TIMEOUT_MS || 45_000);
|
|
23
26
|
const PAYMENT_REQUIRED_HEADER = "payment-required";
|
|
24
27
|
|
|
@@ -42,6 +45,7 @@ async function forward(request) {
|
|
|
42
45
|
// Identifies the caller before payment, so a challenge can be bound to the
|
|
43
46
|
// wallet that will settle it. Optional: everything free works without it.
|
|
44
47
|
if (WALLET) headers["x-agent-wallet"] = WALLET;
|
|
48
|
+
if (EVIDENCE_INSTALLATION_ID) headers["x-tereno-evidence-installation"] = EVIDENCE_INSTALLATION_ID;
|
|
45
49
|
|
|
46
50
|
const response = await fetch(ENDPOINT, {
|
|
47
51
|
method: "POST", headers, body: JSON.stringify(request), signal: controller.signal,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tereno-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"mcpName": "xyz.tereno/tereno",
|
|
5
5
|
"description": "MCP server for Tereno on Base: check a contract, a transaction or a web page before you act on it. Free catalog, pricing and receipt tools; paid answers settle per call with x402 in USDC.",
|
|
6
6
|
"type": "module",
|