mpp32-mcp-server 1.1.3 → 1.1.4
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 +17 -0
- package/dist/index.js +65 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,23 @@ 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.1.4] - 2026-05-11
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
* **`get_mpp32_diagnostics` MCP tool.** Reports server version, API URL,
|
|
12
|
+
and per-variable detection state for `MPP32_AGENT_KEY`,
|
|
13
|
+
`MPP32_SOLANA_PRIVATE_KEY`, and `MPP32_PRIVATE_KEY` — without ever
|
|
14
|
+
echoing the secret. The single most common payment failure has been
|
|
15
|
+
"I set the key but the MCP server doesn't see it" (wrong
|
|
16
|
+
`claude_desktop_config.json` file, `env` block at the wrong level in
|
|
17
|
+
the JSON, typo, or stale process from an incomplete restart). This
|
|
18
|
+
tool turns that into a one-call diagnosis.
|
|
19
|
+
* **Per-variable startup banner lines.** The stderr banner now prints
|
|
20
|
+
one `[mpp32] MPP32_X: SET (fingerprint) / NOT SET` line per managed
|
|
21
|
+
env var, so users who can find their MCP log file can see the same
|
|
22
|
+
diagnosis without calling a tool.
|
|
23
|
+
|
|
7
24
|
## [1.1.3] - 2026-05-11
|
|
8
25
|
|
|
9
26
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
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
|
-
const SERVER_VERSION = "1.1.
|
|
5
|
+
const SERVER_VERSION = "1.1.4";
|
|
6
6
|
// ── Env loading: trim and sanitize aggressively ─────────────────────────────
|
|
7
7
|
// Copy-paste from Claude Desktop / Cursor / Windsurf JSON config UIs frequently
|
|
8
8
|
// adds trailing \n, \r, NBSP, BOM, or wraps the value in literal quotes. Any
|
|
@@ -173,6 +173,63 @@ function isHttpCallable(svc) {
|
|
|
173
173
|
return false;
|
|
174
174
|
return /^https?:\/\//.test(url);
|
|
175
175
|
}
|
|
176
|
+
// ── Tool 0: get_mpp32_diagnostics ───────────────────────────────────────────
|
|
177
|
+
// Lets the user (and Claude) see exactly what the MCP process detected at
|
|
178
|
+
// startup. The single most common failure mode is "I set the env var but it
|
|
179
|
+
// didn't reach the server" — wrong claude_desktop_config.json file edited,
|
|
180
|
+
// `env` block at the wrong level, typo in the variable name, stale process
|
|
181
|
+
// from an incomplete restart. This tool answers all of those without
|
|
182
|
+
// asking the user to dig through MCP log files.
|
|
183
|
+
function describeEnvVarStatus(name, value) {
|
|
184
|
+
const raw = process.env[name];
|
|
185
|
+
if (raw === undefined)
|
|
186
|
+
return `${name}: NOT SET (variable absent from MCP process env)`;
|
|
187
|
+
if (raw.length === 0)
|
|
188
|
+
return `${name}: EMPTY (set but blank)`;
|
|
189
|
+
if (value === undefined) {
|
|
190
|
+
return `${name}: REJECTED (raw length ${raw.length}, but failed validation — check startup log for reason)`;
|
|
191
|
+
}
|
|
192
|
+
// Show a short, non-secret fingerprint so the user can confirm it's the
|
|
193
|
+
// right value without us exfiltrating the key.
|
|
194
|
+
const fingerprint = value.length <= 12
|
|
195
|
+
? `${value.length} chars`
|
|
196
|
+
: `${value.slice(0, 6)}…${value.slice(-4)} (${value.length} chars)`;
|
|
197
|
+
return `${name}: SET (${fingerprint})`;
|
|
198
|
+
}
|
|
199
|
+
server.tool("get_mpp32_diagnostics", "Report what the mpp32-mcp-server detected at startup: version, API URL, and which env vars (MPP32_AGENT_KEY, MPP32_SOLANA_PRIVATE_KEY, MPP32_PRIVATE_KEY) were loaded into this process. Use this FIRST if payments fail with 'no key configured' even though you set one in claude_desktop_config.json — it confirms whether your env vars actually reached the MCP process or got dropped by a typo / wrong file / stale restart.", {}, async () => {
|
|
200
|
+
const lines = [
|
|
201
|
+
`**mpp32-mcp-server diagnostics**`,
|
|
202
|
+
``,
|
|
203
|
+
`Version: ${SERVER_VERSION}`,
|
|
204
|
+
`API URL: ${API_URL}`,
|
|
205
|
+
`Timeout: ${TIMEOUT_MS}ms`,
|
|
206
|
+
`Node: ${process.version} on ${process.platform}/${process.arch}`,
|
|
207
|
+
``,
|
|
208
|
+
`**Environment variable detection** (values are fingerprinted, never returned in full):`,
|
|
209
|
+
``,
|
|
210
|
+
describeEnvVarStatus("MPP32_AGENT_KEY", AGENT_KEY),
|
|
211
|
+
describeEnvVarStatus("MPP32_SOLANA_PRIVATE_KEY", SOLANA_PRIVATE_KEY),
|
|
212
|
+
describeEnvVarStatus("MPP32_PRIVATE_KEY", PRIVATE_KEY),
|
|
213
|
+
``,
|
|
214
|
+
`**Capabilities:**`,
|
|
215
|
+
`- Catalog browsing: yes (always available)`,
|
|
216
|
+
`- Federated service execution: ${AGENT_KEY ? "yes" : "no — set MPP32_AGENT_KEY"}`,
|
|
217
|
+
`- x402 (USDC on Solana) payment: ${SOLANA_PRIVATE_KEY ? "yes" : "no — set MPP32_SOLANA_PRIVATE_KEY"}`,
|
|
218
|
+
`- Tempo (pathUSD on Eth L2) payment: ${PRIVATE_KEY ? "yes" : "no — set MPP32_PRIVATE_KEY"}`,
|
|
219
|
+
``,
|
|
220
|
+
`If a variable shows NOT SET but you put it in claude_desktop_config.json:`,
|
|
221
|
+
`1. Confirm the file path Claude Desktop actually reads from:`,
|
|
222
|
+
` - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json`,
|
|
223
|
+
` - Windows: %APPDATA%\\Claude\\claude_desktop_config.json`,
|
|
224
|
+
`2. The 'env' block must sit INSIDE the server entry, alongside 'command' and 'args' — not at the top level.`,
|
|
225
|
+
`3. Fully quit Claude Desktop (Cmd+Q on Mac, right-click tray → Quit on Windows). Closing the window is not enough.`,
|
|
226
|
+
`4. Re-open Claude Desktop. The new MCP process inherits the env from the JSON.`,
|
|
227
|
+
`5. Call get_mpp32_diagnostics again — if it still shows NOT SET, the JSON did not load (check for a syntax error).`,
|
|
228
|
+
];
|
|
229
|
+
return {
|
|
230
|
+
content: [{ type: "text", text: lines.join("\n") }],
|
|
231
|
+
};
|
|
232
|
+
});
|
|
176
233
|
// ── Tool 1: list_mpp32_services ─────────────────────────────────────────────
|
|
177
234
|
server.tool("list_mpp32_services", "Browse the MPP32 federated catalog of 4,500+ machine-payable APIs and data services. Includes native MPP32 services (callable end-to-end through this MCP), the x402 Bazaar (USDC on Solana), curated free APIs (DexScreener, Jupiter, CoinGecko health, httpbin, etc.), and the public MCP Registry (npx-installable servers; listing-only). Each result indicates whether it is callable through `call_mpp32_endpoint` or listing-only. The catalog is large (~4,500 entries) — by default a single call returns up to 100 results and the response will tell you the true total and whether the page was truncated. Use `q` (free-text search), `category`, `source`, or `protocol` to narrow down, or raise `limit` (max 500) for broader pages.", {
|
|
178
235
|
category: z
|
|
@@ -1065,6 +1122,13 @@ async function main() {
|
|
|
1065
1122
|
.filter(Boolean)
|
|
1066
1123
|
.join(", ") || "no keys (catalog-only legacy mode)";
|
|
1067
1124
|
console.error(`[mpp32] MCP server v${SERVER_VERSION} on stdio. API ${API_URL}. Configured: ${features}. Timeout ${TIMEOUT_MS}ms.`);
|
|
1125
|
+
// Per-variable status so a user staring at this log can immediately see
|
|
1126
|
+
// whether their env vars made it through. Values are fingerprinted.
|
|
1127
|
+
const fp = (v) => !v ? "NOT SET" : v.length <= 12 ? `SET (${v.length}c)` : `SET (${v.slice(0, 6)}…${v.slice(-4)}, ${v.length}c)`;
|
|
1128
|
+
console.error(`[mpp32] MPP32_AGENT_KEY: ${fp(AGENT_KEY)}`);
|
|
1129
|
+
console.error(`[mpp32] MPP32_SOLANA_PRIVATE_KEY: ${fp(SOLANA_PRIVATE_KEY)}`);
|
|
1130
|
+
console.error(`[mpp32] MPP32_PRIVATE_KEY: ${fp(PRIVATE_KEY)}`);
|
|
1131
|
+
console.error(`[mpp32] If a key shows NOT SET but you set it in claude_desktop_config.json, call the get_mpp32_diagnostics tool for help, or fully quit Claude Desktop and reopen.`);
|
|
1068
1132
|
}
|
|
1069
1133
|
main().catch((err) => {
|
|
1070
1134
|
console.error("Fatal:", err);
|
package/package.json
CHANGED