Polyglot - 翻译模型上下文协议
Polyglot 是模型上下文协议 (MCP) 的开源实现,专注于翻译服务。它使用 Claude Sonnet 3.5 提供了一种标准化的方式来处理跨多种语言的翻译请求。
支持的语言
阿拉伯语(ar)
中文(zh)
英语 (en)
法语(fr)
俄语(ru)
西班牙语(es)
特征
标准化翻译请求格式
支持多个领域(法律、医疗、一般)
正式程度控制(正式/非正式)
Claude Sonnet 3.5 集成
MCP 协议服务器(通过 FastMCP)
API密钥认证
安装
使用 uv(推荐)
使用 pip
配置
在项目根目录中创建一个
.env文件:
确保您的 API 密钥的安全,并且切勿将其提交到版本控制中。
运行 MCP 服务器
Polyglot MCP 服务器使用FastMCP通过 MCP 协议(SSE 传输)公开翻译工具和资源。
要启动服务器:
默认情况下,服务器将使用 SSE 传输在端口 8001 上运行。
测试 MCP 服务器
使用 MCP 检查器(推荐)
安装 MCP 检查器:
npx @modelcontextprotocol/inspector打开 Inspector UI(终端将显示本地地址)。
在 Inspector UI 中设置以下内容:
运输类型: SSE
网址:
http://localhost:8001/sse(可选)如果需要,设置检查器代理地址
您现在可以通过 Inspector UI 与翻译工具和资源进行交互。
使用 Python MCP 客户端
您还可以使用 MCP Python SDK 以编程方式与服务器交互:
协议规范
翻译请求遵循以下 JSON 结构:
发展
设置开发环境:
执照
MIT 许可证
This server cannot be installed
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityAn MCP server implementation that integrates Claude with Salesforce, enabling natural language interactions with Salesforce data and metadata for querying, modifying, and managing objects and records.Last updated -74514MIT License
- AsecurityAlicenseAqualityAn MCP server providing machine translation capabilities via the Lara Translate API, featuring language detection and context-aware translations between numerous language pairs.Last updated -17976MIT License
- -securityFlicense-qualityA ModelContextProtocol server providing high-quality translation services with a three-stage translation workflow (analysis, segmented translation, full-text review) that supports multiple languages and integrates with Claude and OpenAI-compatible models.Last updated -23
- AsecurityFlicenseAqualityA custom MCP protocol service that enhances AI models by providing multilingual translation capabilities and resource management, allowing for automatic text extraction and translation through external APIs.Last updated -2