一个简单高效的 MCP 服务器,专注于提供 Base64 编码和解码功能,支持文本和图像的 Base64 转换。
<a href="https://glama.ai/mcp/servers/@liuyazui/base64_server"> <img width="380" height="200" src="https://gips0.baidu.com/it/u=782897415,629196144&fm=3081&app=3081&f=PNG?w=760&h=400" alt="Base64 Server MCP 服务器" /> </a># 创建虚拟环境
uv venv
# 激活虚拟环境(Linux/macOS)
source .venv/bin/activate
# 激活虚拟环境(Windows)
.venv\Scripts\activate
# 安装包(开发模式)
uv pip install -e .
# 安装带有开发依赖的包
uv pip install -e ".[dev]"
使用 Smithery 安装 Base64 编码器 MCP 服务器到 Claude 的桌面,使用以下命令:
npx -y @smithery/cli install @liuyazui/base64_server --client claude
# 使用 MCP Inspector 测试服务器
uv run mcp dev base64_server.py
添加服务器配置:
{
"mcpServers": {
"base64-encoder": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"[base64_server.py 的路径]"
]
}
}
}
使用示例:
# 获取使用指南提示
messages = await client.get_prompt("base64_usage_guide")
# 获取文本编码提示
messages = await client.get_prompt("encode_text_prompt", {"text": "Hello World"})
MIT