PO Translation MCP Server
Provides tools for analyzing, validating, and updating Django gettext .po translation files with intelligent preservation of Python format strings, Django template variables and tags, HTML tags, URLs, and JavaScript code.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
PO Translation MCP Server
MCP server for translating Django gettext .po files with AI assistance.
Features
analyze_po_file: Analyze .po files, get statistics and untranslated/fuzzy entries
validate_and_update_po_file: Validate and update translations in one operation
Smart Validation: Variables, HTML, URLs, JavaScript preservation checks
Installation
npm install
npm run buildClaude Code Configuration
{
"mcpServers": {
"po-mcp": {
"command": "node",
"args": ["/path/to/po-mcp/dist/index.js"]
}
}
}Tools
analyze_po_file
Analyze a .po file and get translation status.
Input:
{
"po_file_path": "/absolute/path/to/locale/tr/LC_MESSAGES/django.po"
}Output:
{
"file_path": "/absolute/path/to/django.po",
"statistics": {
"translated": 2876,
"untranslated": 2,
"fuzzy": 0,
"total": 2878
},
"untranslated_entries": [
{
"msgid": "Departure Place ID",
"msgstr": "",
"context": null
}
],
"fuzzy_entries": []
}validate_and_update_po_file
Validate translations and update the PO file.
Input:
{
"po_file_path": "/absolute/path/to/locale/tr/LC_MESSAGES/django.po",
"translations": [
{
"msgid": "Departure Place ID",
"msgstr": "Kalkis Yeri ID",
"context": null
}
],
"strict": true,
"dry_run": false,
"force": false
}Parameters:
Parameter | Type | Default | Description |
| string | required | Absolute path to .po file |
| array | required | Translation entries |
| boolean | true | Enable all validation checks |
| boolean | false | Preview without writing |
| boolean | false | Update even if invalid |
Output:
{
"validation": {
"invalids": [],
"total": 1,
"valid": true
},
"update": {
"success": true,
"updated_entries": 1,
"file_path": "/absolute/path/to/django.po",
"errors": []
},
"message": "Updated 1 translations."
}Data Structure
Both tools use the same minimal entry format:
{
msgid: string; // Original text
msgstr: string; // Translation
context: string | null; // msgctxt (for disambiguation)
}Workflow
1. analyze_po_file
└── Get untranslated/fuzzy entries
2. AI translates (Claude)
└── msgstr filled with translations
3. validate_and_update_po_file
└── Validate & write to fileValidation Checks (strict: true)
Variables:
%(name)s,{0},{name},{{ var }}HTML:
<tag>,</tag>,<tag attr="value">URLs:
https://...,www....JavaScript:
console.log(),module.method()
Project Structure
po-mcp/
├── src/
│ ├── index.ts # MCP server
│ ├── types.ts # Type definitions
│ ├── tools/
│ │ ├── analyze.ts
│ │ ├── validate.ts
│ │ ├── update.ts
│ │ └── validate-and-update.ts
│ └── parser/
│ └── po-parser.ts
├── dist/ # Compiled JS
└── package.jsonDevelopment
npm run build # Build
npm run watch # Watch modeLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
AI-native translation management: push translation files, translate, review and audit strings.
Add AI translation to React, Angular, Vue or any website, and review and fix your translations.
Localize apps from your AI assistant: translate locale files, set glossaries, connect GitHub repos.
Localize iOS and Android apps: coverage, missing strings, glossary-aware AI drafts and file sync.