Skip to content

Connect LILT to ChatGPT: Automate Translation & AI Content Creation

Learn how to connect LILT to ChatGPT using Truto's managed MCP server. Automate translation memory queries, XLIFF handling, and AI content generation workflows.

Uday Gajavalli Uday Gajavalli · · 8 min read
Connect LILT to ChatGPT: Automate Translation & AI Content Creation

If you are building localization workflows, you need to connect LILT to ChatGPT to automate translation memory updates, manage document translation lifecycles, and generate context-aware multilingual content. If your team uses Claude instead, check out our guide on connecting LILT to Claude, or review our architectural breakdown on connecting LILT to AI Agents.

Giving a Large Language Model (LLM) read and write access to an enterprise localization platform like LILT is an engineering challenge. You either spend weeks building, hosting, and maintaining a custom Model Context Protocol (MCP) server to translate the LLM's JSON-RPC tool calls into REST API requests, or you use a managed infrastructure layer to handle the boilerplate.

This guide breaks down exactly how to use Truto to dynamically generate a secure, authenticated MCP server for LILT, connect it natively to ChatGPT, and execute complex localization workflows using natural language.

The Engineering Reality of the LILT API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against vendor APIs is painful. If you build a custom MCP server for LILT, you are responsible for the entire API lifecycle.

When working with LILT specifically, standard CRUD assumptions break down. Here are the specific integration challenges you face:

Binary File Handling and XLIFF Formatting LILT does not return standard JSON payloads when downloading translated documents. When an LLM calls the endpoint to retrieve a document, the API returns a raw binary file stream, which defaults to the XLIFF 1.2 XML format. A standard MCP wrapper will fail to parse this. Your server must intercept the binary stream, write it to disk, or buffer it, and return a structured text representation to the LLM.

Complex S3 Multipart Uploads To upload large source files to LILT, you cannot just fire a single POST request with a payload. LILT requires a multi-step AWS S3 upload orchestration. Your MCP server must first request S3 pre-signed parameters, chunk the file, push individual parts to S3, and finally call a completion endpoint with ETags and part numbers. Expecting an LLM to orchestrate this natively without hallucinating AWS keys is a recipe for failure.

Asynchronous Processing and Polling Many LILT operations - like language detection and termbase exports - execute asynchronously in the background. When you initiate a termbase export, LILT returns immediately. Your MCP server must implement a polling loop to check if is_processing equals 0 before attempting to download the resulting CSV file. If the LLM tries to fetch the file immediately, the API throws an error.

Rate Limits and Payload Constraints LILT enforces strict payload constraints, such as limiting translation segments to a maximum of 5,000 characters and requiring strict US-ASCII or URI-encoded file names. Furthermore, LILT enforces rate limits. Truto's architecture passes HTTP 429 errors directly from the upstream API to the caller, normalizing the rate limit information into standard headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. Truto does not absorb, throttle, or automatically retry these requests - the MCP client or caller is responsible for implementing retry and exponential backoff logic.

Generating a Managed LILT MCP Server

Instead of building this infrastructure from scratch, you can use Truto to generate a managed MCP server. Truto's architecture derives tool definitions dynamically from LILT's API documentation and your environment's integration configuration. Tools are never cached; they are generated on the fly when the LLM requests them.

You can create a LILT MCP server via the Truto UI or programmatically via the API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to the integrated account page for your LILT connection.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Define your configuration parameters (name, method filters, tags, and expiration).
  5. Copy the generated MCP server URL. This URL contains a cryptographically hashed token that scopes access strictly to this specific LILT instance.

Method 2: Via the API

For platform engineers embedding AI into their own software, you can provision MCP servers programmatically.

Make an authenticated POST request to /integrated-account/:id/mcp:

curl -X POST "https://api.truto.one/integrated-account/YOUR_ACCOUNT_ID/mcp" \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "LILT Translation Agent",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'

The Truto API will validate that tools exist, hash a new token for KV storage, and return a ready-to-use endpoint:

