PO Translation MCP Server
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
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/omert11/po-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server