Skip to main content
Glama

Polyglot - Modellkontextprotokoll für die Übersetzung

Polyglot ist eine Open-Source-Implementierung des Model Contexts Protocol (MCP) mit Fokus auf Übersetzungsdiensten. Es bietet eine standardisierte Möglichkeit, Übersetzungsanfragen in mehreren Sprachen mithilfe von Claude Sonnet 3.5 zu bearbeiten.

Unterstützte Sprachen

  • Arabisch (ar)

  • Chinesisch (zh)

  • Englisch (en)

  • Französisch (fr)

  • Russisch (ru)

  • Spanisch (es)

Merkmale

  • Standardisiertes Format für Übersetzungsanfragen

  • Unterstützung für mehrere Domänen (Recht, Medizin, Allgemein)

  • Kontrolle des Formalitätsgrades (formell/informell)

  • Claude Sonnet 3.5-Integration

  • MCP-Protokollserver (über FastMCP)

  • API-Schlüsselauthentifizierung

Installation

Verwendung von UV (empfohlen)

# Install uv if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh # Install the package and its dependencies uv pip install . # For development, install with dev dependencies uv pip install ".[dev]"

Verwenden von pip

# Install the package and its dependencies pip install . # For development, install with dev dependencies pip install ".[dev]"

Konfiguration

  1. Erstellen Sie eine .env Datei im Stammverzeichnis Ihres Projekts:

ANTHROPIC_API_KEY=your_api_key_here
  1. Bewahren Sie Ihren API-Schlüssel sicher auf und übergeben Sie ihn niemals der Versionskontrolle.

Ausführen des MCP-Servers

Der Polyglot MCP-Server verwendet FastMCP , um Übersetzungstools und -ressourcen über das MCP-Protokoll (SSE-Transport) bereitzustellen.

So starten Sie den Server:

python -m polyglot.server

Standardmäßig wird der Server auf Port 8001 unter Verwendung des SSE-Transports ausgeführt.

Testen des MCP-Servers

Verwenden von MCP Inspector (empfohlen)

  1. Installieren Sie den MCP Inspector:

    npx @modelcontextprotocol/inspector
  2. Öffnen Sie die Inspector-Benutzeroberfläche (das Terminal zeigt eine lokale Adresse an).

  3. Legen Sie in der Inspector-Benutzeroberfläche Folgendes fest:

    • Transporttyp: SSE

    • URL: http://localhost:8001/sse

    • (Optional) Legen Sie bei Bedarf die Inspector-Proxy-Adresse fest

  4. Sie können jetzt über die Inspector-Benutzeroberfläche mit dem Übersetzungstool und den Ressourcen interagieren.

Verwenden eines Python MCP-Clients

Sie können auch programmgesteuert mit dem Server interagieren, indem Sie das MCP Python SDK verwenden:

from mcp.client.sse import sse_client import asyncio async def main(): async with sse_client(url="http://localhost:8001/sse") as (read, write): # Example: call the translate tool request = { "tool": "translate", "args": { "request": { "version": "1.0", "type": "translation_request", "metadata": { "source_language": "fr", "target_language": "en", "domain": "legal", "formality": "formal", "api_key": "your_api_key_here" # Required for authentication }, "data": {"text": "Le contrat a été signé hier à Genève."} } } } await write(request) response = await read() print(response) asyncio.run(main())

Protokollspezifikation

Die Übersetzungsanforderung folgt dieser JSON-Struktur:

{ "version": "1.0", "type": "translation_request", "metadata": { "source_language": "fr", "target_language": "en", "domain": "legal", "formality": "formal", "api_key": "your_api_key_here" // Required for authentication }, "data": { "text": "Le contrat a été signé hier à Genève." } }

Entwicklung

So richten Sie die Entwicklungsumgebung ein:

# Install uv if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh # Create and activate a virtual environment uv venv source .venv/bin/activate # On Unix/macOS # or .venv\Scripts\activate # On Windows # Install development dependencies uv pip install ".[dev]"

Lizenz

MIT-Lizenz

-
security - not tested
A
license - permissive license
-
quality - not tested

Related MCP Servers

  • A
    security
    A
    license
    A
    quality
    An 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 -
    7
    45
    14
    MIT License
    • Apple
    • Linux
  • A
    security
    A
    license
    A
    quality
    An MCP server providing machine translation capabilities via the Lara Translate API, featuring language detection and context-aware translations between numerous language pairs.
    Last updated -
    1
    79
    76
    MIT License
    • Apple
    • Linux
  • -
    security
    F
    license
    -
    quality
    A 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
  • A
    security
    F
    license
    A
    quality
    A 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

View all related MCP servers

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/namiraprita/polyglot-mcp'

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