{
  "id": "mcp_12345abc",
  "name": "LILT Translation Agent",
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

Connecting the LILT MCP Server to ChatGPT

Once you have your Truto MCP URL, you can connect it to ChatGPT so your AI agents can discover and execute the LILT tools.

Method A: Via the ChatGPT UI

  1. Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
  2. Toggle Developer mode on (custom MCP support requires this flag).
  3. Under the MCP servers / Custom connectors section, click to add a new server.
  4. Name: Enter a descriptive name (e.g., "LILT Translator").
  5. Server URL: Paste the Truto MCP URL you generated earlier.
  6. Click Save. ChatGPT will perform an initialization handshake with the Truto router and automatically retrieve the available LILT tools.

Method B: Via Manual Configuration File

If you are using a custom agent framework, a local agent, or an external desktop client that relies on standard MCP JSON configs, you can use the official SSE transport package to proxy the connection to Truto.

Add the following to your agent's MCP configuration file:

{
  "mcpServers": {
    "lilt_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f6..."
      ]
    }
  }
}

Hero Tools for LILT

Truto maps LILT's API into granular, execution-ready MCP tools. Here are the highest-leverage tools available for AI translation workflows.

create_a_lilt_project

Creates a new project in LILT. Projects are collections of documents tied to exactly one Translation Memory (TM). This is the starting point for batching related translation tasks.

"Create a new LILT project for the Q3 Marketing Campaign and assign it to the memory ID 98765. Set the target language to French."

create_a_lilt_file

Uploads a file to LILT for translation. Language detection runs asynchronously in the background. The LLM handles the upload, and you can query the system later to verify the detected source language and confidence score.

"Upload the file 'onboarding_guide.md' to LILT. Return the file ID and tell me what language the system detected once the background job completes."

Queries a specific LILT Memory for translation segments matching a source string. This is essentially a RAG (Retrieval-Augmented Generation) tool tailored for linguists, allowing the AI to look up approved terminology before drafting localized content.

"Search memory ID 44556 for the phrase 'Enterprise Single Sign-On'. Return the highest scoring target segment and its metadata so I can maintain brand consistency."

create_a_lilt_translation

Translates a source string on the fly. This tool hits LILT's translation engine, returning an array of candidates where TM fuzzy matches are ranked first, followed by raw machine translation results. It also returns confidence scores and word alignments.

"Translate the string 'Select your payment method to proceed' using the LILT translation engine. Give me the top-ranked candidate and its confidence score."

create_a_lilt_create

Generates completely new, context-aware content using LILT Create. The tool accepts specific templates, target length, summaries, and tone preferences to generate multilingual copy from scratch.

"Use LILT Create to write a 300-word promotional email in Spanish for our new feature launch. Use the 'Product Update' template and apply a professional but enthusiastic tone."

get_single_lilt_document_by_id

Retrieves a translated document. By default, this downloads the file in XLIFF 1.2 format, but passing specific parameters allows the retrieval of the original formatted document once translation is complete.

"Download the completed translation for document ID 10293 in its original format. Let me know if the export is still processing."

For the complete tool inventory, including schemas, required parameters, and descriptions, review the LILT integration page.

Workflows in Action

Giving ChatGPT access to these tools enables complex, multi-step localization orchestrations. Here are two examples of real-world workflows.

1. Autonomous Translation Memory Enrichment

When standardizing localization, teams often find gaps in their Translation Memory. You can instruct the agent to audit strings, check for existing approved translations, and fill the gaps autonomously.

"I have a list of new UI error messages. For each message, check if an approved translation exists in Memory ID 1022. If no match scores above 85, generate a new translation using the LILT engine and create a new segment in that memory to store it."

Execution Steps:

  1. The agent calls lilt_memories_search with the first UI string.
  2. If the returned score is below 85 (or empty), the agent calls create_a_lilt_translation to get a fresh translation.
  3. The agent extracts the best candidate and calls create_a_lilt_segment to save the new source/target pair back into the TM.
  4. It loops through the remaining strings, effectively enriching the corporate glossary.
