Rubyhash
About
MCP server that diffs Ruby hashes for AI coding agents. Paste failing Minitest/RSpec output and get exactly what changed: added, removed, and changed keys with type-change detection. Runs 100% locally, nothing uploaded. From rubyhash.dev
Details
- Author
- builtbyproxy
- Downloads
- 275
- Categories
- Developer Tools
Jump to
- MCP server integration
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
RubyhashCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
The README includes setup instructions such as "command": "npx",.
ruby_hash_diff
Compare two Ruby hash literals and return exactly what changed: changed values with before/after, added and removed keys, and explicit type changes (nil to String, Integer to Float, symbol vs string keys). Pass either `expected` and `actual` as Ruby hash strings, or pass raw failing Minitest/RSpec output in `raw` and the first two hash literals found will be compared. Much cheaper and more reliable than eyeballing large nested hashes in test output.
ruby_to_json
Parse a Ruby hash or array literal (hashrockets, symbol keys, shorthand syntax, nesting, nil/true/false) and return clean JSON with alphabetically sorted keys. Symbols are rendered as ":name" strings.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"rubyhash": {
"rubyhash": {
"command": "npx",
"args": [
"-y",
"rubyhash-mcp"
]
}
}
}
}
McpServers
{
"rubyhash": {
"command": "npx",
"args": [
"-y",
"rubyhash-mcp"
]
}
}
rubyhash-mcp
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.
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"=>"u@example.test", "role"=>"admin", "seats"=>3}
+{"uid"=>"u@example.test", "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.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





