hodlodds-mcp 0.1.0__tar.gz
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.
- hodlodds_mcp-0.1.0/LICENSE +21 -0
- hodlodds_mcp-0.1.0/PKG-INFO +202 -0
- hodlodds_mcp-0.1.0/README.md +190 -0
- hodlodds_mcp-0.1.0/pyproject.toml +21 -0
- hodlodds_mcp-0.1.0/setup.cfg +4 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp/__init__.py +3 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp/server.py +318 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/PKG-INFO +202 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/SOURCES.txt +13 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/dependency_links.txt +1 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/entry_points.txt +2 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/requires.txt +2 -0
- hodlodds_mcp-0.1.0/src/hodlodds_mcp.egg-info/top_level.txt +1 -0
- hodlodds_mcp-0.1.0/tests/test_release.py +62 -0
- hodlodds_mcp-0.1.0/tests/test_server.py +420 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 HodlOdds
|
|
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 THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: hodlodds-mcp
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Local stdio MCP tools for HodlOdds crash odds with bounded USDC payments
|
|
5
|
+
License: MIT
|
|
6
|
+
Requires-Python: >=3.11
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: hodlodds<0.4,>=0.3.0
|
|
10
|
+
Requires-Dist: mcp<3,>=2.3
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# hodlodds-mcp
|
|
14
|
+
|
|
15
|
+
A local stdio MCP server for HodlOdds crash odds. Free tools explain token
|
|
16
|
+
coverage, data markets and feed status. With a local wallet configured, paid
|
|
17
|
+
tools use x402 USDC on Solana or Base with per-call and per-session spending
|
|
18
|
+
limits. Paying on Base does not change the data universe: current paid scores
|
|
19
|
+
cover active SOL-quoted pump.fun graduates.
|
|
20
|
+
|
|
21
|
+
## Install
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
pip install hodlodds-mcp
|
|
25
|
+
hodlodds-mcp
|
|
26
|
+
# Or run in an isolated environment:
|
|
27
|
+
uvx hodlodds-mcp
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Python 3.11+ is required. Dependencies are `hodlodds>=0.3.0,<0.4` and
|
|
31
|
+
`mcp>=2.3,<3`. The HodlOdds client supplies its pinned x402 dependencies. This
|
|
32
|
+
package starts a local process, not an HTTP MCP endpoint. Stdout is reserved
|
|
33
|
+
for MCP protocol messages.
|
|
34
|
+
|
|
35
|
+
## Tools and prices
|
|
36
|
+
|
|
37
|
+
| Tool | Cost in USDC | Result |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `status()` | Free | Feed state, age, source timestamp and API status fields |
|
|
40
|
+
| `markets()` | Free | Available and experimental data markets, prices and filter syntax |
|
|
41
|
+
| `coverage(mint)` | Free | Observed coverage stage, reason and source timestamp |
|
|
42
|
+
| `meaning()` | Free, offline | Crash definition, confidence interpretation and freshness rules |
|
|
43
|
+
| `crash_odds(mint)` | 0.01 per delivered answer | Crash probability, summary, confidence, forecast timestamps, receipt and budget |
|
|
44
|
+
| `board(...)` | 0.005 per delivered coin; empty results free | Ranked rows or a watchlist, omitted-mint facts, timestamps, receipt and budget |
|
|
45
|
+
|
|
46
|
+
The separate HTTP API's `/v1/risk/{mint}/last` costs 0.002 USDC for last-known
|
|
47
|
+
odds at most 30 minutes old. **Version 0.1.0 exposes no last-known MCP tool**;
|
|
48
|
+
use the Python SDK's `last()` method directly if you explicitly want that route.
|
|
49
|
+
|
|
50
|
+
`board` accepts `limit`, `sort`, `max_risk`, `min_risk`, `min_liquidity_sol`,
|
|
51
|
+
`min_age_min`, `max_age_min`, `min_trades_5`, `min_confidence`, `mints`, `chain`
|
|
52
|
+
and `platform`. Sorts are `lowest_risk` (default), `riskiest`, `liquidity`,
|
|
53
|
+
`newest` and `active`. Without `mints`, limits are 10–500 (default 50).
|
|
54
|
+
With a watchlist of 1–100 distinct Solana mint addresses, the default limit is
|
|
55
|
+
its length and explicit limits are 1–100. Only returned coins are charged.
|
|
56
|
+
`not_delivered` contains coverage/filter facts for omitted mints, not inferred
|
|
57
|
+
odds. Probability filters use 0–1; confidence is `high`, `medium` or `low`.
|
|
58
|
+
|
|
59
|
+
`crash_odds`, `board` and `coverage` accept optional `chain` and `platform`
|
|
60
|
+
strings, comma-separated strings or lists. Currently use `chain="solana"`
|
|
61
|
+
or its CAIP-2 ID and `platform="pumpfun"`; `pump` and `pump.fun` are aliases.
|
|
62
|
+
Values are case-insensitive; empty, duplicate and unsupported values are
|
|
63
|
+
refused before payment. Use `markets()` to check current availability. Data
|
|
64
|
+
markets and payment networks are separate choices.
|
|
65
|
+
|
|
66
|
+
Every result includes “Odds, not guarantees. Not financial advice.” Errors
|
|
67
|
+
have MCP `isError: true` and a structured error code. Missing confidence is
|
|
68
|
+
reported as `missing`. Receipts contain public payment details, not signed
|
|
69
|
+
authorizations or key contents. Spending is tracked in integer atomic USDC;
|
|
70
|
+
displayed USDC amounts are exact decimal strings.
|
|
71
|
+
|
|
72
|
+
## Configuration
|
|
73
|
+
|
|
74
|
+
Tool arguments cannot change the wallet, recipient, payment network, endpoint
|
|
75
|
+
or spending limits. Set these in the MCP process environment:
|
|
76
|
+
|
|
77
|
+
| Variable | Default / requirement |
|
|
78
|
+
| --- | --- |
|
|
79
|
+
| `HODLODDS_BASE_URL` | `https://api.hodlodds.com`; HTTPS, or HTTP on loopback for local tests |
|
|
80
|
+
| `HODLODDS_NETWORK` | `devnet`; one of `solana`, `base`, `devnet`, `base-sepolia` |
|
|
81
|
+
| `HODLODDS_PAY_TO` | No default. Pin the recipient for the chosen payment network from `/v1/meta`, after independently verifying it. Required on mainnet even in read-only mode, and whenever a key is configured. |
|
|
82
|
+
| `HODLODDS_KEYPAIR` | Optional local key-file path. Omit or leave empty for read-only mode. Use an absolute path in desktop configurations. |
|
|
83
|
+
| `HODLODDS_MAX_PRICE_USDC` | `0.01` per call, maximum `2.5`; single-token calls retain the SDK's `1` USDC ceiling. Positive plain decimal with at most six fractional digits. |
|
|
84
|
+
| `HODLODDS_SESSION_BUDGET_USDC` | Required when a key is set; positive plain decimal with at most six fractional digits. No default budget. Resets on process restart. |
|
|
85
|
+
|
|
86
|
+
The default per-call cap can buy at most two delivered board rows. A larger
|
|
87
|
+
offer is refused before key access; the cap does not trim an answer down to
|
|
88
|
+
two coins. Set `0.50` explicitly for up to 100 delivered rows, for example.
|
|
89
|
+
The accepted offer amount, not the requested limit, determines the budget debit.
|
|
90
|
+
|
|
91
|
+
**Read-only mode:** omit the key and session budget. The registered tools are
|
|
92
|
+
`status`, `markets`, `coverage` and `meaning`. No key is loaded at startup in
|
|
93
|
+
either mode. Key files must be regular, non-symlink files, mode `0600`, at most
|
|
94
|
+
4 KiB. Solana uses solana-keygen JSON; Base uses a local hex/JSON private-key
|
|
95
|
+
file. Use a dedicated low-balance wallet. Never put key contents in a client
|
|
96
|
+
configuration.
|
|
97
|
+
|
|
98
|
+
## Client configuration
|
|
99
|
+
|
|
100
|
+
Claude Desktop: merge this read-only setup into `claude_desktop_config.json`:
|
|
101
|
+
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"mcpServers": {
|
|
105
|
+
"hodlodds": {
|
|
106
|
+
"command": "uvx",
|
|
107
|
+
"args": ["hodlodds-mcp"]
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Use the executable's absolute path if the desktop app cannot find `uvx`.
|
|
114
|
+
To enable payments, add the environment values below to that server entry.
|
|
115
|
+
This is also a generic stdio process configuration for clients that accept
|
|
116
|
+
`command`, `args` and `env` (adapt the surrounding configuration to your client):
|
|
117
|
+
|
|
118
|
+
```json
|
|
119
|
+
{
|
|
120
|
+
"command": "hodlodds-mcp",
|
|
121
|
+
"args": [],
|
|
122
|
+
"env": {
|
|
123
|
+
"HODLODDS_BASE_URL": "https://api.hodlodds.com",
|
|
124
|
+
"HODLODDS_NETWORK": "solana",
|
|
125
|
+
"HODLODDS_PAY_TO": "REPLACE_WITH_VERIFIED_RECIPIENT_FROM_META",
|
|
126
|
+
"HODLODDS_KEYPAIR": "/absolute/path/to/payer.json",
|
|
127
|
+
"HODLODDS_MAX_PRICE_USDC": "0.01",
|
|
128
|
+
"HODLODDS_SESSION_BUDGET_USDC": "0.10"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Replace the recipient and file-path placeholders before starting. The example
|
|
134
|
+
uses real mainnet USDC. For Base payments, choose `base`, its recipient and an
|
|
135
|
+
EVM key file. Test networks require a test API that offers that network:
|
|
136
|
+
use `devnet` or `base-sepolia`, test USDC and the matching verified recipient.
|
|
137
|
+
These snippets are configuration templates; assistant applications were not
|
|
138
|
+
launched during offline package testing.
|
|
139
|
+
|
|
140
|
+
Restart the MCP process after changing its environment. Reconcile any uncertain
|
|
141
|
+
payment first: a restart also resets the session budget.
|
|
142
|
+
|
|
143
|
+
## Payment safety and reconciliation
|
|
144
|
+
|
|
145
|
+
Paid calls are serialized across tools. The SDK validates the offer's network,
|
|
146
|
+
asset, pinned recipient, query binding and amount before key access or signing.
|
|
147
|
+
The session budget checks that exact accepted amount, then reserves it before
|
|
148
|
+
the authorized request. A successful receipt retains the debit. Exhausting the
|
|
149
|
+
budget refuses the next payment before signing; free tools remain available.
|
|
150
|
+
|
|
151
|
+
A refusal marked `HodlOdds-Charged: no` is free only when the receipt does not
|
|
152
|
+
indicate success or a transaction. A conflicting or malformed receipt remains
|
|
153
|
+
uncertain. Confirmed free refusals refund the reservation, return an error and
|
|
154
|
+
leave payments enabled.
|
|
155
|
+
|
|
156
|
+
After an uncertain payment—such as a lost response, missing receipt or
|
|
157
|
+
conflicting receipt—**all further paid calls pause**. The reserved amount stays
|
|
158
|
+
spent until the operator reconciles it against finalized wallet history and
|
|
159
|
+
payment records. The result includes public reconciliation details. There is
|
|
160
|
+
no tool to clear the pause, no automatic retry or redemption, and no pending
|
|
161
|
+
authorization file is written. Restart only after reconciliation and choose a
|
|
162
|
+
new budget that accounts for prior spending.
|
|
163
|
+
|
|
164
|
+
The budget is local to one process and is not shared or persistent. **Every
|
|
165
|
+
restart resets it.** The paid request timeout is 90 seconds. Cancellation does
|
|
166
|
+
not abandon in-flight payment accounting. A settled answer with an unexpected
|
|
167
|
+
shape returns raw data with a warning instead of authorizing another payment.
|
|
168
|
+
Receipts report server settlement; they are not independent proof of finality.
|
|
169
|
+
|
|
170
|
+
## Meaning and freshness
|
|
171
|
+
|
|
172
|
+
0.04 means about 4 in 100 tokens like this one lose 90% or more of their price within the next 60 minutes. Higher means riskier, but a low number does not mean safe: smaller or slower drops are not counted, and the odds change minute by minute.
|
|
173
|
+
|
|
174
|
+
Scores are recomputed every 60 seconds, about 20 seconds after each minute closes, from completed one-minute bars up to `as_of`. Each score covers the 60 minutes after its `as_of` time and is valid only until the next update; the odds for the same token can rise sharply from one minute to the next. Scoring starts around :20; computation and publication can delay availability. For decisions, refresh immediately before acting and once per minute for continuous monitoring, checking `as_of` for a new minute. The API freshness cutoff is separate: by default, data becomes `stale` more than 120 seconds after `issued_at` or after `expires_at`. A new request does not restart the forecast window.
|
|
175
|
+
|
|
176
|
+
A crash is a completed one-minute close in SOL at least 90% below the reference
|
|
177
|
+
price within the displayed 60-minute window. `as_of` and `horizon_end` are UTC
|
|
178
|
+
Unix seconds. Confidence describes historical calibration and evidence; it is
|
|
179
|
+
not a token-specific interval or guarantee. Missing odds, missing confidence,
|
|
180
|
+
stale data and uncovered tokens are not safety signals. Very low odds say
|
|
181
|
+
“under 0.1%”, never a rounded zero.
|
|
182
|
+
|
|
183
|
+
Odds, not guarantees. Not financial advice.
|
|
184
|
+
|
|
185
|
+
## Development
|
|
186
|
+
|
|
187
|
+
From the public repository root, with the dependencies and pytest installed:
|
|
188
|
+
|
|
189
|
+
```sh
|
|
190
|
+
python -m pytest -q mcp/tests
|
|
191
|
+
python -m build mcp
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Tests use the installed public HodlOdds package, mocked HTTP and signing, and
|
|
195
|
+
an in-memory MCP session. Socket connections and DNS lookups are disabled.
|
|
196
|
+
They do not prove live settlement or desktop-client integration. The budget
|
|
197
|
+
adapter uses the SDK's watch accounting hook, so the dependency is bounded to
|
|
198
|
+
`hodlodds>=0.3.0,<0.4` and tested before upgrades.
|
|
199
|
+
|
|
200
|
+
`server.json` contains registry metadata for `com.hodlodds/hodlodds-mcp`.
|
|
201
|
+
Publishing to PyPI and publishing a registry listing are separate steps;
|
|
202
|
+
namespace ownership and registry acceptance must be verified by the publisher.
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
# hodlodds-mcp
|
|
2
|
+
|
|
3
|
+
A local stdio MCP server for HodlOdds crash odds. Free tools explain token
|
|
4
|
+
coverage, data markets and feed status. With a local wallet configured, paid
|
|
5
|
+
tools use x402 USDC on Solana or Base with per-call and per-session spending
|
|
6
|
+
limits. Paying on Base does not change the data universe: current paid scores
|
|
7
|
+
cover active SOL-quoted pump.fun graduates.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pip install hodlodds-mcp
|
|
13
|
+
hodlodds-mcp
|
|
14
|
+
# Or run in an isolated environment:
|
|
15
|
+
uvx hodlodds-mcp
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Python 3.11+ is required. Dependencies are `hodlodds>=0.3.0,<0.4` and
|
|
19
|
+
`mcp>=2.3,<3`. The HodlOdds client supplies its pinned x402 dependencies. This
|
|
20
|
+
package starts a local process, not an HTTP MCP endpoint. Stdout is reserved
|
|
21
|
+
for MCP protocol messages.
|
|
22
|
+
|
|
23
|
+
## Tools and prices
|
|
24
|
+
|
|
25
|
+
| Tool | Cost in USDC | Result |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `status()` | Free | Feed state, age, source timestamp and API status fields |
|
|
28
|
+
| `markets()` | Free | Available and experimental data markets, prices and filter syntax |
|
|
29
|
+
| `coverage(mint)` | Free | Observed coverage stage, reason and source timestamp |
|
|
30
|
+
| `meaning()` | Free, offline | Crash definition, confidence interpretation and freshness rules |
|
|
31
|
+
| `crash_odds(mint)` | 0.01 per delivered answer | Crash probability, summary, confidence, forecast timestamps, receipt and budget |
|
|
32
|
+
| `board(...)` | 0.005 per delivered coin; empty results free | Ranked rows or a watchlist, omitted-mint facts, timestamps, receipt and budget |
|
|
33
|
+
|
|
34
|
+
The separate HTTP API's `/v1/risk/{mint}/last` costs 0.002 USDC for last-known
|
|
35
|
+
odds at most 30 minutes old. **Version 0.1.0 exposes no last-known MCP tool**;
|
|
36
|
+
use the Python SDK's `last()` method directly if you explicitly want that route.
|
|
37
|
+
|
|
38
|
+
`board` accepts `limit`, `sort`, `max_risk`, `min_risk`, `min_liquidity_sol`,
|
|
39
|
+
`min_age_min`, `max_age_min`, `min_trades_5`, `min_confidence`, `mints`, `chain`
|
|
40
|
+
and `platform`. Sorts are `lowest_risk` (default), `riskiest`, `liquidity`,
|
|
41
|
+
`newest` and `active`. Without `mints`, limits are 10–500 (default 50).
|
|
42
|
+
With a watchlist of 1–100 distinct Solana mint addresses, the default limit is
|
|
43
|
+
its length and explicit limits are 1–100. Only returned coins are charged.
|
|
44
|
+
`not_delivered` contains coverage/filter facts for omitted mints, not inferred
|
|
45
|
+
odds. Probability filters use 0–1; confidence is `high`, `medium` or `low`.
|
|
46
|
+
|
|
47
|
+
`crash_odds`, `board` and `coverage` accept optional `chain` and `platform`
|
|
48
|
+
strings, comma-separated strings or lists. Currently use `chain="solana"`
|
|
49
|
+
or its CAIP-2 ID and `platform="pumpfun"`; `pump` and `pump.fun` are aliases.
|
|
50
|
+
Values are case-insensitive; empty, duplicate and unsupported values are
|
|
51
|
+
refused before payment. Use `markets()` to check current availability. Data
|
|
52
|
+
markets and payment networks are separate choices.
|
|
53
|
+
|
|
54
|
+
Every result includes “Odds, not guarantees. Not financial advice.” Errors
|
|
55
|
+
have MCP `isError: true` and a structured error code. Missing confidence is
|
|
56
|
+
reported as `missing`. Receipts contain public payment details, not signed
|
|
57
|
+
authorizations or key contents. Spending is tracked in integer atomic USDC;
|
|
58
|
+
displayed USDC amounts are exact decimal strings.
|
|
59
|
+
|
|
60
|
+
## Configuration
|
|
61
|
+
|
|
62
|
+
Tool arguments cannot change the wallet, recipient, payment network, endpoint
|
|
63
|
+
or spending limits. Set these in the MCP process environment:
|
|
64
|
+
|
|
65
|
+
| Variable | Default / requirement |
|
|
66
|
+
| --- | --- |
|
|
67
|
+
| `HODLODDS_BASE_URL` | `https://api.hodlodds.com`; HTTPS, or HTTP on loopback for local tests |
|
|
68
|
+
| `HODLODDS_NETWORK` | `devnet`; one of `solana`, `base`, `devnet`, `base-sepolia` |
|
|
69
|
+
| `HODLODDS_PAY_TO` | No default. Pin the recipient for the chosen payment network from `/v1/meta`, after independently verifying it. Required on mainnet even in read-only mode, and whenever a key is configured. |
|
|
70
|
+
| `HODLODDS_KEYPAIR` | Optional local key-file path. Omit or leave empty for read-only mode. Use an absolute path in desktop configurations. |
|
|
71
|
+
| `HODLODDS_MAX_PRICE_USDC` | `0.01` per call, maximum `2.5`; single-token calls retain the SDK's `1` USDC ceiling. Positive plain decimal with at most six fractional digits. |
|
|
72
|
+
| `HODLODDS_SESSION_BUDGET_USDC` | Required when a key is set; positive plain decimal with at most six fractional digits. No default budget. Resets on process restart. |
|
|
73
|
+
|
|
74
|
+
The default per-call cap can buy at most two delivered board rows. A larger
|
|
75
|
+
offer is refused before key access; the cap does not trim an answer down to
|
|
76
|
+
two coins. Set `0.50` explicitly for up to 100 delivered rows, for example.
|
|
77
|
+
The accepted offer amount, not the requested limit, determines the budget debit.
|
|
78
|
+
|
|
79
|
+
**Read-only mode:** omit the key and session budget. The registered tools are
|
|
80
|
+
`status`, `markets`, `coverage` and `meaning`. No key is loaded at startup in
|
|
81
|
+
either mode. Key files must be regular, non-symlink files, mode `0600`, at most
|
|
82
|
+
4 KiB. Solana uses solana-keygen JSON; Base uses a local hex/JSON private-key
|
|
83
|
+
file. Use a dedicated low-balance wallet. Never put key contents in a client
|
|
84
|
+
configuration.
|
|
85
|
+
|
|
86
|
+
## Client configuration
|
|
87
|
+
|
|
88
|
+
Claude Desktop: merge this read-only setup into `claude_desktop_config.json`:
|
|
89
|
+
|
|
90
|
+
```json
|
|
91
|
+
{
|
|
92
|
+
"mcpServers": {
|
|
93
|
+
"hodlodds": {
|
|
94
|
+
"command": "uvx",
|
|
95
|
+
"args": ["hodlodds-mcp"]
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Use the executable's absolute path if the desktop app cannot find `uvx`.
|
|
102
|
+
To enable payments, add the environment values below to that server entry.
|
|
103
|
+
This is also a generic stdio process configuration for clients that accept
|
|
104
|
+
`command`, `args` and `env` (adapt the surrounding configuration to your client):
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"command": "hodlodds-mcp",
|
|
109
|
+
"args": [],
|
|
110
|
+
"env": {
|
|
111
|
+
"HODLODDS_BASE_URL": "https://api.hodlodds.com",
|
|
112
|
+
"HODLODDS_NETWORK": "solana",
|
|
113
|
+
"HODLODDS_PAY_TO": "REPLACE_WITH_VERIFIED_RECIPIENT_FROM_META",
|
|
114
|
+
"HODLODDS_KEYPAIR": "/absolute/path/to/payer.json",
|
|
115
|
+
"HODLODDS_MAX_PRICE_USDC": "0.01",
|
|
116
|
+
"HODLODDS_SESSION_BUDGET_USDC": "0.10"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Replace the recipient and file-path placeholders before starting. The example
|
|
122
|
+
uses real mainnet USDC. For Base payments, choose `base`, its recipient and an
|
|
123
|
+
EVM key file. Test networks require a test API that offers that network:
|
|
124
|
+
use `devnet` or `base-sepolia`, test USDC and the matching verified recipient.
|
|
125
|
+
These snippets are configuration templates; assistant applications were not
|
|
126
|
+
launched during offline package testing.
|
|
127
|
+
|
|
128
|
+
Restart the MCP process after changing its environment. Reconcile any uncertain
|
|
129
|
+
payment first: a restart also resets the session budget.
|
|
130
|
+
|
|
131
|
+
## Payment safety and reconciliation
|
|
132
|
+
|
|
133
|
+
Paid calls are serialized across tools. The SDK validates the offer's network,
|
|
134
|
+
asset, pinned recipient, query binding and amount before key access or signing.
|
|
135
|
+
The session budget checks that exact accepted amount, then reserves it before
|
|
136
|
+
the authorized request. A successful receipt retains the debit. Exhausting the
|
|
137
|
+
budget refuses the next payment before signing; free tools remain available.
|
|
138
|
+
|
|
139
|
+
A refusal marked `HodlOdds-Charged: no` is free only when the receipt does not
|
|
140
|
+
indicate success or a transaction. A conflicting or malformed receipt remains
|
|
141
|
+
uncertain. Confirmed free refusals refund the reservation, return an error and
|
|
142
|
+
leave payments enabled.
|
|
143
|
+
|
|
144
|
+
After an uncertain payment—such as a lost response, missing receipt or
|
|
145
|
+
conflicting receipt—**all further paid calls pause**. The reserved amount stays
|
|
146
|
+
spent until the operator reconciles it against finalized wallet history and
|
|
147
|
+
payment records. The result includes public reconciliation details. There is
|
|
148
|
+
no tool to clear the pause, no automatic retry or redemption, and no pending
|
|
149
|
+
authorization file is written. Restart only after reconciliation and choose a
|
|
150
|
+
new budget that accounts for prior spending.
|
|
151
|
+
|
|
152
|
+
The budget is local to one process and is not shared or persistent. **Every
|
|
153
|
+
restart resets it.** The paid request timeout is 90 seconds. Cancellation does
|
|
154
|
+
not abandon in-flight payment accounting. A settled answer with an unexpected
|
|
155
|
+
shape returns raw data with a warning instead of authorizing another payment.
|
|
156
|
+
Receipts report server settlement; they are not independent proof of finality.
|
|
157
|
+
|
|
158
|
+
## Meaning and freshness
|
|
159
|
+
|
|
160
|
+
0.04 means about 4 in 100 tokens like this one lose 90% or more of their price within the next 60 minutes. Higher means riskier, but a low number does not mean safe: smaller or slower drops are not counted, and the odds change minute by minute.
|
|
161
|
+
|
|
162
|
+
Scores are recomputed every 60 seconds, about 20 seconds after each minute closes, from completed one-minute bars up to `as_of`. Each score covers the 60 minutes after its `as_of` time and is valid only until the next update; the odds for the same token can rise sharply from one minute to the next. Scoring starts around :20; computation and publication can delay availability. For decisions, refresh immediately before acting and once per minute for continuous monitoring, checking `as_of` for a new minute. The API freshness cutoff is separate: by default, data becomes `stale` more than 120 seconds after `issued_at` or after `expires_at`. A new request does not restart the forecast window.
|
|
163
|
+
|
|
164
|
+
A crash is a completed one-minute close in SOL at least 90% below the reference
|
|
165
|
+
price within the displayed 60-minute window. `as_of` and `horizon_end` are UTC
|
|
166
|
+
Unix seconds. Confidence describes historical calibration and evidence; it is
|
|
167
|
+
not a token-specific interval or guarantee. Missing odds, missing confidence,
|
|
168
|
+
stale data and uncovered tokens are not safety signals. Very low odds say
|
|
169
|
+
“under 0.1%”, never a rounded zero.
|
|
170
|
+
|
|
171
|
+
Odds, not guarantees. Not financial advice.
|
|
172
|
+
|
|
173
|
+
## Development
|
|
174
|
+
|
|
175
|
+
From the public repository root, with the dependencies and pytest installed:
|
|
176
|
+
|
|
177
|
+
```sh
|
|
178
|
+
python -m pytest -q mcp/tests
|
|
179
|
+
python -m build mcp
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Tests use the installed public HodlOdds package, mocked HTTP and signing, and
|
|
183
|
+
an in-memory MCP session. Socket connections and DNS lookups are disabled.
|
|
184
|
+
They do not prove live settlement or desktop-client integration. The budget
|
|
185
|
+
adapter uses the SDK's watch accounting hook, so the dependency is bounded to
|
|
186
|
+
`hodlodds>=0.3.0,<0.4` and tested before upgrades.
|
|
187
|
+
|
|
188
|
+
`server.json` contains registry metadata for `com.hodlodds/hodlodds-mcp`.
|
|
189
|
+
Publishing to PyPI and publishing a registry listing are separate steps;
|
|
190
|
+
namespace ownership and registry acceptance must be verified by the publisher.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "hodlodds-mcp"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Local stdio MCP tools for HodlOdds crash odds with bounded USDC payments"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
dependencies = ["hodlodds>=0.3.0,<0.4", "mcp>=2.3,<3"]
|
|
13
|
+
|
|
14
|
+
[project.scripts]
|
|
15
|
+
hodlodds-mcp = "hodlodds_mcp.server:main"
|
|
16
|
+
|
|
17
|
+
[tool.setuptools.packages.find]
|
|
18
|
+
where = ["src"]
|
|
19
|
+
|
|
20
|
+
[tool.pytest.ini_options]
|
|
21
|
+
testpaths = ["tests"]
|