base64hub-mcp
OfficialUse this read-only MCP server to encode, decode, and validate Base64 exactly.
Encode text as UTF-8 Base64, with optional URL-safe alphabet, padding removal, and line wrapping (e.g., 76 chars for MIME).
Decode Base64 or data URIs leniently, accepting mixed alphabets, missing padding, spaces, and line breaks; returns UTF-8 text or hex for binary data with precise errors.
Validate Base64 without decoding, returning validity, alphabet variant, padding status, decoded byte size, and any error.
Run locally over stdio with no network or API key, or connect to the hosted HTTP endpoint.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@base64hub-mcp decode SGVsbG8sIGh1YiE= and tell me if it's valid Base64"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Also hosted at
https://mcp.base64hub.com/mcpfor clients that connect by URLZero 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 4Binary 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
claude mcp add base64hub -- npx -y base64hub-mcpAdd --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:
{
"mcpServers": {
"base64hub": {
"command": "npx",
"args": ["-y", "base64hub-mcp"]
}
}
}Cursor
Add it to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (one project):
{
"mcpServers": {
"base64hub": {
"command": "npx",
"args": ["-y", "base64hub-mcp"]
}
}
}VS Code
From a terminal:
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:
{
"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.
Docker
The server is also published as a container image, for clients that run MCP servers in Docker:
{
"mcpServers": {
"base64hub": {
"command": "docker",
"args": ["run", "--rm", "-i", "ghcr.io/base64hub-com/base64hub-mcp"]
}
}
}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.
Related MCP server: moltline-mcp
Hosted server
The same three tools are served over Streamable HTTP, with no key and no account:
https://mcp.base64hub.com/mcpUse it when Node.js is not installed or the client only takes a URL.
claude mcp add --transport http base64hub https://mcp.base64hub.com/mcpClaude (web and desktop): Settings → Connectors → Add custom connector, paste the URL.
Cursor:
{"mcpServers": {"base64hub": {"url": "https://mcp.base64hub.com/mcp"}}}VS Code:
{"servers": {"base64hub": {"type": "http", "url": "https://mcp.base64hub.com/mcp"}}}
The text you convert is sent to the server. It is processed in memory and is neither stored nor logged; for data that must not leave your machine, use the local server above. One request is limited to 256 KB, and an IP address to 20 requests per 10 seconds.
The hosted server is a Cloudflare Worker built from the same core.js and protocol.js as the
local one: worker.js is generated by node scripts/build-worker.js, and DEPLOY.md
describes how to run your own copy.
Tools
All tools are read-only. The local server works offline.
base64_encode
Encode text (as UTF-8) to Base64.
Argument | Type | Default | Meaning |
| string | required | Text to encode |
| boolean |
| URL-safe alphabet ( |
| boolean |
| Add |
| integer |
| Line break after every N characters ( |
{"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.
Argument | Type | Meaning |
| string | Base64 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:
Field | Meaning |
|
|
|
|
| the length including |
| decoded size in bytes |
| the error |
{"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.
The hosted server speaks the same revisions over Streamable HTTP: every POST /mcp is answered with
one JSON body, there are no sessions and no SSE streams, and 2026-07-28 requests have their
MCP-Protocol-Version, Mcp-Method and Mcp-Name headers checked against the body.
Links
Server page: base64hub.com/mcp/
Documentation: base64hub.com/docs/mcp/
Base64 tools in the browser: base64hub.com
Command line tool and library: base64hub on npm
License
MIT
Available Tools
3 toolsbase64_decodeBase64 decodeARead-onlyIdempotentInspect
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.
Inputs: data (required).
base64_encodeBase64 encodeARead-onlyIdempotentInspect
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.
Inputs: text (required), wrap, padding, url_safe.
base64_validateBase64 validateARead-onlyIdempotentInspect
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.
Inputs: data (required). Returns: bytes, error, valid, padded, +1 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool maps to a single, unmistakable operation: encode, decode, and validate. The descriptions explicitly contrast validate with decode ('without returning the decoded content'), eliminating the only plausible overlap.
All three names use a consistent snake_case pattern with the shared base64_ prefix and a clear verb (encode/decode/validate). No deviation in style or verb form.
Three tools is exactly the right surface for a focused Base64 utility: convert in, convert out, and check validity. Nothing is padded in or obviously missing at this scope.
Encode, decode, and validate cover the full round-trip lifecycle, including URL-safe alphabets, padding, wrapping, and lenient input. Minor gaps exist for file/binary ingestion (encode only takes text, and no way to emit binary output), but agents can work around this by reading files themselves.
Maintenance
Related MCP Connectors
Developer utilities over MCP: Base64 encode and decode, decode JWTs, format JSON, do percentages.
Deterministic MCP utilities, validation, evidence verification, and x402 commerce on Base.
Pay-per-call MCP tools for agents: 20 free calls a day, then pay per call with x402 (USDC on Base mainnet) or a prepaid spend key. 30 tools — text/data utilities, x402/EVM-native tools (decode an x402 challenge, verify a settlement receipt on-chain, EIP-712 hashing, ABI encode/decode, Merkle-proof verify, keccak256, EIP-55 address checks) and independent providers' tools priced from $0.001. Signed delivery receipts. No sign-up.
Related MCP Servers
- AlicenseAqualityDmaintenanceA simple and efficient MCP server that provides Base64 encoding and decoding functionality for both text and images with support for Data URL format.43MIT
- AlicenseAqualityBmaintenanceZero-dependency stdio bridge to Moltline Studio's fleet of 14 hosted MCP servers covering code review, time operations, data transforms, business ops, education, research, outreach and more. Free tier requires no registration; premium tools unlock with a license. Independently audited, MCPize Verified A.10MIT
- AlicenseAqualityCmaintenanceFree, fully-offline MCP utility tools for agents: base64, UUID, JSON validation, SHA hashing, timestamps, URL codec, case conversion, and secure passwords. No API keys, no tracking, works offline - stdlib-only Python stdio server.9MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients and terminal users to convert 201+ file formats, verify outputs with SHA-256, and discover 54 precision Studio workspaces through remote HTTP or local stdio transports. Supports local files, URLs, and base64 payloads with privacy-focused file shredding.MIT