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 +20 -0
- package/README.md +132 -49
- package/bin/tereno-mcp.mjs +3 -1
- package/images/logo.png +0 -0
- package/package.json +9 -4
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
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
+
[](https://www.npmjs.com/package/tereno-mcp)
|
|
16
|
+
[](https://registry.modelcontextprotocol.io)
|
|
17
|
+
[](https://base.org)
|
|
18
|
+
[](https://www.x402.org)
|
|
19
|
+
|
|
20
|
+
[](./LICENSE)
|
|
21
|
+
[](./package.json)
|
|
22
|
+
[](#-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
|
-
|
|
9
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
|
|
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
|
|
63
|
+
Restart the client. Nothing else to configure โ the free tools work immediately.
|
|
28
64
|
|
|
29
|
-
## Free
|
|
65
|
+
## ๐ Free, no wallet needed
|
|
30
66
|
|
|
31
|
-
| Tool |
|
|
32
|
-
|
|
33
|
-
| `tereno_catalog` |
|
|
34
|
-
| `tereno_price` | What
|
|
35
|
-
| `tereno_receipt` | What a settled call actually
|
|
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.
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
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
|
-
|
|
49
|
-
`chain_snapshot`, `evidence_artifact`, `web_compile`, `transaction_intent_guard`.
|
|
111
|
+
## ๐ What this package does and does not do
|
|
50
112
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
needs a
|
|
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
|
-
|
|
57
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
129
|
+
## ๐ฑ How it stays cheap โ the cooperative layer
|
|
68
130
|
|
|
69
|
-
|
|
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
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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
|
|
77
|
-
|
|
78
|
-
|
|
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
|
-
|
|
81
|
-
it at `https://www.tereno.xyz/api/mcp` directly.
|
|
164
|
+
<div align="center">
|
|
82
165
|
|
|
83
|
-
|
|
166
|
+
**[tereno.xyz](https://www.tereno.xyz)** ยท Verdicts before signatures, for agents on Base.
|
|
84
167
|
|
|
85
|
-
|
|
168
|
+
</div>
|
package/bin/tereno-mcp.mjs
CHANGED
|
@@ -13,7 +13,9 @@
|
|
|
13
13
|
|
|
14
14
|
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
|
+
// 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();
|
package/images/logo.png
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tereno-mcp",
|
|
3
|
-
"version": "0.1.
|
|
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
|
-
"
|
|
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/
|
|
34
|
-
|
|
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": {
|