mcp-base64
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., "@mcp-base64 encode the file /home/user/document.pdf to 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.
MCP Base64 Server
A Python MCP (Model Context Protocol) server for Base64 file conversion with stdio transport.
Features
encode_file_to_base64: Encode any file to base64 string
decode_base64_to_file: Decode base64 content to file
Binary-safe: Handles both text and binary files correctly
Related MCP server: MCP File Upload Sample
Usage
IDE Configuration
For IDE plugins, add this server to your MCP configuration JSON:
{
"mcpServers": {
"base64": {
"command": "uvx",
"args": [
"mcp-base64"
]
}
}
}Direct Execution
git clone https://github.com/Wuodan/mcp-base64.git
cd mcp-base64
python3 -m venv .venv
./.venv/bin/python -m pip install -e .
./.venv/bin/python -m mcp_base64.serverTools
encode_file_to_base64(file_path: str) -> str
Encodes a file to base64 string.
Parameters:
file_path(str): Absolute path to file to encode
Returns: Base64 encoded string
decode_base64_to_file(base64_content: str, file_path: str) -> str
Decodes base64 string to file.
Parameters:
base64_content(str): Base64 encoded contentfile_path(str): Absolute path where to save decoded file
Returns: Success message with file path
Development
Install development dependencies:
./.venv/bin/python -m pip install -r requirements-dev.txt -e .Run tests:
./.venv/bin/python -m pytest -qRun linting:
./scripts/lint.shAvailable Tools
2 toolsdecode_base64_to_fileDecode Base64 To FileA
Decode a base64 string and write it to a file.
This tool takes base64 encoded content and writes the decoded binary data to a file. Only absolute paths are allowed for security reasons.
Inputs: file_path (required), base64_content (required). Returns: result
encode_file_to_base64Encode File To Base64A
Encode a file to a base64 string.
This tool reads a file in binary mode and returns its contents encoded as a base64 string. Only absolute paths are allowed for security reasons.
Inputs: file_path (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools are exact opposites with non-overlapping purposes: one encodes a file to base64, the other decodes base64 to a file. There is no ambiguity about which tool to select for a given direction.
Both names follow the same verb_object_preposition_object pattern: encode_file_to_base64 and decode_base64_to_file. The naming is symmetric, predictable, and clearly indicates the input and output of each operation.
Two tools is exactly the right scope for a focused base64 file conversion server. Each tool earns its place, and adding more tools would likely introduce redundancy or scope creep.
The server fully covers its stated domain: converting between file contents and base64 strings in both directions. There are no obvious missing operations for a file-based base64 utility.
Maintenance
Related MCP Connectors
Encode text to Base64 or decode Base64 back to plain text.
Developer and text tools: JSON, QR codes, units, passwords, UUIDs, hashes, Base64, regex and more.
Developer utilities over MCP: Base64 encode and decode, decode JWTs, format JSON, do percentages.
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
- FlicenseNot gradedqualityDmaintenanceEnables uploading files to MinIO (S3 compatible) via MCP tools. Supports Base64 file upload and optional curl command generation.-
- AlicenseNot gradedqualityCmaintenanceEnables encoding and decoding of text between Base64, Base64URL, Base32, and Hex formats, supporting offline keyless operations.109 npmMIT
- AlicenseAqualityNot gradedmaintenanceProvides essential utility functions for AI development workflows, including UUID generation, Base64 encoding/decoding, timestamp conversion, and hash computation.7MIT