base64hub

com.base64hubPublished by base64hub.comv1.0.0Updated Nov 22, 2026

Exact Base64 for AI agents: encode, decode and validate (standard, URL-safe, data URIs).

VerifiedSTDIODesktop onlyFiles & StorageDeveloper Tools

Overview

AI-generated overview

A local stdio MCP server that gives an assistant byte-exact Base64 encoding, decoding and validation, including URL-safe alphabets and data URIs.

What you can do
  • Encode text as UTF-8 to Base64, with URL-safe alphabet, padding control and line wrapping options.
  • Decode Base64 or data URIs, accepting both alphabets, missing padding and whitespace, and reporting binary output as hex.
  • Validate a string without decoding it, returning validity, variant, padding status, byte size and any error.
  • All three tools are read-only and work offline.
When to use it
Useful when an assistant needs reliable Base64 output instead of guessing by hand: preparing tokens or payloads, inspecting encoded strings, checking whether a value is valid Base64, or converting data URIs.
Requirements
A local runtime: Node.js 18 or newer, launched by the MCP client with npx. No API key, account or network access is needed.
Before you install
The tools are read-only and the README states nothing leaves the machine and no network access is used. Encoding or decoding does not protect secrets, so avoid pasting sensitive values into a conversation unless you accept they appear in the chat.

Installation

In SourceWeft

  1. Open base64hub in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

base64hub-mcp

An MCP server that gives AI assistants exact Base64: encode, decode and validate. Language models are unreliable at Base64 by hand; with this server Claude, Cursor, VS Code and any other Model Context Protocol client get byte-exact results from three small tools.

  • Runs locally over stdio, nothing leaves your machine, no network access, no API key
  • Zero dependencies, a few hundred lines of plain Node.js (18 or newer)
  • Standard and URL-safe alphabets, padding control, line wrapping, data URIs
  • Lenient decoding with precise errors: invalid character '!' at position 4
  • Binary results are reported as hex instead of mangled text

Setup

The server is started by your MCP client with npx -y base64hub-mcp. Node.js 18 or newer must be installed.

Claude Code

sh
claude mcp add base64hub -- npx -y base64hub-mcp

Add --scope user to make it available in every project.

Claude Desktop

Open Settings → Developer → Edit Config and add the server to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), then restart Claude:

json
{  "mcpServers": {    "base64hub": {      "command": "npx",      "args": ["-y", "base64hub-mcp"]    }  }}

Cursor

Add it to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):

json
{  "mcpServers": {    "base64hub": {      "command": "npx",      "args": ["-y", "base64hub-mcp"]    }  }}

VS Code

From a terminal:

sh
code --add-mcp '{"name":"base64hub","type":"stdio","command":"npx","args":["-y","base64hub-mcp"]}'

Or in a workspace file. .vscode/mcp.json uses a top-level servers object:

json
{  "servers": {    "base64hub": {      "type": "stdio",      "command": "npx",      "args": ["-y", "base64hub-mcp"]    }  }}

The portable .mcp.json at the workspace root (also read by Copilot) uses mcpServers with the same command and args as the Cursor example.

Other clients

Any client that launches stdio servers works with command npx and arguments -y base64hub-mcp. On Windows, if a client can't find npx, use command cmd with arguments /c npx -y base64hub-mcp.

Tools

All tools are read-only and work offline.

base64_encode

Encode text (as UTF-8) to Base64.

ArgumentTypeDefaultMeaning
textstringrequiredText to encode
url_safebooleanfalseURL-safe alphabet (- and _, RFC 4648 §5)
paddingbooleantrueAdd = padding
wrapinteger0Line break after every N characters (76 = MIME)

{"text": "Hello, hub!"} → SGVsbG8sIGh1YiE=

base64_decode

Decode Base64 to text. Accepts both alphabets (even mixed), missing padding, spaces, tabs and line breaks, and data:...;base64, URIs.

ArgumentTypeMeaning
datastringBase64 text or a data URI

{"data": "SGVsbG8sIGh1YiE"} → Hello, hub!

When the bytes are not valid UTF-8 (an image, for example), the result says so and gives them as hex. Invalid input returns a tool error with the reason, such as Invalid Base64: invalid character '!' at position 4.

base64_validate

Check a string without decoding it. Returns JSON, also as structured content:

FieldMeaning
validtrue exactly when base64_decode would succeed
variantstandard (+ or / seen), url (- or _ seen), mixed (both) or either (neither)
paddedthe length including = is a multiple of 4
bytesdecoded size in bytes
errorthe error base64_decode would report (only when valid is false)

{"data": "a+b_"} → {"valid":true,"variant":"mixed","padded":true,"bytes":3}

Protocol

JSON-RPC 2.0 over stdio, one message per line, written without an SDK. Supported MCP revisions: 2026-07-28 (stateless requests with per-request _meta and server/discover) and, through the initialize handshake, 2025-11-25, 2025-06-18, 2025-03-26 and 2024-11-05. Logs go to stderr only.

Links

License

MIT

Source: README.md at commit 70ad43d

Tools

3

base64_encode

Base64 encode

Encode text to Base64. The text is converted to UTF-8 bytes first, so any language and emoji work. Set url_safe for the URL- and filename-safe alphabet (- and _ instead of + and /, as in JWTs and URLs), padding=false to drop the trailing '=' characters, and wrap to break the output into lines (76 for MIME email). Returns only the Base64 string.

Parameterstextrequiredwrappaddingurl_safe

base64_decode

Base64 decode

Decode Base64 back to text. Accepts the standard and the URL-safe alphabet (even mixed), missing '=' padding, spaces and line breaks, and data URIs such as data:image/png;base64,... Returns the decoded UTF-8 text exactly. If the bytes are not valid UTF-8 (an image, compressed or encrypted data), says so and returns them as hex instead. Invalid input fails with the reason and the position of the offending character.

Parametersdatarequired

base64_validate

Base64 validate

Check whether a string is valid Base64 and describe it, without returning the decoded content. Uses the same lenient rules as base64_decode. Returns JSON: valid, variant (standard if + or / occurs, url if - or _ occurs, mixed if both, either if neither), padded (whether the '=' padding is complete) and bytes (decoded size); or valid: false with the error base64_decode would report, such as the offending character and its position.

Parametersdatarequired

Version history

1
  1. v1.0.0LatestNov 22, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts