mcp

v0.9.2
@dialexjs/mcp Checked 3 days ago Published 1 month ago

Model Context Protocol (MCP) server for Dialex internationalization

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

dialex_config

Read static Dialex configuration (locales, defaultLocale, include pattern) from dialex.config.ts or i18n.config.ts without executing project code.

ParameterTypeDescription
configstringOptional custom path to config file relative to project root.

dialex_list_dictionaries

List all discovered content dictionaries, their files, and supported locales.

ParameterTypeDescription
configstringOptional custom path to config file relative to project root.

dialex_get_dictionary

Get leaf keys and values for a specific dictionary or all dictionaries, optionally filtered by locale.

ParameterTypeDescription
configstringOptional custom path to config file.
localestringLocale to retrieve (e.g. 'en' or 'tr'). If omitted, returns all locales.
namestringDictionary name (e.g. 'home' or 'auth'). If omitted, returns all dictionaries.

dialex_check

Analyze project statically to verify dictionary key parity, ICU arguments, and source code references without executing project code.

ParameterTypeDescription
configstringOptional custom path to config file.
srcarrayOptional source file globs to scan for dictionary references.

dialex_find_usages

Scan source files for dictionary usages (e.g. getDictionary('home') or t('home.title')).

ParameterTypeDescription
file *stringRelative or absolute file path to scan for references.

dialex_missing

List missing keys, keys marked with [TODO] placeholders, and stale translations (the source text changed after they were translated, per dialex.lock.json) across locales.

ParameterTypeDescription
configstringOptional custom path to config file.
localestringFilter missing keys to a specific target locale.

dialex_set_key

Safely set or update a translation string in a dictionary file using AST manipulation without executing project code or destroying comments/formatting. Refuses to overwrite non-[TODO] values unless overwrite is explicitly true.

ParameterTypeDescription
file *stringDictionary file path (e.g. 'src/home.content.ts' or absolute path).
locale *stringLocale to update (e.g. 'tr').
path *arrayKey path segments (e.g. ['nav', 'about'] or ['title']).
value *stringThe translated string value to set.
overwritebooleanMust be set to true to overwrite an existing translated value that is not marked [TODO]. Defaults to false.

dialex_add_missing

Automatically insert missing keys across all locales as [TODO] placeholders copied from default locale values (AST safe edits).

ParameterTypeDescription
configstringOptional custom path to config file.

dialex_generate

Run code generation to build standalone dictionary registry and TypeScript declarations.

ParameterTypeDescription
configstringOptional custom path to config file.
outputstringOptional custom output path for dialex.generated.ts.