tereno-mcp 0.1.0 โ†’ 0.1.2

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/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Tereno
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,17 +1,53 @@
1
+ <div align="center">
2
+
3
+ <img src="images/logo.png" alt="Tereno" width="150" />
4
+
1
5
  # tereno-mcp
2
6
 
3
- MCP server for [Tereno](https://www.tereno.xyz) on Base. Check a contract, a
4
- transaction or a web page before you act on it, and get a verdict with the
5
- evidence behind it, the limits of that evidence, and the block it stops being
6
- valid at.
7
+ ### ๐Ÿ›ก๏ธ Check before you act โ€” an MCP server for Base, over x402
8
+
9
+ **Ask what it costs before you pay for it.** Free catalog, pricing and receipt
10
+ tools work with no wallet and no signup; paid answers settle per call in USDC,
11
+ and reusing an answer another agent already paid for costs less.
12
+
13
+ <br/>
14
+
15
+ [![npm version](https://img.shields.io/npm/v/tereno-mcp?style=for-the-badge&color=0052FF&logo=npm)](https://www.npmjs.com/package/tereno-mcp)
16
+ [![MCP](https://img.shields.io/badge/MCP-registry-8B5CF6?style=for-the-badge)](https://registry.modelcontextprotocol.io)
17
+ [![Base](https://img.shields.io/badge/Base-0052FF?style=for-the-badge&logo=coinbase&logoColor=white)](https://base.org)
18
+ [![x402](https://img.shields.io/badge/x402%20%C2%B7%20USDC-2775CA?style=for-the-badge)](https://www.x402.org)
19
+
20
+ [![license](https://img.shields.io/npm/l/tereno-mcp?style=flat-square&color=green)](./LICENSE)
21
+ [![no dependencies](https://img.shields.io/badge/dependencies-none-brightgreen?style=flat-square)](./package.json)
22
+ [![free tier](https://img.shields.io/badge/free%20tools-no%20wallet-success?style=flat-square)](#-free-no-wallet-needed)
23
+
24
+ ```bash
25
+ npx -y tereno-mcp
26
+ ```
27
+
28
+ </div>
29
+
30
+ ---
31
+
32
+ ## โšก Why this exists
7
33
 
8
- Three tools are free and need no wallet. The rest are paid per call with
9
- [x402](https://x402.org) in USDC on Base, from $0.001.
34
+ An agent that reads a contract, signs a transaction or scrapes a page is acting
35
+ on information it cannot verify. Most tools answer *what* something is. None of
36
+ them tell you how long that answer stays true.
10
37
 
11
- ## Install
38
+ `tereno-mcp` puts [Tereno](https://www.tereno.xyz) inside any MCP client. Every
39
+ paid answer comes back with the evidence behind it, the limits of that evidence,
40
+ and **the block it stops being valid at**.
12
41
 
13
- Claude Desktop, Claude Code, Cursor, Cline, Windsurf and anything else that
14
- speaks MCP over stdio:
42
+ - **No API key, no signup.** The agent's wallet *is* the identity.
43
+ - **Price before payment.** `tereno_price` tells you the cost and whether the
44
+ answer already exists, without a wallet and without committing to anything.
45
+ - **Cheaper when shared.** Deterministic answers are reused across agents: the
46
+ first caller pays to compute, everyone after pays the reuse price.
47
+
48
+ ## ๐Ÿš€ Install
49
+
50
+ Add it to any MCP client โ€” Claude Desktop, Claude Code, Cursor, Cline, Windsurf:
15
51
 
16
52
  ```json
17
53
  {
@@ -24,62 +60,109 @@ speaks MCP over stdio:
24
60
  }
25
61
  ```
26
62
 
27
- Nothing else to configure. Restart the client and the free tools work.
63
+ Restart the client. Nothing else to configure โ€” the free tools work immediately.
28
64
 
29
- ## Free tools
65
+ ## ๐Ÿ†“ Free, no wallet needed
30
66
 
31
- | Tool | Answers |
32
- | --- | --- |
33
- | `tereno_catalog` | Everything Tereno can answer, the price tiers, how long each answer stays valid, and whether it is shared or private. |
34
- | `tereno_price` | What one specific call would cost right now, and whether the answer already exists. No wallet, no commitment. |
35
- | `tereno_receipt` | What a settled call actually charged: tier, list price, credit applied, price paid, and whether it settled on chain. |
67
+ | Tool | The question it answers |
68
+ |---|---|
69
+ | ๐Ÿ“– `tereno_catalog` | What can Tereno answer, what does it cost, how long does each answer stay valid? |
70
+ | ๐Ÿท๏ธ `tereno_price` | What would *this exact call* cost right now โ€” and does the answer already exist? |
71
+ | ๐Ÿงพ `tereno_receipt` | What did a settled call actually charge: tier, list price, credit applied, price paid? |
36
72
 
37
- `tereno_price` is the one worth knowing about. Deterministic answers are shared,
38
- so an answer another agent already paid for costs less while it is still fresh:
73
+ `tereno_price` is the one worth knowing about. It names the reuse tier out loud:
39
74
 
40
75
  ```
41
- cacheStatus: "hit" someone already computed this and it is fresh โ€” reuse price
42
- cacheStatus: "partial" the durable half survived โ€” only the expired part is recomputed
43
- cacheStatus: "miss" nothing to reuse โ€” this call computes it, and the next asker pays less
76
+ hit another agent already paid to compute this and it is still fresh
77
+ partial the durable half survived; only the expired part is recomputed
78
+ miss nothing to reuse โ€” this call computes it, and the next asker pays less
44
79
  ```
45
80
 
46
- ## Paid tools
81
+ ## ๐Ÿ’ณ Paid per call
82
+
83
+ | Tool | Price | The question it answers |
84
+ |---|---:|---|
85
+ | ๐Ÿšฆ `transaction_intent_guard` | $0.005 | **Is this safe to sign?** Simulation, gas, balance and allowance deltas, unlimited-approval flags |
86
+ | ๐Ÿ›ก๏ธ `contract_guard` | $0.001โ€“3 | Is this contract safe to interact with? (code, proxy, pause) |
87
+ | ๐Ÿ•ต๏ธ `contract_change` | $0.001โ€“2 | Did it change since last look? (rug-pull-after-audit detector) |
88
+ | ๐Ÿช™ `token_metadata` | $0.001โ€“3 | What token is this, really? (name, symbol, decimals, supply) |
89
+ | ๐Ÿงฌ `contract_interface` | $0.001โ€“2 | ERC-20? NFT? Proxy? One bounded probe |
90
+ | โ›ฝ `chain_snapshot` | $0.001โ€“2 | Latest Base block, base fee and suggested gas, zero parameters |
91
+ | ๐Ÿ“„ `web_compile` | $0.001โ€“5 | Public URL โ†’ bounded Markdown with resolved links, citations and a reusable artifact |
92
+ | ๐Ÿ”Ž `evidence_artifact` | $0.001โ€“3 | Can this public artifact be reused? Provenance, field validity, recomputation input |
93
+ | ๐Ÿค `demand_pledge` | free | Name a capability you would pay for. Credit only after the same wallet pays for it later |
94
+
95
+ Calling a paid tool returns a `402` carrying the payment challenge in
96
+ `error.data.paymentRequired`. Sign it and retry with a `PAYMENT-SIGNATURE`
97
+ header. If your agent already has an x402 wallet, that retry is the normal flow
98
+ and **this package never touches a private key**.
99
+
100
+ > ๐Ÿ”’ `transaction_intent_guard` is never cached, shared or resold. An unsigned
101
+ > transaction is intent, and it stays with the wallet that paid for it.
102
+
103
+ ## โš™๏ธ Configuration
104
+
105
+ | Env | Default | Purpose |
106
+ |---|---|---|
107
+ | `TERENO_WALLET` | โ€” | Base address announced before payment, so a challenge can be bound to the wallet that will settle it. Optional. |
108
+ | `TERENO_BASE_URL` | `https://www.tereno.xyz` | Point at another Tereno deployment. |
109
+ | `TERENO_TIMEOUT_MS` | `45000` | Upstream request timeout. |
47
110
 
48
- `contract_guard`, `contract_change`, `contract_interface`, `token_metadata`,
49
- `chain_snapshot`, `evidence_artifact`, `web_compile`, `transaction_intent_guard`.
111
+ ## ๐Ÿ” What this package does and does not do
50
112
 
51
- Calling one returns a `402` carrying the payment challenge in `error.data.paymentRequired`.
52
- Sign it and retry with a `PAYMENT-SIGNATURE` header to get the answer. If your
53
- agent already has an x402 wallet, that retry is the normal flow and nothing here
54
- needs a private key.
113
+ It is a **stdio transport** in front of the hosted endpoint at
114
+ [`/api/mcp`](https://www.tereno.xyz/api/mcp). Messages are forwarded verbatim, so
115
+ the tool list, the prices and the payment challenge all come from the same place
116
+ an HTTP agent sees โ€” and this package needs no release when a capability changes.
55
117
 
56
- `transaction_intent_guard` is never cached, shared or resold: an unsigned
57
- transaction is intent, and it stays with the wallet that paid for it.
118
+ The one thing it translates is payment: over HTTP the challenge arrives in a
119
+ response header, and stdio has no headers, so it is folded into the JSON-RPC
120
+ error payload where a client can still reach it.
58
121
 
59
- ## Configuration
122
+ **No private key is ever read, stored or transmitted.** There are no
123
+ dependencies, and the whole thing is one readable file โ€” [read it](./bin/tereno-mcp.mjs)
124
+ before you let it run on your machine.
60
125
 
61
- | Variable | Default | Purpose |
62
- | --- | --- | --- |
63
- | `TERENO_WALLET` | none | Base address announced before payment, so a challenge can be bound to the wallet that will settle it. Optional; every free tool works without it. |
64
- | `TERENO_BASE_URL` | `https://www.tereno.xyz` | Point at another deployment. |
65
- | `TERENO_TIMEOUT_MS` | `45000` | Upstream request timeout. |
126
+ If your client supports remote MCP servers, skip this package and point it
127
+ straight at `https://www.tereno.xyz/api/mcp`.
66
128
 
67
- No private key is ever read, stored or transmitted by this package.
129
+ ## ๐ŸŒฑ How it stays cheap โ€” the cooperative layer
68
130
 
69
- ## What this package is
131
+ Tereno is a **shared-cache coordination layer**, not just an API. The first agent
132
+ to pay for a given piece of verified work seeds it for the whole network; every
133
+ later agent that reuses that answer pays less, and the seeder earns a small,
134
+ non-transferable credit that discounts its own future calls.
70
135
 
71
- A stdio transport in front of the hosted endpoint at
72
- `https://www.tereno.xyz/api/mcp`. Messages are forwarded verbatim, so the tool
73
- list, the prices and the payment challenge come from the same place an HTTP
74
- agent sees, and this package does not need a release when a capability changes.
136
+ Safety is a public good with a private cost. By making the first computation earn
137
+ from every reuse, the network turns *"I paid to check this contract"* into *"I
138
+ lowered the price of checking it for everyone, and my own checks got cheaper."*
75
139
 
76
- The one thing it translates is payment: over HTTP the challenge arrives in a
77
- response header, and stdio has no headers, so it is folded into the JSON-RPC
78
- error payload where a client can still reach it.
140
+ > The honest fine print: rewards are **non-transferable credits**, capped per
141
+ > artifact. They fund your agent's budget, they are not yield.
142
+
143
+ Discovery, scoring, reputation, pricing and the global cache live in the closed
144
+ Tereno backend. This server and its SDK
145
+ ([`tereno-client`](https://www.npmjs.com/package/tereno-client)) are the public,
146
+ open interface to it.
147
+
148
+ ## ๐Ÿค Support & community
149
+
150
+ - ๐Ÿ’ฌ **Questions / setup** โ†’ [Tereno Discord](https://discord.gg/YsgGSRBxn)
151
+ - ๐Ÿ› **Bugs** โ†’ [issues](https://github.com/tereno-xyz/tereno-mcp/issues) ยท โš ๏ธ never paste private keys or `.env`
152
+ - ๐Ÿ”’ **Vulnerabilities** โ†’ [report privately](https://github.com/tereno-xyz/tereno-mcp/security/advisories/new)
153
+
154
+ ## ๐Ÿ”— Links
155
+
156
+ [Live catalog](https://www.tereno.xyz/api/v1/capabilities) ยท
157
+ [OpenAPI](https://www.tereno.xyz/openapi.yaml) ยท
158
+ [MCP registry entry](https://registry.modelcontextprotocol.io/v0/servers?search=tereno) ยท
159
+ [plugin-tereno for ElizaOS](https://github.com/RobMartello/plugin-tereno) ยท
160
+ [tereno-client SDK](https://www.npmjs.com/package/tereno-client)
161
+
162
+ ---
79
163
 
80
- If your client supports remote MCP servers, you can skip this package and point
81
- it at `https://www.tereno.xyz/api/mcp` directly.
164
+ <div align="center">
82
165
 
83
- ## Licence
166
+ **[tereno.xyz](https://www.tereno.xyz)** ยท Verdicts before signatures, for agents on Base.
84
167
 
85
- MIT
168
+ </div>
@@ -13,7 +13,9 @@
13
13
 
14
14
  import { createInterface } from "node:readline";
15
15
 
16
- const VERSION = "0.1.0";
16
+ // Travels in the user-agent, and the demand panel counts installs by it, so it
17
+ // has to track the published version rather than drift from it.
18
+ const VERSION = "0.1.2";
17
19
  const BASE_URL = (process.env.TERENO_BASE_URL || "https://www.tereno.xyz").replace(/\/+$/, "");
18
20
  const ENDPOINT = BASE_URL + "/api/mcp";
19
21
  const WALLET = process.env.TERENO_WALLET?.trim();
Binary file
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "tereno-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
+ "mcpName": "xyz.tereno/tereno",
4
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.",
5
6
  "type": "module",
6
7
  "bin": {
@@ -8,7 +9,9 @@
8
9
  },
9
10
  "files": [
10
11
  "bin",
11
- "README.md"
12
+ "images",
13
+ "README.md",
14
+ "LICENSE"
12
15
  ],
13
16
  "engines": {
14
17
  "node": ">=18"
@@ -30,8 +33,10 @@
30
33
  "homepage": "https://www.tereno.xyz",
31
34
  "repository": {
32
35
  "type": "git",
33
- "url": "git+https://github.com/RobMartello/tereno.git",
34
- "directory": "clients/tereno-mcp"
36
+ "url": "git+https://github.com/tereno-xyz/tereno-mcp.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/tereno-xyz/tereno-mcp/issues"
35
40
  },
36
41
  "license": "MIT",
37
42
  "publishConfig": {