mpp32-mcp-server 1.3.1 → 1.4.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/CHANGELOG.md +50 -0
- package/README.md +22 -0
- package/dist/index.js +109 -1
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,56 @@ All notable changes to `mpp32-mcp-server` are documented here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the
|
|
5
5
|
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.4.0] - 2026-05-21
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* **`get_pivx_dao_intelligence` MCP tool — real-time PIVX DAO governance
|
|
12
|
+
intelligence.** Returns active budget proposals with masternode voting
|
|
13
|
+
tallies (Yes/No counts, net yes percentage), budget allocation status,
|
|
14
|
+
network health metrics, and deflation/fee burn analysis. PIVX is a fully
|
|
15
|
+
community-governed cryptocurrency where Masternode owners vote on budget
|
|
16
|
+
proposals every ~30 days (43,200 blocks per superblock cycle, 432,000 PIV
|
|
17
|
+
max monthly budget). Data is sourced live from pivx.org/proposals (HTML
|
|
18
|
+
scraping with structured `data-*` attributes) and the Chainz CryptoID
|
|
19
|
+
blockchain API. Cached for 5 minutes. Free — no payment key required.
|
|
20
|
+
|
|
21
|
+
Parameters:
|
|
22
|
+
- `filter` (optional, enum: `all` | `passing` | `failing`) — filter
|
|
23
|
+
proposals by voting status. Default: `all`.
|
|
24
|
+
- `includeStats` (optional, boolean) — include network stats and deflation
|
|
25
|
+
metrics. Default: `true`.
|
|
26
|
+
|
|
27
|
+
The response includes:
|
|
28
|
+
- **Network Overview:** masternode count, passing threshold (10% of
|
|
29
|
+
masternodes), monthly budget (PIV and USD), budget allocation percentage,
|
|
30
|
+
block height, total/circulating supply.
|
|
31
|
+
- **Deflation Metrics:** unallocated treasury PIV per cycle (never minted),
|
|
32
|
+
annual unallocated estimate, effective inflation reduction percentage,
|
|
33
|
+
proposal submission fee burn (50 PIV per proposal).
|
|
34
|
+
- **Active Proposals:** name, status (passing/failing), funded flag,
|
|
35
|
+
vote counts (yes/no), net yes percentage, monthly and total payment
|
|
36
|
+
amounts (PIV and USD), installments remaining, budget usage percentage,
|
|
37
|
+
and link to proposal details.
|
|
38
|
+
|
|
39
|
+
* **PIVX Governance Oracle catalog entry.** Listed as `curated:pivx-governance`
|
|
40
|
+
in the federated catalog (category: crypto, free, verified). Discoverable
|
|
41
|
+
via `list_mpp32_services` with `q=pivx` or `category=crypto`.
|
|
42
|
+
|
|
43
|
+
* **Backend `/api/governance` endpoints.** Three routes serve the PIVX data:
|
|
44
|
+
`GET /api/governance` (full governance data + deflation), `GET
|
|
45
|
+
/api/governance/proposals?status=passing|failing` (filtered proposals),
|
|
46
|
+
`GET /api/governance/stats` (network stats only). Rate limited to 30
|
|
47
|
+
req/min.
|
|
48
|
+
|
|
49
|
+
* **Frontend `/governance` page** at mpp32.org/governance. Live dashboard
|
|
50
|
+
with proposal cards, vote bars, budget stats, deflation metrics, and an
|
|
51
|
+
explainer on how PIVX governance works.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
|
|
55
|
+
* **`server.json` version bumped to 1.4.0** to match the npm release.
|
|
56
|
+
|
|
7
57
|
## [1.3.1] - 2026-05-15
|
|
8
58
|
|
|
9
59
|
### Fixed
|
package/README.md
CHANGED
|
@@ -33,6 +33,7 @@ MPP32 replaces all of that with one MCP server. Your agent asks for a service by
|
|
|
33
33
|
* Browse a live catalog of over 4,500 paid and free APIs across categories like token intelligence, market data, web search, image generation, embeddings, DeFi analytics, wallet scoring, on chain queries, and trading signals.
|
|
34
34
|
* Pay any provider in the catalog using whichever protocol fits, with settlement that lands in seconds.
|
|
35
35
|
* Run real time Solana token intelligence with alpha scoring, rug risk, whale flow, and 24 hour pump probability.
|
|
36
|
+
* Query live PIVX DAO governance data: active proposals, masternode voting tallies, budget allocation, and network deflation metrics — all free, no payment key needed.
|
|
36
37
|
* Track every call, every dollar settled, and every protocol used from a dashboard at mpp32.org.
|
|
37
38
|
* Get an automatic 20 percent or 40 percent discount on native services for holding M32 once your wallet is verified.
|
|
38
39
|
* Access M32-gated exclusive APIs: Whale Tracker (1M M32), Token Comparison (2.5M M32), and Portfolio Scanner (5M M32) — free for holders, unavailable to non-holders.
|
|
@@ -177,6 +178,27 @@ M32-gated full wallet portfolio scan. Discovers all SPL tokens in a wallet, runs
|
|
|
177
178
|
{ "wallet": "<wallet-to-scan>", "walletAddress": "<your-solana-wallet>" }
|
|
178
179
|
```
|
|
179
180
|
|
|
181
|
+
### `get_pivx_dao_intelligence`
|
|
182
|
+
|
|
183
|
+
Real-time PIVX DAO governance intelligence. Returns active budget proposals with masternode voting tallies, budget allocation status, network deflation metrics, and masternode network health. PIVX is a fully community-governed cryptocurrency where Masternode owners vote on budget proposals every ~30 days. Data sourced live from pivx.org/proposals and the PIVX blockchain. Free — no payment key required.
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{ "filter": "all" }
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{ "filter": "passing", "includeStats": true }
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Two parameters:
|
|
194
|
+
|
|
195
|
+
* **filter** (optional) — `all` (default), `passing`, or `failing`. Filters proposals by voting status.
|
|
196
|
+
* **includeStats** (optional, default true) — include network overview and deflation metrics alongside proposals.
|
|
197
|
+
|
|
198
|
+
The response includes a network overview (masternode count, passing threshold, monthly budget in PIV and USD, budget allocation percentage, block height, supply stats), deflation metrics (unallocated treasury PIV that are never minted, effective inflation reduction, proposal fee burn), and all active proposals with vote counts, payment amounts, installments, and links.
|
|
199
|
+
|
|
200
|
+
View the governance dashboard at [mpp32.org/governance](https://mpp32.org/governance).
|
|
201
|
+
|
|
180
202
|
### `manage_agent_budget`
|
|
181
203
|
|
|
182
204
|
View, set, or reset the economic circuit breaker for your agent session. Prevents runaway spending with infrastructure-level budget enforcement.
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { signX402Payment } from "./x402-signers.js";
|
|
6
|
-
const SERVER_VERSION = "1.
|
|
6
|
+
const SERVER_VERSION = "1.4.0";
|
|
7
7
|
// ── Env loading: trim and sanitize aggressively ─────────────────────────────
|
|
8
8
|
// Copy-paste from Claude Desktop / Cursor / Windsurf JSON config UIs frequently
|
|
9
9
|
// adds trailing \n, \r, NBSP, BOM, or wraps the value in literal quotes. Any
|
|
@@ -574,6 +574,114 @@ server.tool("scan_portfolio_m32", "M32-gated full wallet portfolio scan. Discove
|
|
|
574
574
|
return { content: [{ type: "text", text: `Error: ${err instanceof Error ? err.message : String(err)}` }] };
|
|
575
575
|
}
|
|
576
576
|
});
|
|
577
|
+
// ── Tool 7: get_pivx_dao_intelligence ─────────────────────────────────────
|
|
578
|
+
server.tool("get_pivx_dao_intelligence", "Get real-time PIVX DAO governance intelligence. Returns active budget proposals with masternode voting tallies (Yes/No/Abstain percentages), budget allocation status, network deflation metrics (unallocated treasury PIV that are never minted), and masternode network health. PIVX is a fully community-governed cryptocurrency where Masternode owners vote on budget proposals every ~30 days. Data sourced from pivx.org/proposals and the PIVX blockchain. Free — no payment required.", {
|
|
579
|
+
filter: z
|
|
580
|
+
.enum(["all", "passing", "failing"])
|
|
581
|
+
.default("all")
|
|
582
|
+
.optional()
|
|
583
|
+
.describe("Filter proposals by status: 'all' (default), 'passing' (funded proposals), or 'failing' (below threshold)."),
|
|
584
|
+
includeStats: z
|
|
585
|
+
.boolean()
|
|
586
|
+
.default(true)
|
|
587
|
+
.optional()
|
|
588
|
+
.describe("Include network stats and deflation metrics (default: true)."),
|
|
589
|
+
}, async ({ filter, includeStats }) => {
|
|
590
|
+
try {
|
|
591
|
+
const statusFilter = filter === "passing" || filter === "failing" ? `?status=${filter}` : "";
|
|
592
|
+
const endpoint = includeStats !== false ? "/api/governance" : `/api/governance/proposals${statusFilter}`;
|
|
593
|
+
const res = await fetchWithTimeout(`${API_URL}${endpoint}`, {
|
|
594
|
+
headers: buildHeaders(),
|
|
595
|
+
});
|
|
596
|
+
if (!res.ok) {
|
|
597
|
+
const err = await res.json().catch(() => null);
|
|
598
|
+
return {
|
|
599
|
+
content: [{
|
|
600
|
+
type: "text",
|
|
601
|
+
text: `Error fetching PIVX governance data: ${err?.error?.message ?? `HTTP ${res.status}`}`,
|
|
602
|
+
}],
|
|
603
|
+
};
|
|
604
|
+
}
|
|
605
|
+
const json = await res.json();
|
|
606
|
+
const data = json.data;
|
|
607
|
+
// Build readable output
|
|
608
|
+
const lines = [];
|
|
609
|
+
lines.push("# PIVX DAO Governance Intelligence");
|
|
610
|
+
lines.push("");
|
|
611
|
+
// Network stats
|
|
612
|
+
const network = data.network;
|
|
613
|
+
if (network) {
|
|
614
|
+
lines.push("## Network Overview");
|
|
615
|
+
lines.push(`- **Masternodes Online:** ${network.masternodeCount}`);
|
|
616
|
+
lines.push(`- **Passing Threshold:** ${network.passingThreshold} votes (10% of masternodes)`);
|
|
617
|
+
lines.push(`- **Monthly Budget:** ${Number(network.monthlyBudgetPiv).toLocaleString()} PIV (~$${Number(network.monthlyBudgetUsd).toLocaleString()})`);
|
|
618
|
+
lines.push(`- **Budget Allocated:** ${Number(network.budgetAllocatedPiv).toLocaleString()} PIV (${network.budgetAllocatedPercent}%)`);
|
|
619
|
+
if (network.blockHeight)
|
|
620
|
+
lines.push(`- **Block Height:** ${Number(network.blockHeight).toLocaleString()}`);
|
|
621
|
+
if (network.totalSupply)
|
|
622
|
+
lines.push(`- **Total Supply:** ${Math.round(Number(network.totalSupply)).toLocaleString()} PIV`);
|
|
623
|
+
lines.push("");
|
|
624
|
+
}
|
|
625
|
+
// Deflation stats
|
|
626
|
+
const deflation = data.deflation;
|
|
627
|
+
if (deflation) {
|
|
628
|
+
lines.push("## Deflation / Fee Burn Metrics");
|
|
629
|
+
lines.push(`- **Unallocated PIV This Cycle:** ${Number(deflation.unallocatedPivPerCycle).toLocaleString()} PIV (never minted)`);
|
|
630
|
+
lines.push(`- **Annual Unallocated (est.):** ${Number(deflation.annualUnallocatedPiv).toLocaleString()} PIV`);
|
|
631
|
+
lines.push(`- **Effective Inflation Reduction:** ${deflation.effectiveInflationReduction}`);
|
|
632
|
+
lines.push(`- **Proposal Submission Fee:** ${deflation.proposalFeeBurnPiv} PIV (burned/destroyed)`);
|
|
633
|
+
lines.push("");
|
|
634
|
+
}
|
|
635
|
+
// Proposals
|
|
636
|
+
let proposals = (data.proposals ?? []);
|
|
637
|
+
if (filter === "passing")
|
|
638
|
+
proposals = proposals.filter((p) => p.status === "passing");
|
|
639
|
+
else if (filter === "failing")
|
|
640
|
+
proposals = proposals.filter((p) => p.status === "failing");
|
|
641
|
+
if (proposals.length > 0) {
|
|
642
|
+
lines.push(`## Active Proposals (${proposals.length})`);
|
|
643
|
+
lines.push("");
|
|
644
|
+
for (const p of proposals) {
|
|
645
|
+
const status = p.status === "passing" ? "PASSING" : "FAILING";
|
|
646
|
+
const fundedTag = p.funded ? " (Funded)" : "";
|
|
647
|
+
lines.push(`### ${p.name} — ${status}${fundedTag}`);
|
|
648
|
+
lines.push(`- **Votes:** ${p.yesVotes} Yes / ${p.noVotes} No (${p.netYesPercent}% net yes)`);
|
|
649
|
+
lines.push(`- **Monthly Payment:** ${Number(p.monthlyPaymentPiv).toLocaleString()} PIV (~$${Number(p.monthlyPaymentUsd).toLocaleString()})`);
|
|
650
|
+
if (Number(p.totalPaymentPiv) > Number(p.monthlyPaymentPiv)) {
|
|
651
|
+
lines.push(`- **Total Budget:** ${Number(p.totalPaymentPiv).toLocaleString()} PIV`);
|
|
652
|
+
}
|
|
653
|
+
if (Number(p.installmentsRemaining) > 0) {
|
|
654
|
+
lines.push(`- **Installments Remaining:** ${p.installmentsRemaining}`);
|
|
655
|
+
}
|
|
656
|
+
if (p.budgetPercent)
|
|
657
|
+
lines.push(`- **Budget Usage:** ${p.budgetPercent}%`);
|
|
658
|
+
if (p.url)
|
|
659
|
+
lines.push(`- **Details:** ${p.url}`);
|
|
660
|
+
lines.push("");
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
lines.push("No proposals found matching the filter.");
|
|
665
|
+
}
|
|
666
|
+
// Meta
|
|
667
|
+
const meta = data.meta;
|
|
668
|
+
if (meta) {
|
|
669
|
+
lines.push("---");
|
|
670
|
+
lines.push(`Source: ${meta.source} | ${meta.timestamp}${meta.cacheHit ? " (cached)" : ""}`);
|
|
671
|
+
}
|
|
672
|
+
return {
|
|
673
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
674
|
+
};
|
|
675
|
+
}
|
|
676
|
+
catch (err) {
|
|
677
|
+
return {
|
|
678
|
+
content: [{
|
|
679
|
+
type: "text",
|
|
680
|
+
text: `Failed to fetch PIVX governance data: ${err instanceof Error ? err.message : String(err)}`,
|
|
681
|
+
}],
|
|
682
|
+
};
|
|
683
|
+
}
|
|
684
|
+
});
|
|
577
685
|
// ── Tool 8: manage_agent_budget ────────────────────────────────────────────
|
|
578
686
|
server.tool("manage_agent_budget", "View, set, or reset the spending circuit breaker for your MPP32 agent session. Use 'get' to check current budget status (remaining budget, hourly velocity, circuit breaker state). Use 'set' to configure spending limits (budget cap in USD, hourly velocity limit, alert threshold percentage). Use 'reset' to manually reset a tripped circuit breaker so the session can resume spending. Circuit breakers trip automatically when budget or velocity limits are exceeded, preventing runaway agent spending.", {
|
|
579
687
|
action: z.enum(["get", "set", "reset"]).describe("Action: 'get' = view budget status, 'set' = update limits, 'reset' = clear tripped circuit breaker"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mpp32-mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"mcpName": "io.github.MPP32/mpp32-mcp-server",
|
|
5
5
|
"description": "Payment layer for AI agents. One MCP, five protocols, thousands of paid APIs your agent can call.",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,10 @@
|
|
|
52
52
|
"crypto",
|
|
53
53
|
"defi",
|
|
54
54
|
"token-intelligence",
|
|
55
|
-
"api-marketplace"
|
|
55
|
+
"api-marketplace",
|
|
56
|
+
"pivx",
|
|
57
|
+
"governance",
|
|
58
|
+
"dao"
|
|
56
59
|
],
|
|
57
60
|
"license": "MIT",
|
|
58
61
|
"author": "MPP32 <admin@mpp32.org> (https://mpp32.org)",
|