@utilix-tech/mcp 0.40.0 → 0.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/README.md +6 -3
- package/dist/index.js +101 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Full release notes for all Utilix surfaces (browser tools, REST API, SDKs, MCP server) live at [utilix.tech/changelog](https://utilix.tech/changelog). This file tracks just this package.
|
|
4
4
|
|
|
5
|
+
## 0.41.0
|
|
6
|
+
- Add `calculate_cash_breakdown`, `calculate_change` tools: break a cash amount down into the minimum count of bills/coins from a set of denominations (largest first), or compute change owed for a payment/tender pair and its breakdown.
|
|
7
|
+
- Add `generate_etag` tool: compute a content-hash ETag (MD5/SHA-1/SHA-256) for a response header, with an optional weak-validator (W/) prefix.
|
|
8
|
+
|
|
5
9
|
## 0.40.0
|
|
6
10
|
- Add `generate_sri_hash` tool: compute SHA-256/384/512 Subresource Integrity hashes for a script or stylesheet's content, formatted as the `<algorithm>-<base64>` string an HTML `integrity` attribute expects.
|
|
7
11
|
- Add `analyze_email_headers` tool: parse a raw email header block into structured From/To/Subject fields, the Received hop chain in order, and SPF/DKIM/DMARC results from an Authentication-Results header.
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @utilix-tech/mcp
|
|
2
2
|
|
|
3
|
-
MCP server exposing
|
|
3
|
+
MCP server exposing 168 developer utility tools to Claude, Cursor, VS Code Copilot, and any [Model Context Protocol](https://modelcontextprotocol.io) compatible AI assistant.
|
|
4
4
|
|
|
5
5
|
No API key required. All tools run locally. Requires Node.js 18 or later.
|
|
6
6
|
|
|
@@ -110,7 +110,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
110
110
|
| `base62_encode` | Encode text as Base62 (alphanumeric, URL-safe) |
|
|
111
111
|
| `base62_decode` | Decode a Base62 string back to text |
|
|
112
112
|
|
|
113
|
-
### Hashing (
|
|
113
|
+
### Hashing (6 tools)
|
|
114
114
|
| Tool | Description |
|
|
115
115
|
|------|-------------|
|
|
116
116
|
| `hash` | Hash a string with MD5, SHA-1, SHA-256, SHA-384, or SHA-512 |
|
|
@@ -118,6 +118,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
118
118
|
| `bcrypt_hash` | Hash a password using bcrypt |
|
|
119
119
|
| `bcrypt_verify` | Verify a password against a bcrypt hash |
|
|
120
120
|
| `generate_sri_hash` | Compute a Subresource Integrity hash (SHA-256/384/512) for a script or stylesheet's content, formatted for an HTML `integrity` attribute |
|
|
121
|
+
| `generate_etag` | Compute a content-hash ETag (MD5/SHA-1/SHA-256) for a response header, with an optional weak-validator prefix |
|
|
121
122
|
|
|
122
123
|
### Generators (6 tools)
|
|
123
124
|
| Tool | Description |
|
|
@@ -158,7 +159,7 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
158
159
|
| `convert_timezone` | Convert a date/time between timezones |
|
|
159
160
|
| `convert_iso8601_duration` | Parse an ISO 8601 duration into components and total seconds, or format seconds into a duration string |
|
|
160
161
|
|
|
161
|
-
### Units (
|
|
162
|
+
### Units (26 tools)
|
|
162
163
|
| Tool | Description |
|
|
163
164
|
|------|-------------|
|
|
164
165
|
| `convert_bytes` | Convert between B, KB, MB, GB, TB, KiB, MiB, GiB, TiB |
|
|
@@ -185,6 +186,8 @@ claude mcp add utilix -- npx -y @utilix-tech/mcp
|
|
|
185
186
|
| `calculate_savings_goal` | Solve for months to reach a savings goal at a fixed monthly contribution, or the monthly contribution required to hit a goal by a target month count |
|
|
186
187
|
| `calculate_roi` | Compute return on investment percent from an initial and final value, plus the annualized (CAGR) return given an optional holding period in years |
|
|
187
188
|
| `compare_unit_prices` | Compare two or more package options by price and quantity to find the true cost per unit, flag the cheapest, and report how much more expensive each other option is |
|
|
189
|
+
| `calculate_cash_breakdown` | Break a cash amount down into the minimum count of bills/coins from a set of denominations, largest first |
|
|
190
|
+
| `calculate_change` | Compute change owed for a payment/tender pair and break it down into the minimum count of bills/coins |
|
|
188
191
|
|
|
189
192
|
### API / Network (16 tools)
|
|
190
193
|
| Tool | Description |
|
package/dist/index.js
CHANGED
|
@@ -6830,5 +6830,106 @@ server.tool(
|
|
|
6830
6830
|
return text(JSON.stringify(result, null, 2));
|
|
6831
6831
|
}
|
|
6832
6832
|
);
|
|
6833
|
+
var _USD_DENOMINATIONS_MCP = [100, 50, 20, 10, 5, 1, 0.25, 0.1, 0.05, 0.01];
|
|
6834
|
+
function _cashToCentsMcp(n) {
|
|
6835
|
+
return Math.round(n * 100);
|
|
6836
|
+
}
|
|
6837
|
+
function _calculateCashBreakdownMcp(amount, denominations) {
|
|
6838
|
+
if (!Number.isFinite(amount) || amount < 0) return { error: "Amount must be zero or a positive number" };
|
|
6839
|
+
if (denominations.length === 0) return { error: "At least one denomination is required" };
|
|
6840
|
+
for (const d of denominations) {
|
|
6841
|
+
if (!Number.isFinite(d) || d <= 0) return { error: "Each denomination must be a positive number" };
|
|
6842
|
+
}
|
|
6843
|
+
const round2 = (n) => Math.round(n * 100) / 100;
|
|
6844
|
+
const sorted = Array.from(new Set(denominations)).sort((a, b) => b - a);
|
|
6845
|
+
let remainingCents = _cashToCentsMcp(amount);
|
|
6846
|
+
const breakdown = [];
|
|
6847
|
+
let totalCount = 0;
|
|
6848
|
+
for (const d of sorted) {
|
|
6849
|
+
const dCents = _cashToCentsMcp(d);
|
|
6850
|
+
const count = Math.floor(remainingCents / dCents);
|
|
6851
|
+
if (count > 0) {
|
|
6852
|
+
breakdown.push({ denomination: d, count, subtotal: round2(count * d) });
|
|
6853
|
+
remainingCents -= count * dCents;
|
|
6854
|
+
totalCount += count;
|
|
6855
|
+
}
|
|
6856
|
+
}
|
|
6857
|
+
return {
|
|
6858
|
+
amount: round2(amount),
|
|
6859
|
+
denominations: sorted,
|
|
6860
|
+
breakdown,
|
|
6861
|
+
totalCount,
|
|
6862
|
+
remainder: round2(remainingCents / 100)
|
|
6863
|
+
};
|
|
6864
|
+
}
|
|
6865
|
+
server.tool(
|
|
6866
|
+
"calculate_cash_breakdown",
|
|
6867
|
+
"Break a cash amount down into the minimum count of bills/coins from a set of denominations, using the standard greedy largest-first approach (optimal for canonical currency denomination sets like USD, EUR, and GBP). Any amount that can't be represented exactly with the given denominations is reported as a remainder rather than rounded away.",
|
|
6868
|
+
{
|
|
6869
|
+
amount: z.number().describe("The cash amount to break down"),
|
|
6870
|
+
denominations: z.array(z.number()).min(1).optional().describe("Available bill/coin denominations, largest to smallest (defaults to US denominations: 100, 50, 20, 10, 5, 1, 0.25, 0.1, 0.05, 0.01)")
|
|
6871
|
+
},
|
|
6872
|
+
async ({ amount, denominations }) => {
|
|
6873
|
+
const result = _calculateCashBreakdownMcp(amount, denominations && denominations.length > 0 ? denominations : _USD_DENOMINATIONS_MCP);
|
|
6874
|
+
if ("error" in result) return errText(result);
|
|
6875
|
+
return text(JSON.stringify(result, null, 2));
|
|
6876
|
+
}
|
|
6877
|
+
);
|
|
6878
|
+
server.tool(
|
|
6879
|
+
"calculate_change",
|
|
6880
|
+
"Compute the change owed for a payment/tender pair (amount tendered minus amount due) and break that change down into the minimum count of bills/coins from the given denominations.",
|
|
6881
|
+
{
|
|
6882
|
+
amountDue: z.number().describe("The amount owed"),
|
|
6883
|
+
amountTendered: z.number().describe("The amount paid, must be greater than or equal to amountDue"),
|
|
6884
|
+
denominations: z.array(z.number()).min(1).optional().describe("Available bill/coin denominations, largest to smallest (defaults to US denominations: 100, 50, 20, 10, 5, 1, 0.25, 0.1, 0.05, 0.01)")
|
|
6885
|
+
},
|
|
6886
|
+
async ({ amountDue, amountTendered, denominations }) => {
|
|
6887
|
+
if (!Number.isFinite(amountDue) || amountDue < 0) return errText({ error: "Amount due must be zero or a positive number" });
|
|
6888
|
+
if (!Number.isFinite(amountTendered) || amountTendered < 0) return errText({ error: "Amount tendered must be zero or a positive number" });
|
|
6889
|
+
if (_cashToCentsMcp(amountTendered) < _cashToCentsMcp(amountDue)) {
|
|
6890
|
+
return errText({ error: "Amount tendered must be greater than or equal to the amount due" });
|
|
6891
|
+
}
|
|
6892
|
+
const round2 = (n) => Math.round(n * 100) / 100;
|
|
6893
|
+
const denoms = denominations && denominations.length > 0 ? denominations : _USD_DENOMINATIONS_MCP;
|
|
6894
|
+
const changeDue = round2(amountTendered - amountDue);
|
|
6895
|
+
const breakdown = _calculateCashBreakdownMcp(changeDue, denoms);
|
|
6896
|
+
if ("error" in breakdown) return errText(breakdown);
|
|
6897
|
+
return text(JSON.stringify({
|
|
6898
|
+
amountDue: round2(amountDue),
|
|
6899
|
+
amountTendered: round2(amountTendered),
|
|
6900
|
+
changeDue,
|
|
6901
|
+
denominations: breakdown.denominations,
|
|
6902
|
+
breakdown: breakdown.breakdown,
|
|
6903
|
+
totalCount: breakdown.totalCount,
|
|
6904
|
+
remainder: breakdown.remainder
|
|
6905
|
+
}, null, 2));
|
|
6906
|
+
}
|
|
6907
|
+
);
|
|
6908
|
+
var _ETAG_ALGORITHMS_MCP = ["MD5", "SHA-1", "SHA-256"];
|
|
6909
|
+
var _ETAG_NODE_ALG_MAP_MCP = { "MD5": "md5", "SHA-1": "sha1", "SHA-256": "sha256" };
|
|
6910
|
+
function _generateEtagMcp(content, algorithm, weak) {
|
|
6911
|
+
if (content.length === 0) return { error: "Content is required" };
|
|
6912
|
+
if (!_ETAG_ALGORITHMS_MCP.includes(algorithm)) {
|
|
6913
|
+
return { error: `Unknown algorithm: ${algorithm}. Must be one of ${_ETAG_ALGORITHMS_MCP.join(", ")}` };
|
|
6914
|
+
}
|
|
6915
|
+
const hash = createHash(_ETAG_NODE_ALG_MAP_MCP[algorithm]).update(content, "utf8").digest("hex");
|
|
6916
|
+
const quoted = `"${hash}"`;
|
|
6917
|
+
const etag = weak ? `W/${quoted}` : quoted;
|
|
6918
|
+
return { algorithm, weak, hash, etag, headerName: "ETag", snippet: `ETag: ${etag}` };
|
|
6919
|
+
}
|
|
6920
|
+
server.tool(
|
|
6921
|
+
"generate_etag",
|
|
6922
|
+
"Compute a content-hash ETag for the given content: digest it with MD5, SHA-1, or SHA-256, hex-encode it, and quote it into the exact string an ETag response header expects, with an optional weak-validator (W/) prefix. Hashes whatever content you give it; does not replicate any specific web server's own size/modification-time-based ETag algorithm.",
|
|
6923
|
+
{
|
|
6924
|
+
content: z.string().min(1).describe("The content to hash into an ETag"),
|
|
6925
|
+
algorithm: z.enum(_ETAG_ALGORITHMS_MCP).default("SHA-1").describe("Hash algorithm to use"),
|
|
6926
|
+
weak: z.boolean().default(false).describe("Whether to produce a weak validator (W/ prefix)")
|
|
6927
|
+
},
|
|
6928
|
+
async ({ content, algorithm, weak }) => {
|
|
6929
|
+
const result = _generateEtagMcp(content, algorithm, weak);
|
|
6930
|
+
if ("error" in result) return errText(result);
|
|
6931
|
+
return text(JSON.stringify(result, null, 2));
|
|
6932
|
+
}
|
|
6933
|
+
);
|
|
6833
6934
|
var transport = new StdioServerTransport();
|
|
6834
6935
|
await server.connect(transport);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@utilix-tech/mcp",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "MCP server exposing
|
|
3
|
+
"version": "0.41.0",
|
|
4
|
+
"description": "MCP server exposing 168 Utilix developer tools to Claude, Cursor, VS Code Copilot, and any MCP-compatible AI assistant.",
|
|
5
5
|
"author": "Utilix <hello@utilix.tech>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://utilix.tech/mcp",
|