blocks-translation-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| BLOCKS_ORIGIN | No | Origin/Referer the admin surface requires. Override only for a non-cloud Blocks deployment. | https://cloud.seliseblocks.com |
| BLOCKS_BASE_URL | No | Blocks API base URL. | https://api.seliseblocks.com |
| BLOCKS_PASSWORD | No | Admin password. If it contains '#', wrap the value in double quotes. Required for login, modules, and languages. | |
| BLOCKS_USERNAME | No | Admin username for the login-required endpoints. Required for login, modules, and languages. | |
| BLOCKS_FRAMEWORK | No | Key extraction framework. Allowed values: ngx-translate, react-i18next, generic. | ngx-translate |
| BLOCKS_KEY_REGEX | No | Regex whose first capture group is the key. Only required if BLOCKS_FRAMEWORK=generic. | |
| BLOCKS_TENANT_ID | Yes | Your tenant GUID. Required for every tool. | |
| BLOCKS_PORTAL_KEY | No | Portal app key used to authenticate the admin surface. Required for login, modules, and languages endpoints. | |
| BLOCKS_PROJECT_ROOT | No | Points the server at your project's root. Only needed if your client doesn't set cwd to your repo. | |
| BLOCKS_DEDUP_MODULES | No | Comma-separated shared modules to also dedup-check alongside the target. | |
| BLOCKS_OUTPUT_PATH_PATTERN | No | Output path template; {module} is substituted. | blocks-translation-helper/blocks-upload.{module}.generated.json |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| prepare_syncA | The FIRST and usually ONLY prep call for a translation sync. Scans the project diff (working-tree + staged + untracked), groups the found keys BY THEIR OWN module (from each key's prefix), fetches the tenant cultures, and exact-dedupes each module's keys against that module + any modules in BLOCKS_DEDUP_MODULES (none by default) — all in code, no LLM work. Handles a diff spanning several modules in ONE call. Returns { cultures, modules: [{ module, newKeys, existingSkip }] }. Do NOT call find_keys / list_modules / list_cultures / search_keys separately — this replaces them. Then, for each module with non-empty newKeys, infer English from the key names, translate into cultures, and call sync_keys for THAT module (omit outputPath) — one sync_keys call per module produces one JSON file per module. |
| find_keysA | Scans the current project for added/changed translation keys and returns them deduped with their source-derived prefix, using the configured framework (ngx-translate | react-i18next | generic). In the default mode it reads the working-tree + staged diff AND brand-new untracked files (a common place for new keys); pass diffBase to compare against a ref instead. Does NOT resolve the Blocks module slug — use list_modules for that. Standalone building block; for a full sync prefer prepare_sync, which composes this with module/culture resolution and dedupe. |
| list_culturesA | Returns the culture codes this Blocks tenant supports (e.g. en-US, de-DE, ...), fetched from the Blocks Language API and cached to disk. Call this to learn exactly which cultures to translate into before sync_keys / build_upload_entries. Do NOT read local i18n files or rely on memory for the culture set — this tool is the source of truth. Also reports which culture is the tenant default. Pass refresh:true to re-fetch from the API if the tenant recently added a language. |
| list_modulesA | Lists modules available in the configured Blocks tenant (name + id). Use this to resolve a module name (e.g. "app-user-management", "root", "generic-app") to the ModuleId needed by search_keys and build_upload_entries. |
| search_keysA | Checks each key two ways before you upload it, no login required (public GetUilmFile endpoint): (1) exact KeyName match, and (2) same English text under a DIFFERENT KeyName (trimmed, case-insensitive) — catches e.g. adding "APP_X.SUBMIT" = "Submit" when "SUBMIT_TEXT" already = "Submit" elsewhere, so you reuse the existing key instead of creating a duplicate string. Checks the target module plus any modules in BLOCKS_DEDUP_MODULES (none by default). Pass extraModuleNames to widen it — e.g. shared modules that keys commonly leak into/from. |
| build_upload_entriesA | Pure JSON assembly (aside from resolving moduleName -> id, which is cached to disk so it rarely needs a live call). Takes already-translated keys (translate them yourself first, matching tone across all 7 cultures) and stamps them into the exact array shape the Blocks portal JSON import expects: _id (new uuid), TenantId, ModuleId, Value: null, Routes: [], and IsPartiallyTranslated computed from whether all target cultures were provided. Run search_keys first to avoid re-uploading keys that already exist. Prefer sync_keys for the common case (dedup-check + build + write to disk in one call). |
| sync_keysA | The one-call path for adding new translation keys: resolves the module by name (cached to disk), dedup-checks every key against the target module + any BLOCKS_DEDUP_MODULES, skips any key whose exact KeyName already exists in the target module (would overwrite/duplicate), builds portal-ready upload entries for the rest, and — if outputPath is given — writes them straight to disk. Keys with the same English text under a DIFFERENT existing key are NOT auto-skipped (reusing them means changing the calling code, not this tool's call) — they come back in duplicateWarnings for you to decide on. Returns a compact summary, not the full entry JSON, to keep the response small — read the written file if you need the entries themselves. The upload JSON is written to outputPath, or — when you omit outputPath (recommended) — to the path from BLOCKS_OUTPUT_PATH_PATTERN with {module} substituted, resolved against the project root. Parent directories are created automatically. Do NOT invent an output path: omit outputPath and let the configured location be used. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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/mahmudul006/blocks-translation-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server