it-tools-mcp 3.0.15 → 3.0.17

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.
@@ -4,7 +4,7 @@
4
4
  [![Docker Image Size](https://img.shields.io/docker/image-size/wrenchpilot/it-tools-mcp/latest?refresh=1)](https://hub.docker.com/r/wrenchpilot/it-tools-mcp)
5
5
  [![Build Status](https://github.com/wrenchpilot/it-tools-mcp/workflows/Build%20and%20Push%20to%20Docker%20Hub/badge.svg)](https://github.com/wrenchpilot/it-tools-mcp/actions)
6
6
 
7
- A comprehensive Model Context Protocol (MCP) server that provides access to **86 IT tools and utilities** commonly used by developers, system administrators, and IT professionals. This server exposes a complete set of tools for encoding/decoding, text manipulation, hashing, network utilities, and many other common development and IT tasks.
7
+ A comprehensive Model Context Protocol (MCP) server that provides access to **88 IT tools and utilities** commonly used by developers, system administrators, and IT professionals. This server exposes a complete set of tools for encoding/decoding, text manipulation, hashing, network utilities, and many other common development and IT tasks.
8
8
 
9
9
  ## Using with VS Code
10
10
 
@@ -56,7 +56,7 @@ Add to your VS Code `settings.json`:
56
56
  }
57
57
  ```
58
58
 
59
- See the complete list of all 86 tools with detailed parameters on [GitHub](https://github.com/wrenchpilot/it-tools-mcp#available-tools)
59
+ See the complete list of all 88 tools with detailed parameters on [GitHub](https://github.com/wrenchpilot/it-tools-mcp#available-tools)
60
60
 
61
61
  ## 📸 Examples in Action
62
62
 
@@ -78,7 +78,7 @@ Built with **TypeScript**, **Zod** validation, and **MCP SDK** for robust, type-
78
78
 
79
79
  This project was developed using **VS Code**, **Copilot Chat Agent**, **Playwright MCP**, and the **Claude Sonnet 4 Model**, showcasing modern AI-assisted software development:
80
80
 
81
- - 🔧 **All 86 tools** designed and implemented with AI assistance
81
+ - 🔧 **All 88 tools** designed and implemented with AI assistance
82
82
  - 📦 **Complete Docker setup** with GitHub Actions CI/CD pipeline
83
83
  - 🔍 **Schema optimization** with systematic validation cleanup
84
84
  - 📚 **Comprehensive documentation** and tool catalogs
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  > **📝 Note**: A condensed version of this README is automatically synced to [Docker Hub](https://hub.docker.com/r/wrenchpilot/it-tools-mcp) due to character limits.
8
8
 
9
- A comprehensive Model Context Protocol (MCP) server that provides access to 86 IT tools and utilities commonly used by developers, system administrators, and IT professionals. This server exposes a complete set of tools for encoding/decoding, text manipulation, hashing, network utilities, and many other common development and IT tasks.
9
+ A comprehensive Model Context Protocol (MCP) server that provides access to 87 IT tools and utilities commonly used by developers, system administrators, and IT professionals. This server exposes a complete set of tools for encoding/decoding, text manipulation, hashing, network utilities, and many other common development and IT tasks.
10
10
 
11
11
  ## 📦 Installation & Setup
12
12
 
@@ -80,13 +80,13 @@ echo '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"base64-enc
80
80
 
81
81
  ## 🛠️ Tool Categories
82
82
 
83
- This MCP server provides **86 tools** across **8 categories**:
83
+ This MCP server provides **87 tools** across **8 categories**:
84
84
 
85
85
  - **🔧 Encoding & Decoding** (9 tools): Base64, URL, HTML entities, text-to-binary, Unicode
86
86
  - **📝 Data Format** (11 tools): JSON, XML, YAML, SQL, TOML, Markdown ↔ HTML conversion
87
87
  - **🔐 Security & Crypto** (12 tools): Hashing (MD5, SHA1-512), HMAC, JWT, bcrypt, passwords, tokens
88
88
  - **✨ Text Processing** (16 tools): Case conversion, stats, diff, ASCII art, NATO alphabet, slugify
89
- - **🌐 Network & System** (19 tools): IPv4/IPv6 subnets, URL parsing, MAC addresses, phone formatting, ps, top, cat, head, tail, grep, ping, nslookup, telnet, dig, ssh, random-port, mac-address-generate, ip/ipv6 calculators
89
+ - **🌐 Network & System** (20 tools): IPv4/IPv6 subnets, URL parsing, MAC addresses, phone formatting, ps, top, cat, head, tail, grep, ping, nslookup, telnet, dig, ssh, random-port, mac-address-generate, ip/ipv6 calculators, curl
90
90
  - **🔢 Math & Calculations** (6 tools): Expression evaluation, base conversion, temperature, percentages
91
91
  - **🆔 ID & Code Generators** (4 tools: UUID, ULID, QR codes, SVG placeholders
92
92
  - **🛠️ Utility Tools** (9 tools): Color, MIME, HTTP, device info, email normalization, etc.
@@ -171,6 +171,7 @@ Examples of using the IT Tools MCP server with VS Code Copilot Chat for secure p
171
171
  | `telnet` | Test TCP connectivity | `target: string`, `port: number` |
172
172
  | `dig` | DNS query (custom type) | `target: string`, `type?: string` |
173
173
  | `ssh` | SSH command execution | `target: string`, `user: string`, `command: string` |
174
+ | `scp` | Copy files to/from remote host (SFTP) | `target: string`, `user: string`, `direction: 'upload'\|'download'`, `localPath: string`, `remotePath: string`, `privateKey?: string` |
174
175
  | `ip-subnet-calculator` | Calculate IPv4 subnet | `ip: string`, `cidr: number` |
175
176
  | `ipv4-subnet-calc` | Enhanced IPv4 subnet calc | `cidr: string` |
176
177
  | `ipv6-ula-generator` | Generate IPv6 ULA | `globalId?: string` |
@@ -433,7 +433,7 @@ ${exclude.length > 0 ? `Custom excluded: ${exclude.join(', ')}` : ''}`,
433
433
  throw new Error("Prefix cannot have more than 6 parts");
434
434
  }
435
435
  for (const part of prefixParts) {
436
- if (!/^[0-9A-Fa-f]{2}$/.test(part)) {
436
+ if (!/^[0-9-A-Fa-f]{2}$/.test(part)) {
437
437
  throw new Error(`Invalid MAC address part: ${part}`);
438
438
  }
439
439
  macParts.push(part.toUpperCase());
@@ -787,4 +787,147 @@ Common issues:
787
787
  return { content: [{ type: "text", text: `tail failed: ${error instanceof Error ? error.message : error}` }] };
788
788
  }
789
789
  });
790
+ // SCP Tool (using ssh2 SFTP)
791
+ server.tool("scp", "Copy files to or from a remote host using SFTP (SCP-like)", {
792
+ target: z.string().describe("Target host"),
793
+ user: z.string().describe("Username"),
794
+ direction: z.enum(["upload", "download"]).describe("Direction: upload (local to remote) or download (remote to local)"),
795
+ localPath: z.string().describe("Local file path (source for upload, destination for download)"),
796
+ remotePath: z.string().describe("Remote file path (destination for upload, source for download)"),
797
+ privateKey: z.string().optional().describe("Private key for authentication (PEM format, optional, or path to key file)")
798
+ }, async ({ target, user, direction, localPath, remotePath, privateKey }) => {
799
+ try {
800
+ const { Client } = await import("ssh2");
801
+ const fs = await import("fs");
802
+ let resolvedKey;
803
+ try {
804
+ resolvedKey = resolvePrivateKey(privateKey);
805
+ }
806
+ catch (err) {
807
+ return { content: [{ type: "text", text: `SCP key error: ${err.message}` }] };
808
+ }
809
+ return await new Promise((resolve) => {
810
+ const conn = new Client();
811
+ let finished = false;
812
+ const finish = (msg) => {
813
+ if (!finished) {
814
+ finished = true;
815
+ try {
816
+ conn.end();
817
+ }
818
+ catch { }
819
+ resolve({ content: [{ type: "text", text: msg }] });
820
+ }
821
+ };
822
+ // Connection timeout (20s)
823
+ const timeout = setTimeout(() => {
824
+ finish(`SCP connection timed out after 20 seconds`);
825
+ }, 20000);
826
+ conn.on("ready", () => {
827
+ clearTimeout(timeout);
828
+ conn.sftp((err, sftp) => {
829
+ if (err) {
830
+ finish(`SFTP error: ${err.message}`);
831
+ return;
832
+ }
833
+ if (direction === "upload") {
834
+ let readStream, writeStream;
835
+ try {
836
+ readStream = fs.createReadStream(localPath);
837
+ writeStream = sftp.createWriteStream(remotePath);
838
+ }
839
+ catch (streamErr) {
840
+ finish(`Upload failed: ${streamErr.message}`);
841
+ return;
842
+ }
843
+ writeStream.on("close", () => finish(`Upload complete: ${localPath} → ${user}@${target}:${remotePath}`));
844
+ writeStream.on("error", (err) => finish(`Upload failed: ${err.message}`));
845
+ readStream.on("error", (err) => finish(`Upload failed: ${err.message}`));
846
+ readStream.pipe(writeStream);
847
+ }
848
+ else {
849
+ let readStream, writeStream;
850
+ try {
851
+ readStream = sftp.createReadStream(remotePath);
852
+ writeStream = fs.createWriteStream(localPath);
853
+ }
854
+ catch (streamErr) {
855
+ finish(`Download failed: ${streamErr.message}`);
856
+ return;
857
+ }
858
+ writeStream.on("close", () => finish(`Download complete: ${user}@${target}:${remotePath} → ${localPath}`));
859
+ writeStream.on("error", (err) => finish(`Download failed: ${err.message}`));
860
+ readStream.on("error", (err) => finish(`Download failed: ${err.message}`));
861
+ readStream.pipe(writeStream);
862
+ }
863
+ });
864
+ }).on("error", (err) => {
865
+ clearTimeout(timeout);
866
+ finish(`SCP connection error: ${err.message}`);
867
+ });
868
+ try {
869
+ conn.connect({
870
+ host: target,
871
+ username: user,
872
+ ...(resolvedKey ? { privateKey: resolvedKey } : {})
873
+ });
874
+ }
875
+ catch (err) {
876
+ clearTimeout(timeout);
877
+ finish(`SCP connect threw: ${err.message}`);
878
+ }
879
+ });
880
+ }
881
+ catch (fatalErr) {
882
+ return { content: [{ type: "text", text: `SCP fatal error: ${fatalErr.message || fatalErr}` }] };
883
+ }
884
+ });
885
+ // curl Tool (HTTP client)
886
+ server.tool("curl", "Make HTTP requests (GET, POST, etc.) like curl", {
887
+ url: z.string().describe("URL to request"),
888
+ method: z.enum(["GET", "POST", "PUT", "DELETE", "PATCH", "HEAD"]).default("GET").describe("HTTP method"),
889
+ headers: z.record(z.string()).optional().describe("Request headers (object of key-value pairs)"),
890
+ body: z.string().optional().describe("Request body (for POST/PUT/PATCH)")
891
+ }, async ({ url, method, headers, body }) => {
892
+ try {
893
+ // Use native fetch if available (Node 18+), fallback to node-fetch
894
+ let fetchImpl;
895
+ if (typeof globalThis.fetch === 'function') {
896
+ fetchImpl = globalThis.fetch;
897
+ }
898
+ else {
899
+ fetchImpl = (await import('node-fetch')).default;
900
+ }
901
+ const options = {
902
+ method,
903
+ headers: headers || {},
904
+ };
905
+ if (body && ["POST", "PUT", "PATCH"].includes(method)) {
906
+ options.body = body;
907
+ }
908
+ const response = await fetchImpl(url, options);
909
+ let contentType = '';
910
+ if (response.headers && typeof response.headers.get === 'function') {
911
+ contentType = response.headers.get('content-type') || '';
912
+ }
913
+ let responseBody;
914
+ if (contentType.includes('application/json')) {
915
+ responseBody = await response.json();
916
+ responseBody = JSON.stringify(responseBody, null, 2);
917
+ }
918
+ else {
919
+ responseBody = await response.text();
920
+ }
921
+ return {
922
+ content: [
923
+ { type: "text", text: `Status: ${response.status} ${response.statusText}` },
924
+ { type: "text", text: `Headers:\n${JSON.stringify(Object.fromEntries(response.headers.entries()), null, 2)}` },
925
+ { type: "text", text: `Body:\n${responseBody}` }
926
+ ]
927
+ };
928
+ }
929
+ catch (error) {
930
+ return { content: [{ type: "text", text: `curl failed: ${error instanceof Error ? error.message : error}` }] };
931
+ }
932
+ });
790
933
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-tools-mcp",
3
- "version": "3.0.15",
3
+ "version": "3.0.17",
4
4
  "description": "MCP server providing access to various IT tools and utilities for developers",
5
5
  "type": "module",
6
6
  "main": "./build/index.js",
@@ -84,6 +84,7 @@
84
84
  "marked": "^15.0.12",
85
85
  "mathjs": "^14.5.2",
86
86
  "mime-types": "^3.0.1",
87
+ "node-fetch": "^3.3.2",
87
88
  "papaparse": "^5.5.3",
88
89
  "ping": "^0.4.4",
89
90
  "ps-list": "^8.1.1",