mcp-base64
by Wuodan
README.md
# 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
## Usage
### IDE Configuration
For IDE plugins, add this server to your MCP configuration JSON:
```json
{
"mcpServers": {
"base64": {
"command": "uvx",
"args": [
"mcp-base64"
]
}
}
}
```
### Direct Execution
```bash
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.server
```
## Tools
### 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 content
- `file_path` (str): Absolute path where to save decoded file
**Returns:** Success message with file path
## Development
Install development dependencies:
```bash
./.venv/bin/python -m pip install -r requirements-dev.txt -e .
```
Run tests:
```bash
./.venv/bin/python -m pytest -q
```
Run linting:
```bash
./scripts/lint.sh
```
TDQS
A4.4/5.0
Scored across 2 tools
Disambiguation5/5
The two tools have clearly distinct purposes: one decodes base64 to a file, the other encodes a file to base64. There is no overlap or ambiguity.
Naming Consistency5/5
Both tool names follow a consistent verb_noun pattern with clear prepositions ('decode_base64_to_file', 'encode_file_to_base64'), making them predictable and easy to understand.
Tool Count5/5
With exactly two tools, the server is well-scoped for its purpose of base64 file encoding and decoding. Each tool serves a necessary and complementary role.
Completeness5/5
The server covers the full domain of file-based base64 operations: both encoding (file to base64) and decoding (base64 to file). No obvious gaps are present.
Maintenance
ActivityMaintained
ResponsivenessNo issues