myclaw-toolkit 1.0.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/README.md +89 -0
- package/dist/index.js +224 -0
- package/package.json +40 -0
package/README.md
ADDED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# MyClaw Toolkit — MCP Server
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Quick Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx myclaw-toolkit
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or add to your AI client:
|
|
12
|
+
|
|
13
|
+
**Claude Desktop / Cursor / ChatGPT:**
|
|
14
|
+
```json
|
|
15
|
+
{
|
|
16
|
+
"mcpServers": {
|
|
17
|
+
"myclaw-toolkit": {
|
|
18
|
+
"command": "npx",
|
|
19
|
+
"args": ["myclaw-toolkit"]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
**Claude Code:**
|
|
26
|
+
```bash
|
|
27
|
+
claude mcp add myclaw-toolkit -- npx myclaw-toolkit
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Tools
|
|
31
|
+
|
|
32
|
+
### Utility (Free)
|
|
33
|
+
| Tool | Description |
|
|
34
|
+
|------|-------------|
|
|
35
|
+
| `timestamp` | Current Unix timestamp & ISO 8601 |
|
|
36
|
+
| `uuid` | Generate UUID v4 |
|
|
37
|
+
| `base64` | Base64 encode/decode |
|
|
38
|
+
| `hash` | MD5, SHA1, SHA256, SHA512 |
|
|
39
|
+
| `qrcode` | QR code generator |
|
|
40
|
+
| `color_tools` | Hex ↔ RGB ↔ HSL converter |
|
|
41
|
+
| `json_formatter` | Format, validate, minify JSON |
|
|
42
|
+
| `url_tools` | URL encode/decode |
|
|
43
|
+
| `text_tools` | Text count, reverse, case |
|
|
44
|
+
|
|
45
|
+
### Data (Free)
|
|
46
|
+
| Tool | Description |
|
|
47
|
+
|------|-------------|
|
|
48
|
+
| `exchange_rate` | Real-time currency rates |
|
|
49
|
+
| `crypto_price` | Cryptocurrency prices |
|
|
50
|
+
| `domain_check` | Domain whois & availability |
|
|
51
|
+
| `bmi_calculator` | BMI calculator |
|
|
52
|
+
| `vcard_generator` | vCard (.vcf) generator |
|
|
53
|
+
| `compare` | Side-by-side comparison |
|
|
54
|
+
| `quote` | Random inspirational quotes |
|
|
55
|
+
|
|
56
|
+
### Search & Content
|
|
57
|
+
| Tool | Description |
|
|
58
|
+
|------|-------------|
|
|
59
|
+
| `web_search` | Bing web search |
|
|
60
|
+
| `news_search` | Global news search |
|
|
61
|
+
| `product_search` | E-commerce product search |
|
|
62
|
+
| `rss_feed` | RSS feed parser |
|
|
63
|
+
| `read_page` | Web page content extractor |
|
|
64
|
+
|
|
65
|
+
### Processing
|
|
66
|
+
| Tool | Description |
|
|
67
|
+
|------|-------------|
|
|
68
|
+
| `markdown_to_html` | Markdown → HTML |
|
|
69
|
+
| `wifi_qrcode` | WiFi QR code generator |
|
|
70
|
+
| `ai_translate` | AI translation |
|
|
71
|
+
|
|
72
|
+
## Environment Variables
|
|
73
|
+
|
|
74
|
+
| Variable | Default | Description |
|
|
75
|
+
|----------|---------|-------------|
|
|
76
|
+
| `MYCLAW_API` | `http://47.103.7.241` | API backend URL |
|
|
77
|
+
|
|
78
|
+
## Development
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git clone https://github.com/myclaw/toolkit
|
|
82
|
+
cd toolkit
|
|
83
|
+
npm install
|
|
84
|
+
npm run dev
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## License
|
|
88
|
+
|
|
89
|
+
MIT — [MyClaw](https://myclaw.dev)
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* MyClaw Toolkit — 23-in-1 Developer Utility MCP Server
|
|
4
|
+
*
|
|
5
|
+
* Exposes 23 tools to AI assistants (Claude, ChatGPT, Cursor, etc.)
|
|
6
|
+
* via the Model Context Protocol (MCP).
|
|
7
|
+
*
|
|
8
|
+
* Free tier: utility & data tools
|
|
9
|
+
* Pro tier: search & AI tools (subscription-based via MCP Marketplace)
|
|
10
|
+
*/
|
|
11
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
// ── Config ──────────────────────────────────────────────────────────
|
|
15
|
+
const API_BASE = process.env.MYCLAW_API || "http://47.103.7.241";
|
|
16
|
+
const USER_AGENT = "myclaw-toolkit-mcp/1.0";
|
|
17
|
+
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();
|
|
22
|
+
}
|
|
23
|
+
// ── Server ──────────────────────────────────────────────────────────
|
|
24
|
+
const server = new McpServer({
|
|
25
|
+
name: "myclaw-toolkit",
|
|
26
|
+
version: "1.0.0",
|
|
27
|
+
});
|
|
28
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
29
|
+
// CATEGORY 1: UTILITY TOOLS (Free)
|
|
30
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
31
|
+
server.tool("timestamp", "Get current Unix timestamp and ISO 8601 datetime", {}, async () => {
|
|
32
|
+
const result = await apiCall("/ts");
|
|
33
|
+
return { content: [{ type: "text", text: result }] };
|
|
34
|
+
});
|
|
35
|
+
server.tool("uuid", "Generate UUID v4 identifiers", {
|
|
36
|
+
count: z.number().min(1).max(100).default(1).describe("Number of UUIDs to generate"),
|
|
37
|
+
}, async ({ count }) => {
|
|
38
|
+
const result = await apiCall(`/uuid?count=${count}`);
|
|
39
|
+
return { content: [{ type: "text", text: result }] };
|
|
40
|
+
});
|
|
41
|
+
server.tool("base64", "Encode or decode Base64 strings", {
|
|
42
|
+
action: z.enum(["encode", "decode"]).describe("Operation to perform"),
|
|
43
|
+
text: z.string().describe("Text to encode or Base64 to decode"),
|
|
44
|
+
}, async ({ action, text }) => {
|
|
45
|
+
const result = await apiCall(`/b64?action=${action}&text=${encodeURIComponent(text)}`);
|
|
46
|
+
return { content: [{ type: "text", text: result }] };
|
|
47
|
+
});
|
|
48
|
+
server.tool("hash", "Generate cryptographic hashes (MD5, SHA1, SHA256, SHA512)", {
|
|
49
|
+
algorithm: z.enum(["md5", "sha1", "sha256", "sha512"]).default("sha256").describe("Hash algorithm"),
|
|
50
|
+
text: z.string().describe("Text to hash"),
|
|
51
|
+
}, async ({ algorithm, text }) => {
|
|
52
|
+
const result = await apiCall(`/hash?algo=${algorithm}&text=${encodeURIComponent(text)}`);
|
|
53
|
+
return { content: [{ type: "text", text: result }] };
|
|
54
|
+
});
|
|
55
|
+
server.tool("qrcode", "Generate QR codes from text or URLs", {
|
|
56
|
+
text: z.string().describe("Text or URL to encode in QR code"),
|
|
57
|
+
}, async ({ text }) => {
|
|
58
|
+
const result = await apiCall(`/qr?text=${encodeURIComponent(text)}`);
|
|
59
|
+
return { content: [{ type: "text", text: result }] };
|
|
60
|
+
});
|
|
61
|
+
server.tool("color_tools", "Convert colors between hex, RGB, and HSL formats", {
|
|
62
|
+
color: z.string().describe("Color value (hex like #ff0000, rgb like 255,0,0, or hsl like 0,100,50)"),
|
|
63
|
+
}, async ({ color }) => {
|
|
64
|
+
const result = await apiCall(`/color?value=${encodeURIComponent(color)}`);
|
|
65
|
+
return { content: [{ type: "text", text: result }] };
|
|
66
|
+
});
|
|
67
|
+
server.tool("json_formatter", "Format, validate, or minify JSON strings", {
|
|
68
|
+
action: z.enum(["format", "validate", "minify"]).default("format").describe("Operation"),
|
|
69
|
+
json: z.string().describe("JSON string to process"),
|
|
70
|
+
}, async ({ action, json }) => {
|
|
71
|
+
const result = await apiCall(`/json?action=${action}&data=${encodeURIComponent(json)}`);
|
|
72
|
+
return { content: [{ type: "text", text: result }] };
|
|
73
|
+
});
|
|
74
|
+
server.tool("url_tools", "Encode or decode URL strings", {
|
|
75
|
+
action: z.enum(["encode", "decode"]).describe("Operation"),
|
|
76
|
+
text: z.string().describe("Text to encode or URL to decode"),
|
|
77
|
+
}, async ({ action, text }) => {
|
|
78
|
+
const result = await apiCall(`/url?action=${action}&text=${encodeURIComponent(text)}`);
|
|
79
|
+
return { content: [{ type: "text", text: result }] };
|
|
80
|
+
});
|
|
81
|
+
server.tool("text_tools", "Text processing utilities (count, reverse, case conversion)", {
|
|
82
|
+
action: z.enum(["count", "reverse", "upper", "lower", "title"]).describe("Operation"),
|
|
83
|
+
text: z.string().describe("Text to process"),
|
|
84
|
+
}, async ({ action, text }) => {
|
|
85
|
+
const result = await apiCall(`/text?action=${action}&text=${encodeURIComponent(text)}`);
|
|
86
|
+
return { content: [{ type: "text", text: result }] };
|
|
87
|
+
});
|
|
88
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
89
|
+
// CATEGORY 2: DATA TOOLS (Free)
|
|
90
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
91
|
+
server.tool("exchange_rate", "Get real-time currency exchange rates between any two currencies", {
|
|
92
|
+
from: z.string().length(3).describe("Source currency code (e.g., USD, CNY, EUR)"),
|
|
93
|
+
to: z.string().length(3).describe("Target currency code (e.g., USD, CNY, EUR)"),
|
|
94
|
+
}, async ({ from, to }) => {
|
|
95
|
+
const result = await apiCall(`/exchange?from=${from.toUpperCase()}&to=${to.toUpperCase()}`);
|
|
96
|
+
return { content: [{ type: "text", text: result }] };
|
|
97
|
+
});
|
|
98
|
+
server.tool("crypto_price", "Get current cryptocurrency prices in USD or any fiat currency", {
|
|
99
|
+
coin: z.string().describe("Cryptocurrency symbol (e.g., BTC, ETH, SOL, USDT)"),
|
|
100
|
+
vs: z.string().default("usd").describe("Quote currency (e.g., usd, cny, eur)"),
|
|
101
|
+
}, async ({ coin, vs }) => {
|
|
102
|
+
const result = await apiCall(`/crypto?coin=${coin.toUpperCase()}&vs=${vs.toLowerCase()}`);
|
|
103
|
+
return { content: [{ type: "text", text: result }] };
|
|
104
|
+
});
|
|
105
|
+
server.tool("domain_check", "Check domain name availability and whois information", {
|
|
106
|
+
domain: z.string().describe("Domain name to check (e.g., example.com)"),
|
|
107
|
+
}, async ({ domain }) => {
|
|
108
|
+
const result = await apiCall(`/domain?name=${encodeURIComponent(domain)}`);
|
|
109
|
+
return { content: [{ type: "text", text: result }] };
|
|
110
|
+
});
|
|
111
|
+
server.tool("bmi_calculator", "Calculate BMI (Body Mass Index) from height and weight", {
|
|
112
|
+
height: z.number().min(50).max(300).describe("Height in centimeters"),
|
|
113
|
+
weight: z.number().min(1).max(500).describe("Weight in kilograms"),
|
|
114
|
+
}, async ({ height, weight }) => {
|
|
115
|
+
const result = await apiCall(`/bmi?h=${height}&w=${weight}`);
|
|
116
|
+
return { content: [{ type: "text", text: result }] };
|
|
117
|
+
});
|
|
118
|
+
server.tool("vcard_generator", "Generate vCard (.vcf) contact files", {
|
|
119
|
+
name: z.string().describe("Full name"),
|
|
120
|
+
phone: z.string().optional().describe("Phone number"),
|
|
121
|
+
email: z.string().optional().describe("Email address"),
|
|
122
|
+
org: z.string().optional().describe("Organization/company"),
|
|
123
|
+
}, async ({ name, phone, email, org }) => {
|
|
124
|
+
const params = new URLSearchParams({ name });
|
|
125
|
+
if (phone)
|
|
126
|
+
params.set("phone", phone);
|
|
127
|
+
if (email)
|
|
128
|
+
params.set("email", email);
|
|
129
|
+
if (org)
|
|
130
|
+
params.set("org", org);
|
|
131
|
+
const result = await apiCall(`/vcard?${params.toString()}`);
|
|
132
|
+
return { content: [{ type: "text", text: result }] };
|
|
133
|
+
});
|
|
134
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
135
|
+
// CATEGORY 3: SEARCH & CONTENT TOOLS (Pro / requires API key)
|
|
136
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
137
|
+
server.tool("web_search", "Search the web using Bing — returns titles, snippets, and URLs", {
|
|
138
|
+
query: z.string().describe("Search query"),
|
|
139
|
+
count: z.number().min(1).max(20).default(10).describe("Number of results"),
|
|
140
|
+
}, async ({ query, count }) => {
|
|
141
|
+
const result = await apiCall(`/search?q=${encodeURIComponent(query)}&limit=${count}`);
|
|
142
|
+
return { content: [{ type: "text", text: result }] };
|
|
143
|
+
});
|
|
144
|
+
server.tool("news_search", "Search news articles from global sources", {
|
|
145
|
+
query: z.string().describe("News search query"),
|
|
146
|
+
count: z.number().min(1).max(20).default(10).describe("Number of articles"),
|
|
147
|
+
}, async ({ query, count }) => {
|
|
148
|
+
const result = await apiCall(`/news?q=${encodeURIComponent(query)}&limit=${count}`);
|
|
149
|
+
return { content: [{ type: "text", text: result }] };
|
|
150
|
+
});
|
|
151
|
+
server.tool("product_search", "Search products across multiple e-commerce platforms", {
|
|
152
|
+
query: z.string().describe("Product search query"),
|
|
153
|
+
count: z.number().min(1).max(20).default(10).describe("Number of results"),
|
|
154
|
+
}, async ({ query, count }) => {
|
|
155
|
+
const result = await apiCall(`/products?q=${encodeURIComponent(query)}&limit=${count}`);
|
|
156
|
+
return { content: [{ type: "text", text: result }] };
|
|
157
|
+
});
|
|
158
|
+
server.tool("rss_feed", "Fetch and parse RSS feeds from any URL", {
|
|
159
|
+
url: z.string().url().describe("RSS feed URL to fetch"),
|
|
160
|
+
count: z.number().min(1).max(50).default(10).describe("Number of items"),
|
|
161
|
+
}, async ({ url, count }) => {
|
|
162
|
+
const result = await apiCall(`/rss?url=${encodeURIComponent(url)}&limit=${count}`);
|
|
163
|
+
return { content: [{ type: "text", text: result }] };
|
|
164
|
+
});
|
|
165
|
+
server.tool("read_page", "Extract readable content from any web page (like Readability)", {
|
|
166
|
+
url: z.string().url().describe("Web page URL to extract content from"),
|
|
167
|
+
}, async ({ url }) => {
|
|
168
|
+
const result = await apiCall(`/read?url=${encodeURIComponent(url)}`);
|
|
169
|
+
return { content: [{ type: "text", text: result }] };
|
|
170
|
+
});
|
|
171
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
172
|
+
// CATEGORY 4: PROCESSING TOOLS (Pro)
|
|
173
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
174
|
+
server.tool("markdown_to_html", "Convert Markdown text to HTML", {
|
|
175
|
+
markdown: z.string().describe("Markdown text to convert"),
|
|
176
|
+
}, async ({ markdown }) => {
|
|
177
|
+
const result = await apiCall(`/md?text=${encodeURIComponent(markdown)}`);
|
|
178
|
+
return { content: [{ type: "text", text: result }] };
|
|
179
|
+
});
|
|
180
|
+
server.tool("ai_translate", "Translate text between languages using AI", {
|
|
181
|
+
text: z.string().describe("Text to translate"),
|
|
182
|
+
from: z.string().default("auto").describe("Source language (auto for auto-detect)"),
|
|
183
|
+
to: z.string().default("en").describe("Target language"),
|
|
184
|
+
}, async ({ text, from, to }) => {
|
|
185
|
+
const langPair = from === "auto" ? `autodetect|${to}` : `${from}|${to}`;
|
|
186
|
+
const url = `https://api.mymemory.translated.net/get?q=${encodeURIComponent(text)}&langpair=${encodeURIComponent(langPair)}`;
|
|
187
|
+
try {
|
|
188
|
+
const res = await fetch(url);
|
|
189
|
+
const data = await res.json();
|
|
190
|
+
const translated = data?.responseData?.translatedText || `Error: ${data?.responseStatus || "unknown"}`;
|
|
191
|
+
return { content: [{ type: "text", text: JSON.stringify({ from, to, original: text, translated }) }] };
|
|
192
|
+
}
|
|
193
|
+
catch {
|
|
194
|
+
return { content: [{ type: "text", text: JSON.stringify({ error: "Translation service unavailable", from, to, original: text }) }] };
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
server.tool("quote", "Get inspirational or random quotes", {}, async () => {
|
|
198
|
+
const result = await apiCall("/quote");
|
|
199
|
+
return { content: [{ type: "text", text: result }] };
|
|
200
|
+
});
|
|
201
|
+
server.tool("wifi_qrcode", "Generate WiFi connection QR codes", {
|
|
202
|
+
ssid: z.string().describe("WiFi network name (SSID)"),
|
|
203
|
+
password: z.string().describe("WiFi password"),
|
|
204
|
+
security: z.enum(["WPA", "WEP", "nopass"]).default("WPA").describe("Security type"),
|
|
205
|
+
}, async ({ ssid, password, security }) => {
|
|
206
|
+
const result = await apiCall(`/wifi?ssid=${encodeURIComponent(ssid)}&pass=${encodeURIComponent(password)}&sec=${security}`);
|
|
207
|
+
return { content: [{ type: "text", text: result }] };
|
|
208
|
+
});
|
|
209
|
+
server.tool("compare", "Compare two items side-by-side (text, products, anything)", {
|
|
210
|
+
a: z.string().describe("First item to compare"),
|
|
211
|
+
b: z.string().describe("Second item to compare"),
|
|
212
|
+
}, async ({ a, b }) => {
|
|
213
|
+
const result = await apiCall(`/compare?a=${encodeURIComponent(a)}&b=${encodeURIComponent(b)}`);
|
|
214
|
+
return { content: [{ type: "text", text: result }] };
|
|
215
|
+
});
|
|
216
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
217
|
+
// START
|
|
218
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
219
|
+
async function main() {
|
|
220
|
+
const transport = new StdioServerTransport();
|
|
221
|
+
await server.connect(transport);
|
|
222
|
+
console.error("MyClaw Toolkit MCP server running (stdio)");
|
|
223
|
+
}
|
|
224
|
+
main().catch(console.error);
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "myclaw-toolkit",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "23-in-1 developer utility toolkit as an MCP server — search, exchange rates, crypto, QR codes, translation, and more",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"myclaw-toolkit": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc",
|
|
15
|
+
"start": "node dist/index.js",
|
|
16
|
+
"dev": "tsx src/index.ts"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"mcp",
|
|
20
|
+
"tools",
|
|
21
|
+
"search",
|
|
22
|
+
"api",
|
|
23
|
+
"developer-tools",
|
|
24
|
+
"modelcontextprotocol"
|
|
25
|
+
],
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"repository": {
|
|
28
|
+
"type": "git",
|
|
29
|
+
"url": "https://github.com/myclaw/toolkit"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
33
|
+
"zod": "^3.23.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.19.21",
|
|
37
|
+
"tsx": "^4.22.4",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
|
+
}
|
|
40
|
+
}
|