@agntn/encodings
🔤 Binary-to-text encodings, written from the specs. You hand it a weird string, it tells you what's inside. Layer by layer, if it has to. Same answer in the terminal, in TypeScript and in an agent.
Potencialize seu agente
O comando do próprio publicador. Não é um endpoint do PlugMCP.
Host a copy with our keys and logs.
npx -y @agntn/[email protected]O Claude Code não tem link de instalação para um comando local. Copie o comando abaixo e execute-o em um terminal.
claude mcp add agntn-encodings -- npx -y @agntn/encodings@0.2.0Execute em um terminal.
{ "mcpServers": { "agntn-encodings": { "command": "npx", "args": [ "-y", "@agntn/[email protected]" ] } }}claude_desktop_config.json
URL remota ou um comando na sua máquina? Como as duas instalações diferem
Rodar no PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
AbrirDo publicador
🔤 Binary-to-text encodings, written from the specs. You hand it a weird string, it tells you what's inside. Layer by layer, if it has to. Same answer in the terminal, in TypeScript and in an agent.
Base58, base64, bech32 and a dozen more binary-to-text encodings, written from the specs
[!CAUTION] Not audited. This code has never had a security audit. Do not use it in production, with real funds or with sensitive data. It is meant for agents, puzzles and local experiments only. It comes as is, without warranty of any kind, and the authors are not liable for any loss, as the MIT license states. Anything that matters wants an audited library.
Paste a base58 string into a chat and ask what it says. The model answers. Confidently. It read the shape, not the bytes. So give it something that reads the bytes.
Docs and a live playground: encodings.agntn.dev.
ä and ’ read the way a browser reads them.bc1… address comes back as its witness version and program.identify. Tries every encoding, ranks the ones that work, and tells you why. Three layers deep? peel takes them off one by one.-----BEGIN PGP blocks. A bad CRC24 gets reported, not thrown.node:*, no network. The docs site runs it in your tab.identify knows it too.pnpm add @agntn/encodings
Node.js 26 or newer.
npx @agntn/encodings identify 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa -n 3
1. base58 (check) 0.574; checksum matches
21 bytes, hex 0062e907b15cbf27d5425399ebf6f0fb50ebb88f18
2. base32 (alphabet=crockford) 0.043
21 bytes, hex 0a83fb05d62de0e7844da5b4fd04b90d3676876faa
3. base58 0.024
25 bytes, hex 0062e907b15cbf27d5425399ebf6f0fb50ebb88f18c29b7d93
The genesis address. Version byte 00, then Satoshi's HASH160. The bare encodings below is pnpm exec encodings after a local install, or once pnpm add -g @agntn/encodings.
encodings decode bech32 bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4 -o hex
prefix: bc
witnessVersion: 0
751e76e8199196d454941c45d1b3a323f1433bd6
The prefix and the version go to stderr. Pipe stdout anywhere, it's pure program bytes. Typo in an address?
encodings decode base58 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNb --check
base58: checksum does not match
Exit code 1. No key, no config, no network.
- reads stdin, --input-format hex encodes bytes. Flags per encoding: CLI guide.
import { base58, decode, encode, identify } from "@agntn/encodings";
encode("base64", "gm"); // "Z20="
base58.decode("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa", { check: true }); // 21 bytes
decode("bech32", "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4").details;
// { prefix: "bc", witnessVersion: 0 }
identify("JBSWY3DPEBLW64TMMQ======")[0]?.text; // "Hello World"
That's most of it, really. Strings go in as UTF-8, bytes come out as Uint8Array. A bad character, a bad checksum, a bad option? Each throws its own error. More in encoding and decoding, checksums and identify.
Base58Check is base58 with check. Monero's addresses are base58 with blocks. z-base-32 is base32 with alphabet: "z". Decoding takes the same options, so a variant reads back the way it was written.
Got a puzzle in card suits or runes? base256 takes your own table as symbols, or reads its order off a sample, and gives you the digits. Each family is also a subpath, like @agntn/encodings/base58. Alphabets, overhead and options per encoding are on the encodings page.
EBCDIC isn't an encoding, it's a different alphabet for the same bytes. So charsets sits outside the registry, on @agntn/encodings/charsets. charsets.toText(bytes, { codepage: "ibm037" }) and back with fromText. Code pages.
RLP isn't text at all. It's Ethereum's wire format, bytes and lists with their length up front. rlp.encode([bytes, 1000n, []]) builds one. rlp.decode(bytes) takes it apart. Anything geth refuses, it refuses. It lives on @agntn/encodings/rlp, outside the registry too. RLP.
Got a PGP key from an email? armor.decode(text) finds the block and gives you its label, headers and bytes. armor.encode(bytes, { label: "SIGNATURE" }) wraps them back up. It's on @agntn/encodings/armor, next to RLP. OpenPGP armor.
pi install npm:@agntn/encodings
omp install @agntn/encodings
{
"mcpServers": {
"encodings": { "command": "npx", "args": ["-y", "@agntn/encodings", "mcp"] }
}
}
Nothing to install at all? The docs site serves the same tools over HTTP, plus list-pages and get-page for reading the guide:
claude mcp add --transport http encodings https://encodings.agntn.dev/mcp
Your arguments pass through a Cloudflare worker there. Great for an address, a bad idea for a private key.
The tools are encodings_encode, encodings_decode, encodings_identify, encodings_info and encodings_charset_convert. Same ones in @agntn/encodings/ai. Typo in an argument name? You hear about it. Decoded bytes come back as text only when they're clean text, hex otherwise. Agents guide.
It doesn't know networks. A version byte stays a byte, and what 0x80 means is @agntn/keys's job. Caesar, Vigenère and friends? That's @agntn/ciphers.
Implement Encoding, call register. Custom encodings has an octal one to copy.
pnpm install # docs/ too, one workspace and one lockfile
pnpm build # dist/, the CLI and the subpaths
pnpm test # vectors from the RFCs and BIPs, plus frozen outputs of other implementations
pnpm lint # vp lint and vp fmt --check
pnpm typecheck # src, the extensions and the tests
pnpm run docs # the site on localhost:3000
One pnpm install covers the site as well. The second trip into docs/ is gone, and so is its lockfile.
The house rules, and why the docs site cares about your Node version, live in CONTRIBUTING.md.
Built with help from Claude for Open Source and Codex for Open Source. Thank you both for backing small tools like this one.
Base58, base64, bech32 and a dozen more binary-to-text encodings, written from the specs
{ "mcpServers": { "agntn-encodings": { "command": "npx", "args": [ "-y", "@agntn/[email protected]" ] } }}Ferramentas
Ainda não há lista de ferramentas. Servidores remotos recebem uma após a primeira verificação de saúde.
Perguntas frequentes
Copie nesta página a configuração stdio para Cursor, Claude Desktop, Claude Code ou VS Code. Ela usa a instalação do publicador, não um proxy do PlugMCP.
Este registro não lista nenhuma variável de ambiente obrigatória.
@agntn/encodings roda localmente via stdio.
Última verificação: 2026-11-12. Base58, base64, bech32 and a dozen more binary-to-text encodings, written from the specs