Agents
Same tools, every host
Four hosts, one set of executors. The MCP server, the Pi and OMP extensions and @agntn/encodings/ai all call src/tool-operations.ts. Same arguments, same checks, same text back. A fix lands once. This site runs those executors too. Every Full tool response dialog here is exactly what a model reads.
| Tool | Does | Arguments |
|---|---|---|
encodings_encode | Write text or bytes in an encoding | encoding, input, inputFormat, options |
encodings_decode | Read text back into bytes | encoding, text, outputFormat, options (alphabet, check, m) |
encodings_identify | Rank the encodings a string decodes in, or peel them off | text, limit, peel |
encodings_info | The list, one family, or one encoding with its alphabet | encoding or family, both optional |
encodings_charset_convert | Read text as bytes in one code page and write them in another | text, from, to |
What a model reads
A header line, then the value.
bech32 → 20 bytes as hex (prefix "bc", witnessVersion 0):
751e76e8199196d454941c45d1b3a323f1433bd6
outputFormat is auto by default. Clean UTF-8 comes back as a quoted string, anything else as hex. Clean means no control characters, no bidi overrides, no line separators. Why so strict? A decoded string could rewrite the line it sits on, and a model would believe it. Ask for utf8 explicitly and you get it, escaped.
encodings_identify gives each candidate two lines. The rank, the encoding, the score and the reasons. Then the byte count and the bytes.
1. base32 0.593; padding fits the block length, decodes to readable text
11 bytes, text "Hello World"
With peel: true the same lines list layers, outermost first, under a count. A guess nothing backs says so.
1 layer, outermost first:
1. base64 (unconfirmed guess) 0.021
12 bytes, hex 53616c7465645f5fb196bea1
Everything the next call needs is in the text. An MCP client sees nothing else. Pi, OMP and the AI SDK also get structured details.
What they refuse
Every schema is closed. A misspelled argument is an error, not a quiet default.
Invalid arguments: unknown property "encodng"; takes encoding, input, inputFormat, options
A checksum that doesn't match is a tool error with the reason. The session carries on.
encodings_decode failed: base58: checksum does not match
The bounds sit in the schema. The executor checks them again, since a host may skip schema validation. Text up to 100000 characters. Base58 up to 10000, because base58 is quadratic. Real ones are addresses and keys, nowhere near that long. At most 20 identify candidates or layers. Nothing is written anywhere, and there's no network to reach.
MCP
encodings mcp
claude mcp add encodings --scope user -- npx -y @agntn/encodings mcp
Or in a client's config:
{
"mcpServers": {
"encodings": { "command": "npx", "args": ["-y", "@agntn/encodings", "mcp"] }
}
}
stdio, every tool read-only and idempotent.
Remote MCP
No Node on your side? Or a client that only takes a URL? This site serves the same five tools over Streamable HTTP, at https://encodings.agntn.dev/mcp.
claude mcp add --transport http encodings https://encodings.agntn.dev/mcp
{
"mcpServers": {
"encodings": { "type": "http", "url": "https://encodings.agntn.dev/mcp" }
}
}
It's the Docus MCP server with the encoding tools bolted on. Same tools as encodings mcp, same answers byte for byte, refusals included. Misspell an argument and it tells you so:
Invalid arguments: unknown property "encodng"; takes encoding, input, inputFormat, options
Same typo, same complaint, either way. Docus adds two tools of its own. list-pages lists this site and get-page hands one page back as Markdown. So a model can read up on Base58Check before it trusts a checksum.
The catch: every argument travels to a Cloudflare worker. The site keeps none of it, but you can't check that from your side. Decoding an address there is fine. A private key on its way into WIF isn't, so that one gets npx -y @agntn/encodings mcp.
Pi and OMP
pi install npm:@agntn/encodings
omp install @agntn/encodings
Both extensions are declared in package.json and ship as source the host loads directly.
AI SDK
import { generateText } from "ai";
import { encodingAiTools } from "@agntn/encodings/ai";
await generateText({
model,
tools: encodingAiTools,
prompt: "What does 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa decode to?",
});
encodingAiTools holds every one of them under the same names. Each one is exported alone too, encodingsDecodeTool and friends, if you'd rather hand a model fewer.