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-base64encode 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: Local Utilities MCP Server
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path where to save the decoded file | |
| base64_content | Yes | Base64 encoded content to decode and write to file |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the mutation (writes to a file) and the absolute-path restriction, but omits other important behaviors such as whether an existing file is overwritten, whether directories are created, or how invalid base64 input is handled. These gaps are material for a file-writing tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences with zero redundancy. The primary purpose is front-loaded in the first sentence, and the security constraint is a concise, valuable addition. Every sentence earns its place without any fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with only two required parameters and an output schema (signal indicates true), the description covers the essential purpose and a key constraint. It lacks explicit details on overwrite behavior and error handling, but the tool's simplicity and the presence of an output schema reduce the need for exhaustive elaboration. It is adequate but not flawless.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% (both parameters have clear descriptions in the schema), so the baseline is 3. The tool description adds only the absolute-path security constraint, which is more behavioral than parameter-specific. It does not enrich the meaning of either parameter beyond what the schema already provides.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the action ('Decode a base64 string and write it to a file') with a clear verb and resource, and it naturally differentiates from the sibling encode_file_to_base64 by being the reverse operation. No ambiguity remains about what the tool accomplishes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides a concrete usage constraint ('Only absolute paths are allowed for security reasons'), which is directly actionable. It does not explicitly name when to use this tool versus the sibling, but the opposite nature of the sibling makes the choice obvious. There are no exclusion conditions beyond the path requirement.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | Absolute path to the file to encode to base64 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the transparency burden. It discloses that the file is read in binary mode, that contents are returned as base64, and that relative paths are disallowed for security. It does not mention missing-file or permission errors, but the read-only nature is clear.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the action, followed by a relevant behavioral and security constraint. No filler or repetition of schema details.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With one well-documented parameter, a strict path rule, and an output schema available, the definition gives an agent everything needed to invoke the tool correctly. The sibling decode tool is visible in context, so the encode/decode relationship is clear even without in-text mention.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The single parameter is already fully described in the schema with examples at 100% coverage. The description mostly reinforces the absolute-path expectation and adds the security rationale, which is useful but not a substantial semantic addition.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb ('Encode'), a resource ('a file'), and the output format ('base64 string'). It further specifies binary mode and the absolute-path restriction, which separates it from the decode sibling. The purpose is unambiguous and distinct from decode_base64_to_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or alternative routing is given; the decode sibling is never mentioned. The correct use is only implied by the encode/decode naming and the action description, and the only stated constraint is absolute paths.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.1.0- First observed
decode_base64_to_file - First observed
encode_file_to_base64
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
Convert and compress PDFs and images, redact personal data, and run text and data utilities.
Developer utilities over MCP: Base64 encode and decode, decode JWTs, format JSON, do percentages.
Exact hashing, base64/hex/URL encoding, JWT decoding and UUIDs for AI agents. No auth required.
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
- AlicenseNot gradedqualityDmaintenanceProvides essential utility tools for text processing, file operations, hashing, temperature conversion, password generation, and date/time operations through a comprehensive MCP interface.MIT
- AlicenseAqualityDmaintenanceEnables listing image files in a directory and reading their content as base64 for display.212 npm11GPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables uploading files to MinIO (S3 compatible) via MCP tools. Supports Base64 file upload and optional curl command generation.-