mcp-hash mcp
v1.0.2 · MCP Tool · security · registry.pascalai.org
Cryptographic and checksum hashing. Operations: hash (string), file_hash (file), compare (two strings, two files, or string vs file). Algorithms: md5, sha1, sha256 (default), sha384, sha512, crc32. Output encoding: hex (default) or base64. Pure RTL, no external dependencies.
hashmd5sha1sha256sha512crc32checksumcrypto
Input Parameters
| Parameter | Type | Description |
| operationrequired |
string |
hash: hash a string. file_hash: hash a file. compare: compare hashes of two items. One of: hash, file_hash, compare. |
| algooptional |
string |
Hash algorithm. Default: sha256. One of: md5, sha1, sha256, sha384, sha512, crc32. Default: sha256. |
| valueoptional |
string |
String to hash. Required for hash; used in compare. |
| value2optional |
string |
Second string to compare (for compare with two strings). |
| filePathoptional |
string |
File path to hash. Required for file_hash; used in compare. |
| filePath2optional |
string |
Second file path (for compare with two files). |
| encodingoptional |
string |
Output encoding. Default: hex. One of: hex, base64. Default: hex. |
Output Fields
| Field | Type | Description |
| ok |
boolean |
|
| algo |
string |
|
| encoding |
string |
|
| hash |
string |
Hash result (hash and file_hash) |
| hash1 |
string |
First hash (compare) |
| hash2 |
string |
Second hash (compare) |
| match |
boolean |
True if hash1 == hash2 (compare) |
| filepath |
string |
|
| size |
integer |
File size in bytes (file_hash) |
| error |
string |
|
Examples
Hash a string with SHA-256
// Input
{
"operation": "hash",
"value": "Hello, World!",
"algo": "sha256"
}
// Output
{
"ok": true,
"algo": "sha256",
"encoding": "hex",
"hash": "dffd6021bb2bd5b0af676290809ec3a53191dd81c7f70a4b28688a362182986d"
}
Hash a file with MD5
// Input
{
"operation": "file_hash",
"filepath": "C:/project/setup.exe",
"algo": "md5"
}
// Output
{
"ok": true,
"algo": "md5",
"encoding": "hex",
"hash": "abc123...",
"size": 1048576
}
Compare two strings
// Input
{
"operation": "compare",
"value": "secret",
"value2": "secret",
"algo": "sha256"
}
// Output
{
"ok": true,
"algo": "sha256",
"match": true
}
Install & Discovery
Install
ppm install mcp-hash
Get JSON Schema
GET /v1/packages/mcp-hash/1.0.2/schema
Discover by keyword
GET /v1/mcp/discover?q=hash
Discovery hint: Install with ppm install mcp-hash or invoke remotely via POST /v1/invoke/mcp-hash on the MCP Service.
PascalAI Usage
uses toolslib;
var Tool := LoadTool('mcp-hash');
var R := Tool.Call(JsonObj(['operation','hash','value','hello','algo','sha256']));
Writeln(R.ToJSON);