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.3.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.3-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mcp_base64-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 e16df7be5a90c0b44afc49aef602f7582144a9b435d30f56e0a7ae0a03a17da0
MD5 22e2ce03d7ee479f12252757657cf67e
BLAKE2b-256 acf64b402ea12dbcfc6c6b4bf146bfc076c122704224bef58ad82acf331244a9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mcp_base64-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f152108902a462d847a2836dbc81bcf1acf4f85d1828d38d34cd8579ab101e19
MD5 72c75faa49a7534cb8049311ccee479b
BLAKE2b-256 1e97a915efff9f2cb2f309bb67ef1140a7682b920e9d41fe4ce11cfed16506b9

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