@pipeworx/mcp-pulse-verity 0.1.0

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,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mojibake Inc.
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.
package/README.md ADDED
@@ -0,0 +1,246 @@
1
+ # @pipeworx/pulse-verity
2
+
3
+ Crypto index prices that come with a **proof**. Every observation from the Pulse
4
+ Verity Index is signed with ECDSA P-256, so an agent that acted on a price can
5
+ later demonstrate exactly which price it acted on — and that demonstration holds
6
+ with the agent, the gateway and Pulse all offline.
7
+
8
+ Part of [Pipeworx](https://pipeworx.io) — an MCP gateway connecting AI agents to 1679+ live data sources.
9
+
10
+ This is the first source in the catalogue that hands back something checkable.
11
+ Every other price feed here gives you a number you must take on trust.
12
+
13
+ ## Tools
14
+
15
+ - `pulse_signed_price(symbol)` — current signed print for one asset.
16
+ - `pulse_signed_batch(symbols[])` — up to 100 assets in one call, each row
17
+ individually signed. Symbols Pulse does not serve are named in `not_served`
18
+ rather than silently dropped.
19
+ - `pulse_settlement_print(symbol, at)` — the signed print Pulse **recorded**
20
+ nearest a past moment, plus `delta_ms`. For settling contracts and
21
+ reconstructing a price at a timestamp.
22
+ - `pulse_verify_print(print)` — check a print. Returns `valid: true|false`.
23
+ - `pulse_asset_catalog(limit?, offset?, band?, status?)` — coverage and measured
24
+ cadence across 6,700+ observed assets. **Unsigned** (see below).
25
+ - `pulse_key_ring()` — the public keys, algorithm and canonical format. Keyless.
26
+
27
+ ## Auth
28
+
29
+ A **platform key** is wired (`PLATFORM_PULSE_KEY`), so callers need no key of
30
+ their own. `_apiKey` is still accepted for anyone bringing theirs.
31
+
32
+ **The key lives in the encrypted `platform_keys` KEYSTORE, not in a Cloudflare
33
+ secret binding** — `scripts/pwcall.sh platform-key-put PLATFORM_PULSE_KEY < file`
34
+ (fleet #2007, `docs/platform-key-store-plan.md`). Do **not** reach for
35
+ `wrangler secret put` for a new key here: the gateway sits one binding under
36
+ Cloudflare's 250-text-binding ceiling, and a `check-gateway-bindings` gate
37
+ blocks the deploy for EVERY lane the moment the secret count rises above its
38
+ committed baseline. This pack was built that way by mistake first and reddened
39
+ the gateway deploy until the key was moved into the keystore and the individual
40
+ binding deleted; `scripts/pwcall.sh platform-key-status` should show
41
+ `binding_underneath: false` for it.
42
+
43
+ Free and self-serve at <https://thepulse.markets/developers>: 60 requests a
44
+ minute, 25,000 a month, no card. `pulse_verify_print` and `pulse_key_ring` need
45
+ no key at all. The keyless `/sample` endpoint upstream covers only BTC/ETH/SOL;
46
+ everything wider needs the key.
47
+
48
+ ## How verification works, and what "local" means
49
+
50
+ Canonical string, signed with ECDSA P-256 / SHA-256, signature as IEEE-P1363
51
+ `r||s` in base64:
52
+
53
+ ```
54
+ pulse-index-v1\n{symbol}\n{priceText}\n{at}\n{grade}
55
+ ```
56
+
57
+ `pulse_verify_print` recomputes this in the worker. **Pulse is never asked
58
+ whether a print is valid**, so Pulse cannot vouch for a print it did not sign,
59
+ and an offline or compromised source cannot turn an invalid print into a valid
60
+ one. What is *not* local is key distribution: a `kid` we have not seen before
61
+ costs one fetch of the public ring, which is then cached. Every response says
62
+ which happened in `key_source`, because "verified locally" is a security claim
63
+ and should not be made vaguely.
64
+
65
+ Verified live 2026-09-16, independently of Pulse's own code, with tamper
66
+ controls — a verifier that only ever returns `true` proves nothing:
67
+
68
+ | input | `valid` |
69
+ |---|---|
70
+ | the print as returned | **true** |
71
+ | price + 1 | false |
72
+ | grade changed | false |
73
+ | `at` shifted by 1 ms | false |
74
+ | symbol swapped | false |
75
+ | `kid` not in the ring | throws, and says treat the print as UNVERIFIED, not invalid |
76
+
77
+ ### The `priceText` trap
78
+
79
+ The canonical string uses `priceText` — the price **exactly as it came off the
80
+ wire** — never a reparsed float. On the sample used while building this,
81
+ `String(price)` happened to equal `priceText`, so a float-reparsing verifier
82
+ verified correctly and looked right. It breaks the first time JS number
83
+ formatting diverges from the wire text: a trailing zero, exponent form, or more
84
+ than 17 significant digits. A verifier that is correct only until the price has
85
+ a trailing zero is worse than none, because it will be trusted.
86
+
87
+ This pack prefers `priceText` and falls back to `String(price)` only when
88
+ `priceText` is absent — Pulse's own documented fallback — and says so in
89
+ `price_field_used`, with a warning when the fallback is used.
90
+
91
+ ## Grades are load-bearing
92
+
93
+ | grade | venues | settleable |
94
+ |---|---|---|
95
+ | `consensus` | 3 or more independent | yes |
96
+ | `blended` | 2 | yes |
97
+ | `indicative` | 1 exact-mapped | **no** |
98
+
99
+ Pulse publishes `indicative` so a thin asset reads as thin instead of
100
+ confidently wrong. That is only honest downstream if we carry it through, so
101
+ every print this pack returns also carries a derived `settleable` boolean and a
102
+ `grade_note` spelling out the consequence — an agent reading a bare `price`
103
+ field will not infer that `indicative` disqualifies it. An unrecognised grade is
104
+ treated as **not** settleable.
105
+
106
+ ## What is signed and what is not
107
+
108
+ Prints (`pulse_signed_price`, `pulse_signed_batch`, `pulse_settlement_print`)
109
+ are signed. The **asset catalogue is not**: its rows carry prices and coverage
110
+ metadata with no signature. `pulse_asset_catalog` therefore returns
111
+ `signed: false` and says so, because serving an unsigned price from a pack whose
112
+ whole pitch is signatures is the confusion most worth pre-empting.
113
+
114
+ ## Gotchas
115
+
116
+ - `pulse_settlement_print` returns the **nearest recorded** print, not a price
117
+ synthesised at your instant. Check `delta_ms` against a tolerance you state.
118
+ - Batch returns *fewer* rows than requested for unserved symbols, absent rather
119
+ than errored. An unlisted symbol is not a price of zero — read `not_served`.
120
+ - Upstream signals refusals in-band with `success: false` and a `code`; this
121
+ pack raises those rather than returning a body that looks like data.
122
+ - `/price` with the wrong parameter name (`symbols=` instead of `symbol=`)
123
+ returns `UNSUPPORTED_SYMBOL` complaining about `'?'`. It is an upstream
124
+ quirk, not a coverage answer.
125
+
126
+ ## Data sources
127
+
128
+ - <https://thepulse.markets/developers> — key signup and docs
129
+ - `https://mcp.thepulse.markets/api/index/v1/price` — signed print
130
+ - `https://mcp.thepulse.markets/api/index/v1/batch` — up to 100 symbols
131
+ - `https://mcp.thepulse.markets/api/index/v1/print` — recorded print near a time
132
+ - `https://mcp.thepulse.markets/api/index/v1/verity/catalog` — coverage, unsigned
133
+ - `https://mcp.thepulse.markets/api/index/v1/pubkey` — public key ring, keyless
134
+ - `https://mcp.thepulse.markets/api/index/v1/symbols` — 5,500+ served tickers
135
+
136
+ Pulse also publishes its own MCP server (`pulse-verity` on npm,
137
+ `io.github.PulseBet/pulse-verity` in the official registry). This pack is a
138
+ separate adapter so the failure shapes, grade handling and naming match the rest
139
+ of the Pipeworx catalogue.
140
+
141
+ Relationship opened by Bruce with Justin (founder) by e-mail, 2026-09-15/16.
142
+ Built as fleet #2173.
143
+
144
+ ## Quick Start
145
+
146
+ Add to your MCP client (Claude Desktop, Cursor, Windsurf, etc.):
147
+
148
+ ```json
149
+ {
150
+ "mcpServers": {
151
+ "pulse-verity": {
152
+ "url": "https://gateway.pipeworx.io/pulse-verity/mcp"
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ ### What this endpoint actually serves
159
+
160
+ `tools/list` at `https://gateway.pipeworx.io/pulse-verity/mcp` returns the tools in the table
161
+ above **plus the shared Pipeworx meta-tools** — `ask_pipeworx`,
162
+ `discover_tools`, `search_within`, `remember`/`recall` and the rest of the
163
+ gateway-wide set. So the tool count you see is larger than this table: a
164
+ single-pack endpoint currently lists roughly 30 shared tools alongside the
165
+ pack's own. The connection's `initialize` response states its exact scope, and
166
+ is the authoritative answer for a given day.
167
+
168
+ This is deliberate, not multiplexing by accident. The meta-tools are what let a
169
+ scoped connection answer a question this pack does not cover — via
170
+ `ask_pipeworx`, which routes across the whole catalog — without you adding a
171
+ second MCP server. There is currently no way to mount a pack endpoint without
172
+ them; if the extra schemas cost you more context than the routing is worth,
173
+ connect to the full gateway once rather than to several pack endpoints.
174
+
175
+ Or connect to the full Pipeworx gateway to get every pack's tools listed
176
+ directly, instead of just this one's:
177
+
178
+ ```json
179
+ {
180
+ "mcpServers": {
181
+ "pipeworx": {
182
+ "url": "https://gateway.pipeworx.io/mcp"
183
+ }
184
+ }
185
+ }
186
+ ```
187
+
188
+ Both URLs reach the same gateway and the same 1679+ data sources. The
189
+ only difference is which pack's tools are listed **directly**; `ask_pipeworx`
190
+ reaches all of them from either one.
191
+
192
+ ## No MCP client? Call it over HTTP
193
+
194
+ ```bash
195
+ curl -X POST https://gateway.pipeworx.io/v1/tools/pulse_signed_price \
196
+ -H 'Content-Type: application/json' \
197
+ -d '{"symbol":"BTC"}'
198
+ ```
199
+
200
+ No account needed for the first calls. Inspect any tool: `GET https://gateway.pipeworx.io/v1/tools/pulse_signed_price`. Find one: `POST https://gateway.pipeworx.io/v1/tools/search_packs` with `{"query":"..."}`.
201
+
202
+ ## Standalone (no gateway account)
203
+
204
+ This package also runs as a local stdio MCP server — no Pipeworx account, no
205
+ gateway round-trip:
206
+
207
+ ```json
208
+ {
209
+ "mcpServers": {
210
+ "pulse-verity": {
211
+ "command": "npx",
212
+ "args": ["-y", "@pipeworx/mcp-pulse-verity"]
213
+ }
214
+ }
215
+ }
216
+ ```
217
+
218
+ Or run it directly to confirm it starts:
219
+
220
+ ```bash
221
+ npx -y @pipeworx/mcp-pulse-verity
222
+ ```
223
+
224
+ It speaks MCP over stdin/stdout and answers `initialize`/`tools/list`/`tools/call`
225
+ for **only** this pack's tools — none of the shared meta-tools the gateway
226
+ connection above adds. Same source, same tools, no ask_pipeworx routing.
227
+
228
+ ## Using with ask_pipeworx
229
+
230
+ Instead of calling tools directly, you can ask questions in plain English —
231
+ this works on the pack endpoint above as well as on the full gateway:
232
+
233
+ ```
234
+ ask_pipeworx({ question: "your question about Pulse Verity data" })
235
+ ```
236
+
237
+ The gateway picks the right tool and fills the arguments automatically.
238
+
239
+ ## More
240
+
241
+ - [Docs and guides](https://pipeworx.io/docs)
242
+ - [pipeworx.io](https://pipeworx.io)
243
+
244
+ ## License
245
+
246
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ //
3
+ // Entry point for `npx @pipeworx/mcp-<slug>`.
4
+ //
5
+ // Packs ship as raw TypeScript (no build step — see publish-pack.sh for why:
6
+ // tsx sidesteps every extensionless-import / bare-JSON-import edge case a
7
+ // per-pack tsc build would have to solve one pack at a time). This file
8
+ // registers tsx's ESM loader programmatically, then hands off to src/server.ts,
9
+ // which wraps the pack's {tools, callTool} export in a stdio MCP server.
10
+ //
11
+ // Copied verbatim into every published pack repo by scripts/publish-pack.sh —
12
+ // edit this file, not a per-pack copy.
13
+ import { register } from 'tsx/esm/api';
14
+
15
+ register();
16
+
17
+ await import('../src/server.ts');
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@pipeworx/mcp-pulse-verity",
3
+ "version": "0.1.0",
4
+ "description": "Pulse Verity — crypto index prices that come with a PROOF.",
5
+ "type": "module",
6
+ "main": "src/index.ts",
7
+ "types": "src/index.ts",
8
+ "bin": {
9
+ "mcp-pulse-verity": "bin/cli.js"
10
+ },
11
+ "keywords": ["mcp", "mcp-server", "model-context-protocol", "pipeworx", "pulse-verity"],
12
+ "license": "MIT",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/pipeworx-io/mcp-pulse-verity.git"
16
+ },
17
+ "scripts": {
18
+ "typecheck": "tsc --noEmit"
19
+ },
20
+ "dependencies": {
21
+ "@modelcontextprotocol/sdk": "^1.30.0",
22
+ "tsx": "^4.19.0"
23
+ },
24
+ "devDependencies": {
25
+ "typescript": "^5.9.3",
26
+ "@cloudflare/workers-types": "^4.20260405.1"
27
+ },
28
+ "pipeworx": {
29
+ "sourceHash": "v1-af80ead2a944c6a1a6d8cad53de771990cbf4787c8889dc8807568079dcda8f0",
30
+ "sourceCommit": "b0fb3c31386cf0256dcf1e2f1b3440435a87ec35"
31
+ }
32
+ }
package/server.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
+ "name": "io.github.pipeworx-io/pulse-verity",
4
+ "title": "Pulse Verity",
5
+ "description": "Pulse Verity — crypto index prices that come with a PROOF.",
6
+ "version": "0.1.0",
7
+ "websiteUrl": "https://pipeworx.io/packs/pulse-verity",
8
+ "repository": {
9
+ "url": "https://github.com/pipeworx-io/mcp-pulse-verity",
10
+ "source": "github"
11
+ },
12
+ "remotes": [
13
+ {
14
+ "type": "streamable-http",
15
+ "url": "https://gateway.pipeworx.io/pulse-verity/mcp"
16
+ }
17
+ ]
18
+ }