Skip to content

Commit f7fa7c9

Browse files
committed
add des
1 parent ab80839 commit f7fa7c9

File tree

5 files changed

+583
-10
lines changed

5 files changed

+583
-10
lines changed

demo/demo.gif

1.39 MB
Loading

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "crypto-mcp",
3-
"version": "1.0.0",
3+
"version": "1.0.2",
44
"description": "A Model Context Protocol (MCP) server for encrypting/decrypting/algorithm/hash",
55
"type": "module",
66
"bin": {

readme.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,37 @@
55
<strong>A Model Context Protocol (MCP) server for encrypting/decrypting/algorithm/hash</strong>
66
</p>
77
<p>
8-
<img src="https://img.shields.io/badge/version-1.0.1-blue.svg" alt="Version">
8+
<img src="https://img.shields.io/badge/version-1.0.2-blue.svg" alt="Version">
99
<img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License">
1010
<a href="https://smithery.ai/server/@1595901624/crypto-mcp"><img alt="Smithery Badge" src="https://smithery.ai/badge/@1595901624/crypto-mcp"></a>
1111
</p>
1212
</div>
1313

1414
## 📝 Description
1515

16-
A Model Context Protocol (MCP) server for encrypting and decrypting text with AES.
16+
A Model Context Protocol (MCP) server for encrypting/decrypting/algorithm/hash.
17+
18+
## 📺 Demo
19+
20+
![Demo](./demo/demo.gif)
1721

1822
## ✨ Features
1923

20-
- [x] Support AES encryption and decryption (128 key length)
24+
- [x] Support AES encryption and decryption (128 bits)
2125
- Support mode: ECB, CBC, CFB, OFB, CTR
2226
- Support padding mode: Pkcs7, Iso97971, AnsiX923, Iso10126, ZeroPadding, NoPadding.
2327
- Support output format: base64, hex
2428
- Support input format: base64, hex
2529
- [x] Support MD5, SHA1, SHA256, SHA384, SHA512, SHA224 algorithm
30+
- [x] Support DES encryption and decryption (64 bits)
31+
- Support mode: ECB, CBC, CFB, OFB, CTR
32+
- Support padding mode: Pkcs7, Iso97971, AnsiX923, Iso10126, ZeroPadding, NoPadding.
33+
- Support output format: base64, hex
34+
- Support input format: base64, hex
2635

2736
## 🔮 Comming Soon
2837

29-
- [ ] Support DES encryption and decryption
30-
- [ ] Support RSA encryption and decryption
38+
- [ ] Support more encryption and decryption algorithms
3139

3240
## 📦 Installation
3341

@@ -40,6 +48,7 @@ npx -y @smithery/cli install @1595901624/crypto-mcp --client claude
4048
```
4149

4250
### Manual Installation
51+
4352
1. Clone the Repository
4453

4554
```
@@ -58,9 +67,7 @@ pnpm install
5867
pnpm run build
5968
```
6069

61-
## 🔧 Configuration
62-
63-
Add to your Cline MCP settings file
70+
4. Add to your Claude Desktop MCP settings file
6471

6572
```
6673
{
@@ -75,7 +82,7 @@ Add to your Cline MCP settings file
7582
}
7683
```
7784

78-
## 📝 Usage
85+
## 🔧 Usage
7986

8087
### Available Tools
8188

@@ -133,6 +140,28 @@ Add to your Cline MCP settings file
133140

134141
- `input`: The input string to hash (**Required**)
135142

143+
#### DES
144+
145+
- `des_encrypt`: Encrypt text with DES
146+
parameters:
147+
148+
- `text`: The text to encrypt (**Required**)
149+
- `key`: The key to encrypt the text (optional, default is your-key)
150+
- `padding`: The padding mode (optional, default is Pkcs7)
151+
- `outputFormat`: The output format (optional, default is base64)
152+
- `iv`: The initialization vector (optional, default is your-iv-)
153+
- `mode`: The mode to encrypt the text (optional, default is ECB)
154+
155+
- `des_decrypt`: Decrypt text with DES
156+
parameters:
157+
158+
- `text`: The text to decrypt (**Required**)
159+
- `key`: The key to decrypt the text (optional, default is your-key)
160+
- `padding`: The padding mode (optional, default is Pkcs7)
161+
- `inputFormat`: The input format (optional, default is base64)
162+
- `iv`: The initialization vector (optional, default is your-iv-)
163+
- `mode`: The mode to decrypt the text (optional, default is ECB)
164+
136165
## 📝 Development
137166

138167
```

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
22
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
33
import { registerAESTool } from "./service/aes.js";
44
import { registerDigestTool } from "./service/digest.js";
5+
import { registerDESTool } from "./service/des.js";
56
// Create an MCP server
67
const server = new McpServer({
78
name: "crypto-mcp",
@@ -11,6 +12,7 @@ const server = new McpServer({
1112
// Register tools
1213
registerAESTool(server);
1314
registerDigestTool(server);
15+
registerDESTool(server);
1416
/*
1517
* Start the server using stdio transport.
1618
*/

0 commit comments

Comments
 (0)