mcpField
V
verbatra

verbatra

Local
verbatra.kreitz-webdev.deDeveloper Tools2Updated 3d ago

About verbatra

@verbatra/mcp is a stdio MCP server for teams maintaining translations in a verbatra i18n project. It exposes project status, glossary, editing, review, and integrity tools, with provider calls gated behind explicit opt-in.

Key features

  1. 01Inspect translation status and differences
  2. 02Read and update glossary terms
  3. 03Edit and review translations
  4. 04Check placeholder and markup integrity
  5. 05Estimate provider usage and costs

Use cases

  1. 01Check which locales need translation
  2. 02Edit a translation while enforcing integrity
  3. 03Review machine-written translations
  4. 04Estimate translation work before provider calls

MCP support

The server exposes verbatra project configuration, translation status, glossary, editing, review, and integrity tools to MCP clients over stdio. Provider-calling tools are available only when spending is explicitly enabled.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"verbatra-verbatra": {
"command": "npx",
"args": [
"-y",
"@verbatra/mcp"
],
"env": {
"VERBATRA_MCP_ALLOW_SPEND": "<VERBATRA_MCP_ALLOW_SPEND>",
"VERBATRA_MCP_REDACT_VALUES": "<VERBATRA_MCP_REDACT_VALUES>",
"ANTHROPIC_API_KEY": "<ANTHROPIC_API_KEY>",
"OPENAI_API_KEY": "<OPENAI_API_KEY>",
"GEMINI_API_KEY": "<GEMINI_API_KEY>",
"DEEPL_API_KEY": "<DEEPL_API_KEY>",
"GOOGLE_TRANSLATE_API_KEY": "<GOOGLE_TRANSLATE_API_KEY>",
"OPENCODE_API_KEY": "<OPENCODE_API_KEY>",
"OPENAI_COMPATIBLE_API_KEY": "<OPENAI_COMPATIBLE_API_KEY>",
"LIBRETRANSLATE_API_KEY": "<LIBRETRANSLATE_API_KEY>"
}
}
}
}
Run commandnpx -y @verbatra/mcp
Environment variables to set
VERBATRA_MCP_ALLOW_SPENDSet to true to advertise the two provider-calling tools, the same as --allow-spend.
VERBATRA_MCP_REDACT_VALUESSet to true to replace translation values in every tool result with a marker, the same as --redact-values.
ANTHROPIC_API_KEYSecretAPI key for the anthropic provider, read only by the provider-calling tools.
OPENAI_API_KEYSecretAPI key for the openai provider, read only by the provider-calling tools.
GEMINI_API_KEYSecretAPI key for the gemini provider, read only by the provider-calling tools.
DEEPL_API_KEYSecretAPI key for the deepl provider, read only by the provider-calling tools.
GOOGLE_TRANSLATE_API_KEYSecretAPI key for the google-translate provider, read only by the provider-calling tools.
OPENCODE_API_KEYSecretAPI key for the opencode provider, read only by the provider-calling tools.
OPENAI_COMPATIBLE_API_KEYSecretAPI key for the openai-compatible provider, read only by the provider-calling tools.
LIBRETRANSLATE_API_KEYSecretAPI key for the libretranslate provider, needed only when the server runs with --api-keys, read only by the provider-calling tools.

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@verbatra/mcp0.3.0

Tools

20

Saved tool list · updated 3d ago

This tool takes no parameters.

Details

From the project README

verbatra logo, a glowing V mark on a dark square

@verbatra/mcp

Stdio MCP server exposing verbatra's translation status, glossary, and editing capabilities as tools for any MCP client, without a browser.

@verbatra/mcp npm version CI status on main npm provenance: SLSA v1 build attestation License: MIT

Documentation | Connect a client | Changelog | Issues

Description

@verbatra/mcp starts a Model Context Protocol server over stdio, the standard local-process transport an MCP client uses to launch and talk to a tool server. It gives a terminal-hosted or headless agent the same translation-status, glossary, and editing capabilities Verbatra Studio exposes in the browser, without a browser, a port, or a served single-page app. It is a thin, SDK-backed surface over @verbatra/sdk, the same way @verbatra/cli is.

Installation

Most MCP clients spawn the server for you and need no local install at all: point the client at npx -y @verbatra/mcp and npx fetches it on demand. To pin it in your project instead:

npm install --save-dev @verbatra/mcp

Needs Node.js ^22.18.0 || >=24. The server is also reachable through verbatra mcp once both @verbatra/cli and @verbatra/mcp are installed.

Configuring an MCP client

Point your client at the verbatra-mcp binary, which the @verbatra/mcp package provides (the example runs it through npx). The shape below is the one most clients use; for an editor or desktop client, put it in that client's MCP server configuration file.

{
  "mcpServers": {
    "verbatra": {
      "command": "npx",
      "args": ["-y", "@verbatra/mcp", "--cwd", "/path/to/your/project"],
      "env": {}
    }
  }
}

