Cover image
Try Now
2025-04-03

3 years

Works with Finder

1

Github Watches

0

Github Forks

1

Github Stars

MD5-MCP: MD5 Hash Calculator MCP Provider

A Model Context Protocol (MCP) provider for calculating MD5 hashes from various data types. This provider provides tools to calculate MD5 hashes from strings, JSON data, and base64-encoded binary data.

Features

  • Calculate MD5 hashes from plain text strings with optional whitespace trimming
  • Calculate MD5 hashes from various JSON data types (strings, numbers, booleans, objects, arrays)
  • Calculate MD5 hashes from base64-encoded binary data
  • Control formatting options (like preserving whitespace or JSON formatting)
  • Easy integration with Claude and other MCP-compatible clients

Installation

NPM Global Installation (Recommended)

# Install globally
npm install -g md5-mcp

# Run the provider directly
md5-mcp

Local Installation

# Install locally in your project
npm install md5-mcp

# Add to your package.json scripts
# "scripts": {
#   "start-md5": "md5-mcp"
# }

Manual Installation

# Clone the repository
git clone https://github.com/tanker327/md5-mcp.git
cd md5-mcp

# Install dependencies
npm install

# Build the project
npm run build

# Start the provider
npm start

Usage

Starting the provider

If installed globally:

md5-mcp

If installed locally:

npx md5-mcp

This will start the MCP provider using the stdio transport, which allows it to be used with MCP clients like Claude for Desktop.

Configuring with Claude for Desktop

Add the following to your Claude for Desktop configuration:

{
    "mcpServers": {
        "md5-calculator": {
            "command": "npx",
            "args": ["md5-mcp"]
        }
    }
}

If you installed globally, you can simplify to:

{
    "mcpServers": {
        "md5-calculator": {
            "command": "md5-mcp"
        }
    }
}

Available Tools

1. calculateMD5

Calculates an MD5 hash from a string input.

Parameters:

  • input (string): The string to calculate an MD5 hash for
  • trimWhitespace (boolean, optional): Whether to trim whitespace from the input before hashing (default: false)

Example:

@md5-calculator calculateMD5 --input="Hello, World!" --trimWhitespace=false

2. calculateJSONMD5

Calculates an MD5 hash from JSON data.

Parameters:

  • jsonData (any JSON type): JSON data (string, number, boolean, object, or array) to hash
  • preserveFormatting (boolean, optional): Whether to preserve JSON formatting or compact it before hashing (default: true)

Example:

@md5-calculator calculateJSONMD5 --jsonData={"name": "John", "age": 30} --preserveFormatting=true

3. calculateBase64MD5

Calculates an MD5 hash from base64-encoded binary data.

Parameters:

  • base64Data (string): Base64-encoded binary data to calculate an MD5 hash for

Example:

@md5-calculator calculateBase64MD5 --base64Data="SGVsbG8sIFdvcmxkIQ=="

Important Notes on MD5 Hashing

  • MD5 is sensitive to every character, including whitespace. Strings with and without trailing spaces will produce different hashes.
  • When hashing JSON objects, the formatting (indentation, line breaks, etc.) affects the hash. Use the preserveFormatting option to control this behavior.
  • MD5 is no longer considered cryptographically secure for sensitive applications. It is suitable for data integrity checks but not for security-critical applications.

Programmatic API

You can also use this package programmatically in your Node.js applications:

import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";

// Create a transport that starts the provider as a child process
const transport = new StdioClientTransport({
    command: "npx",
    args: ["md5-mcp"],
});

// Create a client
const client = new Client(
    { name: "my-app", version: "1.0.0" },
    { capabilities: { resources: {}, prompts: {}, tools: {} } }
);

// Connect to the provider
await client.connect(transport);

// Calculate MD5 hash
const result = await client.callTool({
    name: "calculateMD5",
    arguments: {
        input: "Hello, World!",
        trimWhitespace: false,
    },
});

console.log(result.content[0].text);

// Don't forget to disconnect when done
await client.disconnect();

Development

Running in development mode

npm run dev

This starts TypeScript in watch mode, automatically recompiling when files change.

Running tests

npm test

Publishing to npm

To publish a new version:

# Update version in package.json
npm version patch # or minor, or major

# Publish to npm
npm publish

The prepublishOnly script will automatically run tests and build the project before publishing.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • apappascs
  • Descubra la colección más completa y actualizada de servidores MCP en el mercado. Este repositorio sirve como un centro centralizado, que ofrece un extenso catálogo de servidores MCP de código abierto y propietarios, completos con características, enlaces de documentación y colaboradores.

  • ShrimpingIt
  • Manipulación basada en Micrypthon I2C del expansor GPIO de la serie MCP, derivada de AdaFruit_MCP230xx

  • pontusab
  • La comunidad de cursor y windsurf, encontrar reglas y MCP

  • ravitemer
  • Un poderoso complemento Neovim para administrar servidores MCP (protocolo de contexto del modelo)

  • jae-jae
  • Servidor MCP para obtener contenido de la página web con el navegador sin cabeza de dramaturgo.

  • patruff
  • Puente entre los servidores Ollama y MCP, lo que permite a LLM locales utilizar herramientas de protocolo de contexto del modelo

  • HiveNexus
  • Un bot de chat de IA para equipos pequeños y medianos, que apoyan modelos como Deepseek, Open AI, Claude y Gemini. 专为中小团队设计的 ai 聊天应用 , 支持 Deepseek 、 Open ai 、 Claude 、 Géminis 等模型。

  • JackKuo666
  • 🔍 Habilitar asistentes de IA para buscar y acceder a la información del paquete PYPI a través de una interfaz MCP simple.

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

    Reviews

    2 (1)
    Avatar
    user_bI4GwPtc
    2025-04-16

    As a devoted user of md5-mcp, I must say this tool developed by tanker327 is a game-changer. Its simplicity and efficiency in handling MD5 hash functions make it a must-have for developers. Highly recommend checking it out on GitHub!