hash-md5
Generate an MD5 hash from any input text for data integrity checks, password storage, or unique identifier creation with this straightforward hashing tool.
Instructions
Generate MD5 hash
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to hash with MD5 |
Implementation Reference
- src/tools/crypto/hash_md5/index.ts:17-29 (handler)Handler function that computes the MD5 hash of the input text using Node's crypto.createHash and returns the result in MCP content format.}, async ({ text }) => { const hash = createHash('md5'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `MD5 hash: ${result}`, }, ], }; }
- Input schema defining the 'text' parameter as a string.inputSchema: { text: z.string().describe("Text to hash with MD5"), },
- src/tools/crypto/hash_md5/index.ts:5-31 (registration)Registration function that registers the 'hash_md5' tool with the MCP server, including description, input schema, annotations, and handler.export function registerHashMd5(server: McpServer) { server.registerTool("hash_md5", { description: "Generate MD5 hash", inputSchema: { text: z.string().describe("Text to hash with MD5"), }, // VS Code compliance annotations annotations: { title: "Hash Md5", description: "Generate MD5 hash", readOnlyHint: false } }, async ({ text }) => { const hash = createHash('md5'); hash.update(text); const result = hash.digest('hex'); return { content: [ { type: "text", text: `MD5 hash: ${result}`, }, ], }; } ); }