Skip to main content
Glama

IT Tools MCP Server

index.ts•1.45 kB
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { createHmac } from "crypto"; import { z } from "zod"; export function registerGenerateHmac(server: McpServer) { server.registerTool("generate_hmac", { description: "Generate HMAC (Hash-based Message Authentication Code)", inputSchema: { message: z.string().describe("Message to authenticate"), key: z.string().describe("Secret key for HMAC"), algorithm: z.enum(["sha1", "sha256", "sha512"]).describe("Hash algorithm").optional(), }, // VS Code compliance annotations annotations: { title: "Generate Hmac", description: "Generate HMAC (Hash-based Message Authentication Code)", readOnlyHint: false } }, async ({ message, key, algorithm = "sha256" }) => { try { const hmac = createHmac(algorithm, key); hmac.update(message); const result = hmac.digest('hex'); return { content: [ { type: "text", text: `HMAC-${algorithm.toUpperCase()}: ${result} Message: ${message} Key: ${key} Algorithm: ${algorithm.toUpperCase()}`, }, ], }; } catch (error) { return { content: [ { type: "text", text: `Error generating HMAC: ${error instanceof Error ? error.message : 'Unknown error'}`, }, ], }; } } ); }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/wrenchpilot/it-tools-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server