myclaw-toolkit 1.0.2 → 1.0.7

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.
Files changed (3) hide show
  1. package/README.md +20 -1
  2. package/dist/index.js +41 -5
  3. package/package.json +4 -3
package/README.md CHANGED
@@ -1,6 +1,11 @@
1
1
  # MyClaw Toolkit — MCP Server
2
2
 
3
- **23-in-1 developer utility toolkit as an MCP server.** Search the web, convert currencies, check crypto prices, generate QR codes, format JSON, and more — all from any MCP-compatible AI assistant.
3
+ [![Glama](https://glama.ai/mcp/servers/Dusheh/myclaw-toolkit/badge)](https://glama.ai/mcp/servers/Dusheh/myclaw-toolkit)
4
+ [![npm](https://img.shields.io/npm/v/myclaw-toolkit)](https://www.npmjs.com/package/myclaw-toolkit)
5
+ [![npm downloads](https://img.shields.io/npm/dw/myclaw-toolkit)](https://www.npmjs.com/package/myclaw-toolkit)
6
+ [![license](https://img.shields.io/npm/l/myclaw-toolkit)](./LICENSE)
7
+
8
+ **24-in-1 developer utility toolkit as an MCP server.** Search the web, convert currencies, check crypto prices, generate QR codes, format JSON, and more — all from any MCP-compatible AI assistant.
4
9
 
5
10
  ## Quick Install
6
11
 
@@ -69,6 +74,20 @@ claude mcp add myclaw-toolkit -- npx myclaw-toolkit
69
74
  | `wifi_qrcode` | WiFi QR code generator |
70
75
  | `ai_translate` | AI translation |
71
76
 
77
+ ### Health
78
+ | Tool | Description |
79
+ |------|-------------|
80
+ | `health_check` | Check API backend status & latency |
81
+
82
+ ## Discoverability
83
+
84
+ Listed on these MCP registries (help others find the toolkit):
85
+
86
+ - [Glama](https://glama.ai/mcp/servers/Dusheh/myclaw-toolkit) — badge above
87
+ - [mcp.so](https://mcp.so) — submitted via form
88
+ - [Smithery](https://smithery.ai) — submitted via form
89
+ - [awesome-mcp-servers](https://github.com/punkpeye/awesome-mcp-servers) — PR pending
90
+
72
91
  ## Environment Variables
73
92
 
74
93
  | Variable | Default | Description |
package/dist/index.js CHANGED
@@ -14,16 +14,34 @@ import { z } from "zod";
14
14
  // ── Config ──────────────────────────────────────────────────────────
15
15
  const API_BASE = process.env.MYCLAW_API || "http://47.103.7.241";
16
16
  const USER_AGENT = "myclaw-toolkit-mcp/1.0";
17
+ const FETCH_TIMEOUT_MS = 15_000;
17
18
  async function apiCall(path) {
18
- const res = await fetch(`${API_BASE}${path}`, {
19
- headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
20
- });
21
- return res.text();
19
+ const controller = new AbortController();
20
+ const timer = setTimeout(() => controller.abort(), FETCH_TIMEOUT_MS);
21
+ try {
22
+ const res = await fetch(`${API_BASE}${path}`, {
23
+ headers: { "User-Agent": USER_AGENT, Accept: "application/json" },
24
+ signal: controller.signal,
25
+ });
26
+ if (!res.ok) {
27
+ return JSON.stringify({ error: `API returned ${res.status}`, path });
28
+ }
29
+ return res.text();
30
+ }
31
+ catch (err) {
32
+ if (err.name === "AbortError") {
33
+ return JSON.stringify({ error: "Request timed out", path });
34
+ }
35
+ return JSON.stringify({ error: `Connection failed: ${err.message}`, path });
36
+ }
37
+ finally {
38
+ clearTimeout(timer);
39
+ }
22
40
  }
23
41
  // ── Server ──────────────────────────────────────────────────────────
24
42
  const server = new McpServer({
25
43
  name: "myclaw-toolkit",
26
- version: "1.0.0",
44
+ version: "1.0.3",
27
45
  });
28
46
  // ═══════════════════════════════════════════════════════════════════
29
47
  // CATEGORY 1: UTILITY TOOLS (Free)
@@ -214,6 +232,24 @@ server.tool("compare", "Compare two items side-by-side (text, products, anything
214
232
  return { content: [{ type: "text", text: result }] };
215
233
  });
216
234
  // ═══════════════════════════════════════════════════════════════════
235
+ // CATEGORY 5: HEALTH
236
+ // ═══════════════════════════════════════════════════════════════════
237
+ server.tool("health_check", "Check if the MyClaw API backend is reachable and responsive", {}, async () => {
238
+ const start = Date.now();
239
+ const result = await apiCall("/ts");
240
+ const elapsed = Date.now() - start;
241
+ return {
242
+ content: [{
243
+ type: "text",
244
+ text: JSON.stringify({
245
+ backend: API_BASE,
246
+ status: result.startsWith("{") ? "healthy" : "degraded",
247
+ latency_ms: elapsed,
248
+ }),
249
+ }],
250
+ };
251
+ });
252
+ // ═══════════════════════════════════════════════════════════════════
217
253
  // START
218
254
  // ═══════════════════════════════════════════════════════════════════
219
255
  async function main() {
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "myclaw-toolkit",
3
- "version": "1.0.2",
4
- "description": "23-in-1 developer utility toolkit as an MCP server search, exchange rates, crypto, QR codes, translation, and more",
3
+ "version": "1.0.7",
4
+ "description": "23-in-1 developer utility toolkit as an MCP server \u2014 search, exchange rates, crypto, QR codes, translation, and more",
5
+ "mcpName": "io.github.Dusheh/myclaw-toolkit",
5
6
  "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "bin": {
@@ -59,4 +60,4 @@
59
60
  "tsx": "^4.22.4",
60
61
  "typescript": "^5.9.3"
61
62
  }
62
- }
63
+ }