Upload a file
  1. base64hub
  2. Docs
  3. MCP server

MCP Server Reference

base64hub-mcp is a local stdio MCP server with three read-only tools. Your client starts it with npx; it needs Node.js 18 or later and no API key.

Client setup

Every client launches the server with the command npx and the arguments -y base64hub-mcp.

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

Where each configuration goes:

ClientLocation
Claude Codethe command above; add --scope user to make it available in every project
Claude DesktopSettings → Developer → Edit Config opens claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\); restart Claude afterwards
Cursor~/.cursor/mcp.json for all projects, .cursor/mcp.json for one
VS Code.vscode/mcp.json in the workspace, with a top-level servers object

VS Code can also add it from a terminal:

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

On Windows, if a client cannot find npx, use the command cmd with the arguments /c npx -y base64hub-mcp. Any other client that launches stdio servers works with the same command and arguments.

Tools

All three tools are read-only and work offline.

base64_encode

Encodes text, as UTF-8, to Base64.

ArgumentTypeDefaultMeaning
textstringrequiredText to encode.
url_safebooleanfalseURL-safe alphabet (- and _).
paddingbooleantrueAdd = padding.
wrapinteger0Line break after every N characters; 76 is MIME.

{"text": "Hello, hub!"} returns SGVsbG8sIGh1YiE=. {"text": "Привет", "url_safe": true, "padding": false} returns 0J_RgNC40LLQtdGC.

base64_decode

Decodes Base64 to text. Both alphabets, missing padding, whitespace and data:...;base64, URIs are accepted.

ArgumentTypeMeaning
datastringBase64 text or a data URI.

{"data": "SGVsbG8sIGh1YiE"} returns Hello, hub!. When the bytes are not valid UTF-8, the result says so and gives them as hex; for +/+/:

The data decodes to 3 bytes that are not valid UTF-8 text. Hex:
fbffbf

Invalid input returns a tool error with the reason, for example Invalid Base64: invalid character '!' at position 4.

base64_validate

Checks a string without decoding it. The result is JSON, also sent as structured content.

FieldMeaning
validtrue exactly when base64_decode would succeed.
variantstandard, url, mixed or either.
paddedThe length including = is a multiple of 4.
bytesDecoded size in bytes.
errorWhy the input is invalid; only when valid is false.

{"data": "-_-_"} returns {"valid":true,"variant":"url","padded":true,"bytes":3}.

Protocol

JSON-RPC 2.0 over stdio, one message per line, written without an SDK. Logs go to standard error only, so they never mix with protocol messages. A tool call looks like this on the wire:

{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"base64_encode","arguments":{"text":"Hello, hub!"}}}
{"jsonrpc":"2.0","id":3,"result":{"content":[{"type":"text","text":"SGVsbG8sIGh1YiE="}]}}

The server is published on npm as base64hub-mcp and in the MCP Registry as com.base64hub/mcp.

Updated Nov 22, 2026