Sponsored by Deepsite.site

Md5 Calculator

Created By
tanker3279 months ago
Content

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

# 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.

Server Config

{
  "mcpServers": {
    "md5-calculator": {
      "command": "npx",
      "args": [
        "md5-mcp"
      ]
    }
  }
}
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Playwright McpPlaywright MCP server
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
CursorThe AI Code Editor
Tavily Mcp
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
ChatWiseThe second fastest AI chatbot™
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
DeepChatYour AI Partner on Desktop
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Serper MCP ServerA Serper MCP Server
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Amap Maps高德地图官方 MCP Server
WindsurfThe new purpose-built IDE to harness magic
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.