Skip to main content

MCP server for Base64 file conversion (stdio transport)

Project description

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:

{
  "mcpServers": {
    "ollama": {
      "command": "uvx",
      "args": [
        "mcp-ollama"
      ]
    }
  }
}

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

./.venv/bin/python -m pip install -e .[dev]

Run tests:

./.venv/bin/python -m pytest -q

Run linting:

./.venv/bin/python -m ruff check .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_base64-0.1.2.tar.gz (124.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_base64-0.1.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file mcp_base64-0.1.2.tar.gz.

File metadata

  • Download URL: mcp_base64-0.1.2.tar.gz
  • Upload date:
  • Size: 124.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_base64-0.1.2.tar.gz
Algorithm Hash digest
SHA256 0214d9c55436a8f05235fa37f0cfd466eeec61e3878c9a715d92adb553dc5d33
MD5 8942aa52d183c7e81b66033d5304a802
BLAKE2b-256 048e3b766592363a7d69800273f6d6938df3be5534c66e4723b9b05ed89358b6

See more details on using hashes here.

File details

Details for the file mcp_base64-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mcp_base64-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_base64-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9e14fde12e063ed3fda06401a3de2024068254f0f0e8bf926e60f097bec8012f
MD5 00d7bc3930a7fe59971067e55224fbfd
BLAKE2b-256 f2107fe1067fb865c7f294d81bf542d32f5101003562787cf8f56423af943068

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page