In Claude Code, npx @verbatra/cli init --agent (or claude mcp add --transport stdio --scope project verbatra -- npx -y @verbatra/mcp) writes an equivalent entry to a committed .mcp.json. The verbatra plugin bundles the agent skills with its own copy of this server, so use it instead of the .mcp.json entry, never both: together they register the server twice. VS Code (GitHub Copilot's agent mode) reads .vscode/mcp.json, whose top-level key is servers rather than mcpServers. The exact file, key, and working-directory handling for every client is in Connect an MCP client.

That configuration is read-only plus local editing: no provider is called and no API key is needed. Add --allow-spend to args, and the environment variable your configured provider reads its key from, once you also want the two provider-calling tools. --config <path> loads a specific config file instead of searching for one, and VERBATRA_MCP_ALLOW_SPEND is the environment equivalent of the flag, which the flag always wins over.

Tools

Every tool, listed in the order the server advertises them.

ToolWhat it does
project.snapshotRead the resolved project configuration: whether a usable config is loaded (configured), locales, format, path pattern, provider id, where the config came from, whether a glossary is configured
project.doctorCheck the project setup (config, format, provider, API key variable by name, network policy, source file) and get a fix for every failed check, with or without a usable config
status.checkPer target locale, how many keys are missing, stale, or up to date, and whether the locale is in sync
status.diffPer target locale, the exact keys the next translate run would add, re-translate, or orphan
glossary.getEvery glossary term with its translation for all locales, per-locale translations, forbidden renderings, case sensitivity, note and part of speech, the terms kept untranslated, the glossary version and where it comes from; with locale, also the terms that locale is held to
glossary.writeChange one glossary term (a translation for all locales or one locale, forbidden renderings, note, partOfSpeech, caseSensitive, or doNotTranslate) and return the glossary afterward
lock.stateThe lock file's version and its per-locale key counts, or exists: false before the first run
history.listRecent git commits that touched a locale file, with hash, author name (never the email), date, subject and touched paths
key.integrityOne key's placeholder, inline markup, and ICU drift against the lock-file baseline, per locale
locale.integrityEvery translation that fails the placeholder, markup or ICU checks right now, per target locale
key.valueOne key's current source text, its source file description, and, if translated, its current text in one target locale with who wrote it
key.contextWhat key.value returns plus the glossary terms that apply, the key's maxLength, and a check of an optional draft
locale.valuesSource and target text of many keys, filtered by keys or a query, in pages of up to 1,000 entries
translation.editEntryWrite a manual translation for one key in one locale, accepted only if it passes the integrity gate
translation.estimateEstimate what translation.translatePending would send and cost, optionally for a subset of locales, without calling a provider
translation.retranslateEntryAsk the configured provider for a fresh translation of one key in one locale
translation.translatePendingTranslate every missing or stale key across the configured target locales, or a named subset, in one run, within an optional maxTokens ceiling
review.queueEvery machine-written translation nobody has approved yet, read from the committed files, with the last run's flags
report.provenancePer locale, how many values fall into each provenance bucket; with includeEntries, the keys, paged
review.approveRecord, on the user's instruction, that a named person approves one key's current translation
review.rejectRecord, on the user's instruction, that a named person rejects one key's current translation, removing it so it gets replaced
usage.summaryToken usage and budget status left behind by the last run

Security and spend

  • Spend is opt-in. translation.retranslateEntry and translation.translatePending are the two tools that call a provider. They are advertised only when the server is started with --allow-spend or VERBATRA_MCP_ALLOW_SPEND; without either, a client never sees them and calling one by name fails as an unknown tool. A config with provider: { id: "none" } never lists them, even with --allow-spend.
  • Values can stay home. --redact-values (or VERBATRA_MCP_REDACT_VALUES) replaces every source text, translation, description, and glossary term in a result with a marker such as [redacted length=12 hash=3f9a0c1d2e4b5a6c], and leaves out reviewer and author names. Key names, counts, statuses, and integrity verdicts stay. review.approve and review.reject then take only the marker's hash as expectedHash, locale.values refuses query, and key.context refuses draft. This keeps values out of results; it does not stop an agent that probes on purpose, and what a provider receives does not change.
  • Secrets are scrubbed. Every result and log line passes through a redaction pass first, so a value shaped like a provider API key, or the exact value of a configured provider variable, becomes [REDACTED] before it reaches the client or stderr.
  • Stdout is protocol only. Nothing but MCP messages is written to stdout; every log and diagnostic line goes to stderr.
  • Config changes need no restart. The server starts without a usable config (project.snapshot reports configured: false, project.doctor says what to fix) and reloads the config and its glossary file before each call. --allow-spend is fixed at startup, and a config change never widens it.

Every tool's input, and every closed-shape tool output, is a JSON Schema derived from the same zod schema the server validates the call against. See the verbatra mcp docs for the full tool reference, the exit-code contract, and worked examples.

Documentation

Related packages

Contributing

See CONTRIBUTING.md.

License

MIT (c) Mario Kreitz

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.