sequenceDiagram
    participant Agent as ChatGPT Agent
    participant Truto as Truto MCP Server
    participant LILT as LILT API

    Agent->>Truto: Call lilt_memories_search<br>"Authentication Failed"
    Truto->>LILT: GET /v2/memories/1022/search
    LILT-->>Truto: Score: 60 (Low Match)
    Truto-->>Agent: No high-quality match found
    
    Agent->>Truto: Call create_a_lilt_translation<br>"Authentication Failed"
    Truto->>LILT: POST /v2/translate
    LILT-->>Truto: Target: "Échec de l'authentification"
    Truto-->>Agent: Translation generated
    
    Agent->>Truto: Call create_a_lilt_segment
    Truto->>LILT: POST /v2/segments
    LILT-->>Truto: 200 OK (Segment added)
    Truto-->>Agent: Memory updated successfully

2. Multi-Market Content Generation

Instead of translating existing text, marketing teams can use the agent to generate net-new localized content directly into their LILT environment.

"Generate three different social media posts announcing our new security features using LILT Create. Write one in French, one in German, and one in Japanese. Ensure the tone is set to 'Authoritative' based on our stored preferences."

Execution Steps:

  1. The agent calls get_single_lilt_create_preference_by_id to ensure the stored tone settings align with the prompt.
  2. If necessary, it calls update_a_lilt_create_preference_by_id to temporarily switch the tone to "Authoritative".
  3. The agent calls create_a_lilt_create three times in sequence, swapping the language parameters (fr-FR, de-DE, ja-JP) for each execution.
  4. The agent compiles the generated strings and returns the formatted copy directly in the chat interface.

Security and Access Control

Connecting an LLM to your localization system requires strict access boundaries. Truto provides several mechanisms to lock down the LILT MCP server:

  • Method Filtering: You can restrict the MCP server configuration to methods: ["read"]. This allows the agent to search translation memories and retrieve files, but strictly prevents it from creating new segments, deleting files, or spending translation credits.
  • Tag Filtering: By configuring integration tool tags, you can restrict the agent to specific functional domains. For example, applying a ["content_creation"] tag filter ensures the LLM can only access LILT Create endpoints, completely isolating your core TM architecture.
  • Dual-Layer Authentication: Enabling the require_api_token_auth flag means the MCP URL alone is not enough. The connecting client must also pass a valid Truto API token in the header. This prevents unauthorized execution if the MCP URL leaks in logs.
  • Ephemeral Servers: Set an expires_at timestamp when creating the MCP server. Truto uses Durable Object alarms to automatically clean up the server and its KV credentials at the exact expiration time. This is ideal for granting a freelance translator or temporary script access without leaving stale credentials behind.

Final Thoughts

The bottleneck in AI localization is no longer the quality of the LLM - it is the integration layer connecting the LLM to your systems of record. By replacing custom-coded boilerplate, exponential backoff handling, and complex S3 upload orchestrations with a managed MCP server, you can deploy autonomous translation agents in minutes instead of months.

FAQ

Can I use ChatGPT to query my LILT Translation Memory?
Yes. By connecting LILT to ChatGPT via an MCP server, the LLM can use the lilt_memories_search tool to query your exact and fuzzy TM matches before drafting translations, acting as a linguistic RAG pipeline.
How do Truto MCP servers handle LILT rate limits?
Truto passes HTTP 429 rate limit errors directly from LILT to the caller and normalizes the rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The MCP client is responsible for implementing retry and exponential backoff logic.
Can I limit ChatGPT to read-only access in LILT?
Yes. When creating the Truto MCP server, you can apply method filters like config: { methods: ['read'] }. This ensures the agent can query TMs and read documents but cannot create segments, delete projects, or alter settings.
Does Truto support LILT Create endpoints?
Yes. Truto exposes the LILT Create API, allowing you to prompt ChatGPT to generate net-new localized content by applying specific templates, summary constraints, and tone preferences.

More from our Blog