Base64 MCP Server
The Base64 MCP Server provides encoding and decoding capabilities for text and images:
Text Operations: Encode text to Base64 and decode Base64 back to text
Image Operations: Convert images to Base64 strings and decode Base64 back to images with specified output path and MIME type
Data URL Format: Support for encoding and decoding in Data URL format
Integration: Access via simple API calls (Tools) or Resource URLs
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., "@Base64 MCP Server encode this text 'Hello World' 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.
Base64编码解码MCP服务器
一个简单高效的MCP服务器,专注于提供Base64编码和解码功能,支持文本和图片的Base64转换。
功能特点
文本Base64编码和解码
图片Base64编码和解码
支持Data URL格式
简单易用的API
使用uv进行依赖管理
Related MCP server: EasyOCR MCP Server
安装
使用uv安装
# 创建虚拟环境
uv venv
# 激活虚拟环境(Linux/macOS)
source .venv/bin/activate
# 激活虚拟环境(Windows)
.venv\Scripts\activate
# 安装包(开发模式)
uv pip install -e .
# 安装带开发依赖的包
uv pip install -e ".[dev]"安装Smithery
使用Smithery为Claude桌面安装Base64编码解码MCP服务器,使用以下命令:
npx -y @smithery/cli install @liuyazui/base64_server --client claude使用方法
使用MCP Inspector测试
# 使用MCP Inspector测试服务器
uv run mcp dev base64_server.py与MCP client集成
添加服务器配置:
{ "mcpServers": { "base64-encoder": { "command": "uv", "args": [ "run", "--with", "mcp[cli]", "mcp", "run", "[path to base64_server.py]" ] } } }
API参考
工具(Tools)
base64_encode_text(text: str) -> str:将文本转换为Base64编码
base64_decode_text(encoded: str) -> str:将Base64编码解码为文本
base64_encode_image(image_path: str) -> str:将图片转换为Base64编码
base64_decode_image(encoded: str, output_path: str, mime_type: str = "image/png") -> str:将Base64编码解码为图片
资源(Resources)
encode://base64/text/{text}:获取文本的Base64编码
decode://base64/text/{encoded}:获取Base64编码的解码结果
encode://base64/image/{image_path}:获取图片的Base64编码
decode://base64/image/{encoded}:获取Base64编码的解码图片
提示模板(Prompts)
base64_usage_guide(): 提供Base64服务的基本使用指南
encode_text_prompt(text: str): 文本编码提示模板
encode_image_prompt(image_path: str): 图片编码提示模板
error_handling_prompt(error_message: str): 错误处理提示模板
使用示例:
# 获取使用指南提示
messages = await client.get_prompt("base64_usage_guide")
# 获取文本编码提示
messages = await client.get_prompt("encode_text_prompt", {"text": "Hello World"})开发
许可证
MIT
Available Tools
4 toolsbase64_decode_imageA
将Base64编码解码为图片
Args:
encoded: Base64编码的字符串
output_path: 输出图片的路径
mime_type: 图片的MIME类型 (默认为image/png)
Returns:
解码结果
Inputs: encoded (required), output_path (required), mime_type.
base64_decode_textA
将Base64编码解码为文本
Args:
encoded: Base64编码的字符串
Returns:
解码后的文本
Inputs: encoded (required).
base64_encode_imageA
将图片转换为Base64编码
Args:
image_path: 图片文件路径
Returns:
Base64编码结果
Inputs: image_path (required).
base64_encode_textA
将文本转换为Base64编码
Args:
text: 要编码的文本
Returns:
Base64编码结果
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Every tool has a clearly distinct purpose with no ambiguity. The four tools cleanly separate into two decode operations (image vs text) and two encode operations (image vs text), each targeting specific data types and use cases. An agent can easily distinguish between them based on the input/output type and operation direction.
All tools follow a perfectly consistent verb_noun pattern with 'base64_' prefix, then operation (encode/decode), then target type (image/text). The naming is predictable, readable, and follows the same convention throughout without any deviations or mixed styles.
Four tools is ideal for this server's purpose. It provides complete coverage of the Base64 domain with exactly the right granularity: encode and decode operations for both text and image data types. No tool feels redundant or missing, and the count is well-scoped for the functionality offered.
The tool surface is complete for Base64 operations. It covers both encoding and decoding for the two primary data types (text and images) that Base64 typically handles. There are no gaps in the CRUD/lifecycle for this domain, and agents can perform all expected Base64 transformations without workarounds.
Maintenance
Related MCP Connectors
Developer utilities MCP server: base64, hash, slug, uuid v4, timestamp, urlencode. Free, no key.
Tiny devtools MCP server: slugs, timestamps, case conversion, hashing, base64, UUIDs.
Screenshots, PDFs, image editing, QR codes, email validation and more through one hosted MCP server.
Related MCP Servers
- AlicenseAqualityDmaintenanceThe MCP server offers the function of extracting images from local files and urls and converting them to base64 format, which is suitable for LLM analysis.32Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that provides OCR capabilities using the EasyOCR library, supporting over 80 languages and GPU acceleration. It enables processing images from base64 strings, local files, or URLs with options for text-only or detailed coordinate and confidence output.2Apache 2.0
- FlicenseAqualityDmaintenanceA lightweight MCP server providing everyday developer utilities such as JSON formatting, UUID generation, Base64 conversion, HTTP status lookup, and Unix timestamp conversion as tools and resources.5-
- AlicenseBqualityCmaintenanceMinimal MCP server for Kimi-compatible image analysis, allowing local images to be sent as inline base64 to any compatible endpoint.12,024 npmMIT