it-tools-mcp 3.0.14 → 3.0.16

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,13 +4,13 @@
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 **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.
8
8
 
9
9
  ## Using with VS Code
10
10
 
11
11
  Add to your VS Code `settings.json`:
12
12
 
13
- *Node*
13
+ ### Node
14
14
 
15
15
  ```json
16
16
  {
@@ -29,7 +29,7 @@ Add to your VS Code `settings.json`:
29
29
  }
30
30
  ```
31
31
 
32
- *Docker*
32
+ #### Docker
33
33
 
34
34
  ```json
35
35
  {
@@ -56,17 +56,19 @@ 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 87 tools with detailed parameters on [GitHub](https://github.com/wrenchpilot/it-tools-mcp#available-tools)
60
60
 
61
61
  ## šŸ“ø Examples in Action
62
62
 
63
63
  ### Password Hash Generation
64
+
64
65
  ![Password Hash Example](https://raw.githubusercontent.com/wrenchpilot/it-tools-mcp/master/screenshots/password-hash-example.png)
65
66
 
66
67
  ### ASCII Art Text Generation
68
+
67
69
  ![ASCII Art Text Example](https://raw.githubusercontent.com/wrenchpilot/it-tools-mcp/master/screenshots/ascii-art-text-example.png)
68
70
 
69
- *Examples of using the IT Tools MCP server with VS Code Copilot Chat*
71
+ #### Examples of using the IT Tools MCP server with VS Code Copilot Chat
70
72
 
71
73
  ## šŸ—ļø Architecture
72
74
 
@@ -76,7 +78,7 @@ Built with **TypeScript**, **Zod** validation, and **MCP SDK** for robust, type-
76
78
 
77
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:
78
80
 
79
- - šŸ”§ **All 86 tools** designed and implemented with AI assistance
81
+ - šŸ”§ **All 87 tools** designed and implemented with AI assistance
80
82
  - šŸ“¦ **Complete Docker setup** with GitHub Actions CI/CD pipeline
81
83
  - šŸ” **Schema optimization** with systematic validation cleanup
82
84
  - šŸ“š **Comprehensive documentation** and tool catalogs
package/README.md CHANGED
@@ -14,7 +14,7 @@ A comprehensive Model Context Protocol (MCP) server that provides access to 86 I
14
14
 
15
15
  Add to your VS Code `settings.json`:
16
16
 
17
- *Node*
17
+ #### Node
18
18
 
19
19
  ```json
20
20
  {
@@ -33,7 +33,7 @@ Add to your VS Code `settings.json`:
33
33
  }
34
34
  ```
35
35
 
36
- *Docker*
36
+ #### Docker
37
37
 
38
38
  ```json
39
39
  {
@@ -101,7 +101,7 @@ This MCP server provides **86 tools** across **8 categories**:
101
101
 
102
102
  ![ASCII Art Text Example](screenshots/ascii-art-text-example.png)
103
103
 
104
- *Examples of using the IT Tools MCP server with VS Code Copilot Chat for secure password hashing and creative ASCII art generation*
104
+ Examples of using the IT Tools MCP server with VS Code Copilot Chat for secure password hashing and creative ASCII art generation.
105
105
 
106
106
  ## Available Tools
107
107
 
@@ -171,12 +171,13 @@ This MCP server provides **86 tools** across **8 categories**:
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` |
177
178
  | `url-parse` | Parse URL components | `url: string` |
178
179
  | `random-port` | Generate random ports | `count?: number`, `min?: number`, `max?: number`, `exclude?: number[]` |
179
- | `mac-address-generate` | Generate MAC address | `prefix?: string`, `separator?: ':' | '-'` |
180
+ | `mac-address-generate` | Generate MAC address | `prefix?: string`, `separator?: ':' \| '-'` |
180
181
  | `phone-format` | Parse and format phone numbers | `phoneNumber: string`, `countryCode?: string` |
181
182
  | `iban-validate` | Validate IBAN | `iban: string` |
182
183
  | **Math & Calculations** | | |
@@ -78,18 +78,18 @@ For production use, please use a proper ULID library.`,
78
78
  console.log(`[DEBUG] QR code generated successfully`);
79
79
  // Extract just the base64 data (remove the data:image/png;base64, prefix)
80
80
  const base64Data = dataUrl.split(',')[1];
81
+ const markdown = `![QR Code](data:image/png;base64,${base64Data})`;
81
82
  return {
82
83
  content: [
83
84
  {
84
85
  type: "text",
85
86
  text: `šŸ“± QR Code for: "${text}"
86
-
87
- šŸ“Š Data encoded: "${text}" (${text.length} characters)
87
+ \nšŸ“Š Data encoded: "${text}" (${text.length} characters)
88
88
  šŸŽÆ Error correction: Medium (M)
89
89
  šŸ“ Image size: ${Math.max(256, size * 128)}x${Math.max(256, size * 128)} pixels
90
-
91
- āœ… This QR code can be scanned with any QR code reader app
92
- šŸ’” Generated using the 'qrcode' npm library!`,
90
+ \nāœ… This QR code can be scanned with any QR code reader app
91
+ šŸ’” Generated using the 'qrcode' npm library!
92
+ \n---\n**Markdown for inline display:**\n${markdown}`,
93
93
  },
94
94
  {
95
95
  type: "image",
@@ -110,6 +110,15 @@ For production use, please use a proper ULID library.`,
110
110
  ],
111
111
  };
112
112
  }
113
+ // Fallback return in case of unexpected behavior
114
+ return {
115
+ content: [
116
+ {
117
+ type: "text",
118
+ text: "Unknown error: No response generated by qr-generate.",
119
+ },
120
+ ],
121
+ };
113
122
  });
114
123
  // SVG placeholder generator
115
124
  server.tool("svg-placeholder-generator", "Generate SVG placeholder images", {
@@ -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,99 @@ 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
+ });
790
885
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "it-tools-mcp",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
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",