mcp-devutils 1.6.0 → 1.7.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 +7 -2
- package/index.js +109 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# mcp-devutils
|
|
2
2
|
|
|
3
|
-
MCP server with **
|
|
3
|
+
MCP server with **44 developer utilities** for Claude Desktop, Cursor, and any MCP-compatible AI assistant.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -15,7 +15,7 @@ MCP server with **39 developer utilities** for Claude Desktop, Cursor, and any M
|
|
|
15
15
|
}
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
## Tools (
|
|
18
|
+
## Tools (44)
|
|
19
19
|
|
|
20
20
|
| Tool | Description |
|
|
21
21
|
|------|-------------|
|
|
@@ -58,6 +58,11 @@ MCP server with **39 developer utilities** for Claude Desktop, Cursor, and any M
|
|
|
58
58
|
| `sql_format` | Format SQL queries with proper indentation |
|
|
59
59
|
| `json_query` | Extract values from JSON using dot-notation paths |
|
|
60
60
|
| `epoch_convert` | Convert epoch timestamps across multiple timezones |
|
|
61
|
+
| `aes_encrypt` | AES-256-CBC encrypt text with any key |
|
|
62
|
+
| `aes_decrypt` | Decrypt AES-256-CBC encrypted text |
|
|
63
|
+
| `rsa_keygen` | Generate RSA key pairs (1024/2048/4096-bit) |
|
|
64
|
+
| `scrypt_hash` | Hash passwords with scrypt (RFC 7914) |
|
|
65
|
+
| `regex_replace` | Find & replace with regex + capture groups |
|
|
61
66
|
|
|
62
67
|
## Zero dependencies
|
|
63
68
|
|
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema } from "@modelcontextprot
|
|
|
5
5
|
import crypto from "crypto";
|
|
6
6
|
|
|
7
7
|
const server = new Server(
|
|
8
|
-
{ name: "mcp-devutils", version: "1.
|
|
8
|
+
{ name: "mcp-devutils", version: "1.7.0" },
|
|
9
9
|
{ capabilities: { tools: {} } }
|
|
10
10
|
);
|
|
11
11
|
|
|
@@ -524,6 +524,66 @@ server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
|
524
524
|
timezone: { type: "string", description: "Additional IANA timezone to show (e.g. 'Asia/Tokyo')" }
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
name: "aes_encrypt",
|
|
530
|
+
description: "Encrypt text using AES-256-CBC. Returns hex-encoded IV + ciphertext. Use a strong key (will be hashed to 256 bits internally).",
|
|
531
|
+
inputSchema: {
|
|
532
|
+
type: "object",
|
|
533
|
+
properties: {
|
|
534
|
+
text: { type: "string", description: "Plaintext to encrypt" },
|
|
535
|
+
key: { type: "string", description: "Encryption key (any string — will be SHA-256 hashed to derive 256-bit key)" }
|
|
536
|
+
},
|
|
537
|
+
required: ["text", "key"]
|
|
538
|
+
}
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
name: "aes_decrypt",
|
|
542
|
+
description: "Decrypt AES-256-CBC encrypted text. Expects hex-encoded input from aes_encrypt.",
|
|
543
|
+
inputSchema: {
|
|
544
|
+
type: "object",
|
|
545
|
+
properties: {
|
|
546
|
+
encrypted: { type: "string", description: "Hex-encoded string (IV + ciphertext) from aes_encrypt" },
|
|
547
|
+
key: { type: "string", description: "Same key used for encryption" }
|
|
548
|
+
},
|
|
549
|
+
required: ["encrypted", "key"]
|
|
550
|
+
}
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
name: "rsa_keygen",
|
|
554
|
+
description: "Generate an RSA key pair (PEM format). Useful for testing, dev environments, and learning.",
|
|
555
|
+
inputSchema: {
|
|
556
|
+
type: "object",
|
|
557
|
+
properties: {
|
|
558
|
+
bits: { type: "number", description: "Key size in bits: 1024, 2048, or 4096 (default: 2048)" }
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
name: "scrypt_hash",
|
|
564
|
+
description: "Hash a password using Node.js scrypt (RFC 7914). Returns hex-encoded salt + hash for secure password storage.",
|
|
565
|
+
inputSchema: {
|
|
566
|
+
type: "object",
|
|
567
|
+
properties: {
|
|
568
|
+
password: { type: "string", description: "Password to hash" },
|
|
569
|
+
salt: { type: "string", description: "Optional salt (hex). If omitted, a random 16-byte salt is generated." }
|
|
570
|
+
},
|
|
571
|
+
required: ["password"]
|
|
572
|
+
}
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
name: "regex_replace",
|
|
576
|
+
description: "Find and replace text using a regular expression. Supports capture groups ($1, $2, etc.) in the replacement string.",
|
|
577
|
+
inputSchema: {
|
|
578
|
+
type: "object",
|
|
579
|
+
properties: {
|
|
580
|
+
text: { type: "string", description: "Input text" },
|
|
581
|
+
pattern: { type: "string", description: "Regular expression pattern" },
|
|
582
|
+
replacement: { type: "string", description: "Replacement string (use $1, $2 for capture groups)" },
|
|
583
|
+
flags: { type: "string", description: "Regex flags (default: 'g'). Common: 'gi' for global case-insensitive." }
|
|
584
|
+
},
|
|
585
|
+
required: ["text", "pattern", "replacement"]
|
|
586
|
+
}
|
|
527
587
|
}
|
|
528
588
|
]
|
|
529
589
|
};
|
|
@@ -1618,6 +1678,54 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
|
1618
1678
|
return { content: [{ type: "text", text: lines.join("\n") }] };
|
|
1619
1679
|
}
|
|
1620
1680
|
|
|
1681
|
+
case "aes_encrypt": {
|
|
1682
|
+
const keyHash = crypto.createHash("sha256").update(args.key).digest();
|
|
1683
|
+
const iv = crypto.randomBytes(16);
|
|
1684
|
+
const cipher = crypto.createCipheriv("aes-256-cbc", keyHash, iv);
|
|
1685
|
+
let encrypted = cipher.update(args.text, "utf8", "hex");
|
|
1686
|
+
encrypted += cipher.final("hex");
|
|
1687
|
+
const result = iv.toString("hex") + encrypted;
|
|
1688
|
+
return { content: [{ type: "text", text: `Encrypted (hex): ${result}\n\nIV (first 32 hex chars): ${iv.toString("hex")}\nCiphertext: ${encrypted}\nTotal length: ${result.length} hex chars` }] };
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
case "aes_decrypt": {
|
|
1692
|
+
const keyHash = crypto.createHash("sha256").update(args.key).digest();
|
|
1693
|
+
const encHex = args.encrypted;
|
|
1694
|
+
if (encHex.length < 34) throw new Error("Encrypted string too short — must contain 32-char IV + ciphertext");
|
|
1695
|
+
const iv = Buffer.from(encHex.slice(0, 32), "hex");
|
|
1696
|
+
const ciphertext = encHex.slice(32);
|
|
1697
|
+
const decipher = crypto.createDecipheriv("aes-256-cbc", keyHash, iv);
|
|
1698
|
+
let decrypted = decipher.update(ciphertext, "hex", "utf8");
|
|
1699
|
+
decrypted += decipher.final("utf8");
|
|
1700
|
+
return { content: [{ type: "text", text: decrypted }] };
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
case "rsa_keygen": {
|
|
1704
|
+
const bits = [1024, 2048, 4096].includes(args?.bits) ? args.bits : 2048;
|
|
1705
|
+
const { publicKey, privateKey } = crypto.generateKeyPairSync("rsa", {
|
|
1706
|
+
modulusLength: bits,
|
|
1707
|
+
publicKeyEncoding: { type: "spki", format: "pem" },
|
|
1708
|
+
privateKeyEncoding: { type: "pkcs8", format: "pem" }
|
|
1709
|
+
});
|
|
1710
|
+
return { content: [{ type: "text", text: `=== RSA ${bits}-bit Key Pair ===\n\n--- Public Key ---\n${publicKey}\n--- Private Key ---\n${privateKey}\n⚠️ This is for dev/testing. Never share private keys.` }] };
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
case "scrypt_hash": {
|
|
1714
|
+
const salt = args.salt ? Buffer.from(args.salt, "hex") : crypto.randomBytes(16);
|
|
1715
|
+
const derived = crypto.scryptSync(args.password, salt, 64);
|
|
1716
|
+
const saltHex = salt.toString("hex");
|
|
1717
|
+
const hashHex = derived.toString("hex");
|
|
1718
|
+
return { content: [{ type: "text", text: `Salt (hex): ${saltHex}\nHash (hex): ${hashHex}\nCombined: ${saltHex}:${hashHex}\n\nTo verify, use the same salt with scrypt_hash.` }] };
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
case "regex_replace": {
|
|
1722
|
+
const flags = args.flags || "g";
|
|
1723
|
+
const regex = new RegExp(args.pattern, flags);
|
|
1724
|
+
const result = args.text.replace(regex, args.replacement);
|
|
1725
|
+
const matchCount = (args.text.match(regex) || []).length;
|
|
1726
|
+
return { content: [{ type: "text", text: `Matches found: ${matchCount}\n\n--- Result ---\n${result}` }] };
|
|
1727
|
+
}
|
|
1728
|
+
|
|
1621
1729
|
default:
|
|
1622
1730
|
throw new Error(`Unknown tool: ${name}`);
|
|
1623
1731
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mcp-devutils",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "MCP server with
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "MCP server with 44 developer utilities - UUID, nanoid, hash, HMAC, base64, hex encode, timestamps, JWT decode/create, random strings, URL encode/decode, JSON format/diff/query, CSV/JSON convert, regex test/replace, cron explain, color convert, semver compare, HTTP status codes, slugify, HTML escape, chmod calculator, text diff, number base converter, lorem ipsum, word count, byte count, CIDR calculator, case converter, markdown TOC, env parser, IP info, password strength, data size converter, string escape, char info, SQL format, epoch convert, AES encrypt/decrypt, RSA keygen, scrypt password hash",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"bin": {
|
|
@@ -52,7 +52,14 @@
|
|
|
52
52
|
"sql-format",
|
|
53
53
|
"json-query",
|
|
54
54
|
"epoch-convert",
|
|
55
|
-
"timezone"
|
|
55
|
+
"timezone",
|
|
56
|
+
"aes",
|
|
57
|
+
"encryption",
|
|
58
|
+
"rsa",
|
|
59
|
+
"keygen",
|
|
60
|
+
"scrypt",
|
|
61
|
+
"password-hash",
|
|
62
|
+
"regex-replace"
|
|
56
63
|
],
|
|
57
64
|
"author": "Hong Teoh",
|
|
58
65
|
"license": "MIT",
|