Skip to main content
Glama
Wuodan

mcp-base64

by Wuodan

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.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 -r requirements-dev.txt -e .

Run tests:

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

Run linting:

./scripts/lint.sh

Available Tools

2 tools
decode_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path where to save the decoded file
base64_contentYesBase64 encoded content to decode and write to file

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description discloses the security constraint of absolute paths but does not mention behavior like file overwriting, error handling, or output specifics. Since no annotations are provided, the description carries the full burden and could be more comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, consisting of two short sentences in the first paragraph and one in the second. Every sentence provides essential information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema available (though not shown), clear parameter coverage, and a sibling tool, the description is fairly complete. It could be improved by mentioning whether existing files are overwritten and typical error scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, both parameters have descriptions and examples in the schema. The description adds only the security constraint about absolute paths, which is a moderate addition beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool decodes a base64 string and writes it to a file, which is a specific verb+resource. The sibling tool 'encode_file_to_base64' performs the inverse operation, providing clear distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions that only absolute paths are allowed for security, offering clear context. However, it does not explicitly state when to use this tool versus alternatives or provide exclusion conditions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesAbsolute path to the file to encode to base64

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Discloses binary mode reading, base64 output, and absolute path restriction. Lacks mention of potential memory issues with large files, but covers key behaviors given no annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose then detail. No superfluous content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Sufficient for a single-parameter tool with output schema. Does not mention error scenarios (e.g., missing file) but acceptable for simple encoding tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema provides 100% coverage with description for file_path. Description adds important constraint 'only absolute paths' beyond schema examples, adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states verb 'encode' and resource 'file to base64 string'. Differentiates from sibling 'decode_base64_to_file' by describing encoding direction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage for encoding files to base64. Mentions absolute path requirement for security, but no explicit when-not-to-use or alternatives beyond tool name.

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. Dates show when Glama detected each change.

  1. 2 tool updatesv0.1.0
    • First observeddecode_base64_to_file
    • First observedencode_file_to_base64

TDQS

A4.4/5.0
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

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Wuodan/mcp-base64'

If you have feedback or need assistance with the MCP directory API, please join our Discord server