Skip to content
Back to search

base64hub-mcp

MCP server for exact Base64: encode, decode and validate tools for Claude, Cursor, VS Code and other MCP clients. No dependencies.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/base64hub-com--base64hub-mcp/badge.svg)](/listings/base64hub-com--base64hub-mcp)

HTML

<a href="/listings/base64hub-com--base64hub-mcp"><img src="/api/listings/base64hub-com--base64hub-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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-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:

{
  "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.

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`.

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 149 lines
  1. # base64hub-mcp
  2. An MCP server that gives AI assistants exact Base64: encode, decode and validate. Language models
  3. are unreliable at Base64 by hand; with this server Claude, Cursor, VS Code and any other
  4. [Model Context Protocol](https://modelcontextprotocol.io/) client get byte-exact results from three
  5. small tools.
  6. - Runs locally over stdio, nothing leaves your machine, no network access, no API key
  7. - Zero dependencies, a few hundred lines of plain Node.js (18 or newer)
  8. - Standard and URL-safe alphabets, padding control, line wrapping, data URIs
  9. - Lenient decoding with precise errors: `invalid character '!' at position 4`
  10. - Binary results are reported as hex instead of mangled text
  11. ## Setup
  12. The server is started by your MCP client with `npx -y base64hub-mcp`. Node.js 18 or newer must be
  13. installed.
  14. ### Claude Code
  15. ```sh
  16. claude mcp add base64hub -- npx -y base64hub-mcp
  17. ```
  18. Add `--scope user` to make it available in every project.
  19. ### Claude Desktop
  20. Open **Settings → Developer → Edit Config** and add the server to `claude_desktop_config.json`
  21. (macOS: `~/Library/Application Support/Claude/`, Windows: `%APPDATA%\Claude\`), then restart Claude:
  22. ```json
  23. {
  24. "mcpServers": {
  25. "base64hub": {
  26. "command": "npx",
  27. "args": ["-y", "base64hub-mcp"]
  28. }
  29. }
  30. }
  31. ```
  32. ### Cursor
  33. Add it to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project):
  34. ```json
  35. {
  36. "mcpServers": {
  37. "base64hub": {
  38. "command": "npx",
  39. "args": ["-y", "base64hub-mcp"]
  40. }
  41. }
  42. }
  43. ```
  44. ### VS Code
  45. From a terminal:
  46. ```sh
  47. code --add-mcp '{"name":"base64hub","type":"stdio","command":"npx","args":["-y","base64hub-mcp"]}'
  48. ```
  49. Or in a workspace file. `.vscode/mcp.json` uses a top-level `servers` object:
  50. ```json
  51. {
  52. "servers": {
  53. "base64hub": {
  54. "type": "stdio",
  55. "command": "npx",
  56. "args": ["-y", "base64hub-mcp"]
  57. }
  58. }
  59. }
  60. ```
  61. The portable `.mcp.json` at the workspace root (also read by Copilot) uses `mcpServers` with the
  62. same `command` and `args` as the Cursor example.
  63. ### Other clients
  64. Any client that launches stdio servers works with command `npx` and arguments `-y base64hub-mcp`.
  65. On Windows, if a client can't find `npx`, use command `cmd` with arguments `/c npx -y base64hub-mcp`.
  66. ## Tools
  67. All tools are read-only and work offline.
  68. ### `base64_encode`
  69. Encode text (as UTF-8) to Base64.
  70. | Argument | Type | Default | Meaning |
  71. |---|---|---|---|
  72. | `text` | string | required | Text to encode |
  73. | `url_safe` | boolean | `false` | URL-safe alphabet (`-` and `_`, RFC 4648 §5) |
  74. | `padding` | boolean | `true` | Add `=` padding |
  75. | `wrap` | integer | `0` | Line break after every N characters (`76` = MIME) |
  76. `{"text": "Hello, hub!"}` → `SGVsbG8sIGh1YiE=`
  77. ### `base64_decode`
  78. Decode Base64 to text. Accepts both alphabets (even mixed), missing padding, spaces, tabs and line
  79. breaks, and `data:...;base64,` URIs.
  80. | Argument | Type | Meaning |
  81. |---|---|---|
  82. | `data` | string | Base64 text or a data URI |
  83. `{"data": "SGVsbG8sIGh1YiE"}` → `Hello, hub!`
  84. When the bytes are not valid UTF-8 (an image, for example), the result says so and gives them as hex.
  85. Invalid input returns a tool error with the reason, such as `Invalid Base64: invalid character '!' at position 4.`
  86. ### `base64_validate`
  87. Check a string without decoding it. Returns JSON, also as structured content:
  88. | Field | Meaning |
  89. |---|---|
  90. | `valid` | `true` exactly when `base64_decode` would succeed |
  91. | `variant` | `standard` (`+` or `/` seen), `url` (`-` or `_` seen), `mixed` (both) or `either` (neither) |
  92. | `padded` | the length including `=` is a multiple of 4 |
  93. | `bytes` | decoded size in bytes |
  94. | `error` | the error `base64_decode` would report (only when `valid` is `false`) |
  95. `{"data": "a+b_"}` → `{"valid":true,"variant":"mixed","padded":true,"bytes":3}`
  96. ## Protocol
  97. JSON-RPC 2.0 over stdio, one message per line, written without an SDK. Supported MCP revisions:
  98. `2026-07-28` (stateless requests with per-request `_meta` and `server/discover`) and, through the
  99. `initialize` handshake, `2025-11-25`, `2025-06-18`, `2025-03-26` and `2024-11-05`. Logs go to stderr
  100. only.
  101. ## Links
  102. - Server page: [base64hub.com/mcp/](https://base64hub.com/mcp/)
  103. - Documentation: [base64hub.com/docs/mcp/](https://base64hub.com/docs/mcp/)
  104. - Base64 tools in the browser: [base64hub.com](https://base64hub.com/)
  105. - Command line tool and library: [base64hub on npm](https://www.npmjs.com/package/base64hub)
  106. ## License
  107. MIT

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.