@wickedlabs/wicked-mcp 0.7.4 → 0.7.5
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/README.md +2 -1
- package/dist/http.js +3 -1
- package/dist/observability.js +9 -2
- package/dist/server.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
# WickedAPI MCP Server
|
|
2
2
|
|
|
3
|
+
[](https://glama.ai/mcp/servers/WickedAPI/wicked-mcp)
|
|
3
4
|
[](https://smithery.ai/servers/wickedapi/wicked-mcp)
|
|
4
5
|
|
|
5
6
|
MCP server for the whole [Wicked](https://wickedapi.com) suite — trading data, DeFi protocol health, token safety, brokerage sync, agent identity, reputation, a tool-reliability registry, hallucination checks, persistent agent memory, and x402 paywalls, in one server.
|
|
@@ -27,7 +28,7 @@ These tools never sign anything or hold a key. Agents with no wallet can still t
|
|
|
27
28
|
|
|
28
29
|
## Remote endpoint (no install)
|
|
29
30
|
|
|
30
|
-
Also listed on [
|
|
31
|
+
Also listed on [Glama](https://glama.ai/mcp/servers/WickedAPI/wicked-mcp), the official MCP Registry (`io.github.WickedAPI/wicked-mcp`) and [Smithery](https://smithery.ai/servers/wickedapi/wicked-mcp).
|
|
31
32
|
|
|
32
33
|
The same 107 tools are served over streamable HTTP at **`https://mcp.wickedapi.com/mcp`** (stateless, rate-limited per IP; the public deployment carries no personal keys, so paid calls return the x402 challenge). Point any streamable-HTTP MCP client at it. To self-host, build the `Dockerfile` and run it with `node dist/http.js` (the image defaults to the stdio entry point), or `npm run build && npm run start:http`; see `.env.example` for `RATE_LIMIT_PER_MINUTE`, `ALLOWED_HOSTS` and `TRUSTED_CLIENT_IP_HEADER`.
|
|
33
34
|
|
package/dist/http.js
CHANGED
|
@@ -14,7 +14,7 @@ import { landingHtml, llmsTxt, serverCard } from "./landing.js";
|
|
|
14
14
|
import { knownTools, usageHooks, usageSnapshot } from "./usage.js";
|
|
15
15
|
import { buildServer, loadWorld, SERVER_VERSION } from "./server.js";
|
|
16
16
|
import { configuredKeys } from "./suite.js";
|
|
17
|
-
import { captureServerError, flushSentry, initSentry } from "./observability.js";
|
|
17
|
+
import { captureServerError, flushSentry, initSentry, isClientAbort } from "./observability.js";
|
|
18
18
|
initSentry(SERVER_VERSION);
|
|
19
19
|
const PORT = Number(process.env.PORT || 8080);
|
|
20
20
|
const RATE_LIMIT_PER_MINUTE = Number(process.env.RATE_LIMIT_PER_MINUTE || 30);
|
|
@@ -97,6 +97,8 @@ async function main() {
|
|
|
97
97
|
await withClient(clientKey(req), () => transport.handleRequest(req, res, body));
|
|
98
98
|
}
|
|
99
99
|
catch (err) {
|
|
100
|
+
if (isClientAbort(err))
|
|
101
|
+
return; // the caller hung up mid-request: nothing to report or answer
|
|
100
102
|
const status = err.status ?? 500;
|
|
101
103
|
// Only server faults: 4xx here are client mistakes (bad JSON, oversized body).
|
|
102
104
|
if (status >= 500)
|
package/dist/observability.js
CHANGED
|
@@ -14,6 +14,12 @@ const SENSITIVE_HEADERS = new Set([
|
|
|
14
14
|
"x-payment",
|
|
15
15
|
"payment-signature",
|
|
16
16
|
]);
|
|
17
|
+
/** A client that hangs up mid-request makes Node throw "aborted" (or ECONNRESET) while the body is read.
|
|
18
|
+
* That is a normal network event, not a server fault, so it is never reported. */
|
|
19
|
+
export function isClientAbort(err) {
|
|
20
|
+
const e = err;
|
|
21
|
+
return e?.message === "aborted" || e?.code === "ECONNRESET" || e?.code === "ERR_STREAM_PREMATURE_CLOSE";
|
|
22
|
+
}
|
|
17
23
|
export function scrubEvent(event) {
|
|
18
24
|
const req = event.request;
|
|
19
25
|
if (req) {
|
|
@@ -36,7 +42,7 @@ export function initSentry(version) {
|
|
|
36
42
|
Sentry.init({
|
|
37
43
|
dsn,
|
|
38
44
|
environment: process.env.SENTRY_ENVIRONMENT || "production",
|
|
39
|
-
release: `
|
|
45
|
+
release: `wicked-mcp@${version}`,
|
|
40
46
|
tracesSampleRate: 0,
|
|
41
47
|
// v11 collects headers, bodies, query strings and stack-frame variables by
|
|
42
48
|
// default. Turn everything off; beforeSend below is defense in depth.
|
|
@@ -50,7 +56,8 @@ export function initSentry(version) {
|
|
|
50
56
|
databaseQueryData: false,
|
|
51
57
|
queues: false,
|
|
52
58
|
},
|
|
53
|
-
|
|
59
|
+
// Backstop: drop client disconnects that surface through Sentry's own instrumentation, then scrub.
|
|
60
|
+
beforeSend: (event, hint) => (isClientAbort(hint?.originalException) ? null : scrubEvent(event)),
|
|
54
61
|
});
|
|
55
62
|
return true;
|
|
56
63
|
}
|
package/dist/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wickedlabs/wicked-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.5",
|
|
4
4
|
"description": "MCP server for the whole Wicked suite — trading data, DeFi protocol health, token safety, SEC filings alerts, wallet and sanctions checks, brokerage sync, agent identity, reputation, tool registry, hallucination checks, persistent memory, and x402 paywalls. 100+ tools, 6 resources, 3 prompts. No signup required: pay per call in USDC via x402, or use a partner API key.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|