Rubyhash
FreeNot checkedEnables comparing Ruby hash literals and converting Ruby hashes to JSON with deterministic diff reports, running locally for privacy.
About
Enables comparing Ruby hash literals and converting Ruby hashes to JSON with deterministic diff reports, running locally for privacy.
README
MCP server for RubyHash. Gives any MCP-capable agent (Claude Code, Claude Desktop, Cursor, and others) two deterministic Ruby tools:
- ruby_hash_diff: compare two Ruby hash literals, or paste raw failing Minitest/RSpec output, and get a structured report of exactly what changed: changed values with before and after, added and removed keys, and explicit type changes (nil to String, Integer to Float, symbol keys vs string keys).
- ruby_to_json: convert a Ruby hash or array literal (hashrockets, symbol keys, shorthand syntax, nesting, nil/true/false) to clean JSON with sorted keys.
Everything runs locally in the server process. Nothing is uploaded, logged, or stored, the same privacy promise as rubyhash.dev.
Tools
ruby_hash_diff: Compare two Ruby hash literals, or paste raw failing Minitest/RSpec output, and get a structured report: changed values with before and after, added and removed keys, and explicit type changes (nil to String, Integer to Float, symbol keys vs string keys).ruby_to_json: Convert a Ruby hash or array literal (hashrockets, symbol keys, shorthand syntax, nesting, nil/true/false) to clean JSON with alphabetically sorted keys.
Why an agent would want this
When a Ruby test fails on two large nearly identical hashes, comparing them by reading is slow and error prone, for humans and for language models. A 40-key nested hash diff burns context and invites mistakes. This server does the comparison with a real recursive descent parser and hands back only the differences, deterministically.
Install
{
"mcpServers": {
"rubyhash": {
"command": "npx",
"args": ["-y", "rubyhash-mcp"]
}
}
}
Or for Claude Code:
claude mcp add rubyhash -- npx -y rubyhash-mcp
Example
Input (raw test output):
-{"uid"=>"[email protected]", "role"=>"admin", "seats"=>3}
+{"uid"=>"[email protected]", "role"=>"editor", "seats"=>3.0}
Output:
{
"equal": false,
"summary": "2 changed, 0 added, 0 removed, 1 type change",
"changed": [
{ "path": "role", "before": "admin", "after": "editor", "typeChanged": false },
{ "path": "seats", "before": 3, "after": 3, "beforeType": "Integer", "afterType": "Float", "typeChanged": true }
]
}
Also available as an HTTP API
If you cannot run a local MCP server, the same tools are exposed at the RubyHash Agent API, with an OpenAPI description and an x402 machine-payable catalog.
Development
npm install
npm test # 36 unit tests
License
MIT for this package. The rubyhash.dev site and its browser tool are separate, private, and all rights reserved.
Install Rubyhash in Claude Desktop, Claude Code & Cursor
unyly install rubyhash-mcpInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add rubyhash-mcp -- npx -y rubyhash-mcpFAQ
Is Rubyhash MCP free?
Yes, Rubyhash MCP is free — one-click install via Unyly at no cost.
Does Rubyhash need an API key?
No, Rubyhash runs without API keys or environment variables.
Is Rubyhash hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Rubyhash in Claude Desktop, Claude Code or Cursor?
Open Rubyhash on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Rubyhash with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
