@verbaly/mcp 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Aron Soto
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,51 @@
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/AronSoto/verbaly/develop/assets/logo.png" alt="Verbaly" width="300" />
3
+ </p>
4
+
5
+ <p align="center"><em>MCP server for Verbaly: translation status, missing keys, extraction and machine translation as tools for coding agents.</em></p>
6
+
7
+ <p align="center">
8
+ <a href="https://www.npmjs.com/package/@verbaly/mcp"><img src="https://img.shields.io/npm/v/@verbaly/mcp?logo=npm&color=cb3837" alt="npm version" /></a>
9
+ <a href="https://github.com/AronSoto/verbaly/blob/develop/LICENSE"><img src="https://img.shields.io/npm/l/@verbaly/mcp?color=blue" alt="MIT" /></a>
10
+ </p>
11
+
12
+ ---
13
+
14
+ Your coding agent (Claude Code, Cursor, or any MCP client) gets first-class access to the Verbaly cycle: it can see the translation coverage, list exactly what's missing, extract new messages and machine-translate the gaps, all against your real `verbaly.config` and catalogs. No shell parsing, no guessed file paths.
15
+
16
+ ## 🚀 Install
17
+
18
+ ```bash
19
+ claude mcp add verbaly -- npx -y @verbaly/mcp
20
+ ```
21
+
22
+ Or in any MCP client config:
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "verbaly": { "command": "npx", "args": ["-y", "@verbaly/mcp"] }
28
+ }
29
+ }
30
+ ```
31
+
32
+ The server reads the project from its working directory; pass `--root <path>` (or the per-tool `root` argument) to point elsewhere.
33
+
34
+ ## 🧰 Tools
35
+
36
+ | Tool | What it does |
37
+ | ------------------- | ------------------------------------------------------------------------------------------------------------------------ |
38
+ | `verbaly_status` | Coverage per locale: total messages, translated counts, drafts awaiting review. Read-only. |
39
+ | `verbaly_missing` | Missing translations and unknown keys (the same gate `verbaly check` runs in CI). Read-only. |
40
+ | `verbaly_extract` | Scan sources, add new messages to the catalogs, refresh the generated types. `dryRun` previews; `prune` drops dead keys. |
41
+ | `verbaly_translate` | Fill missing entries with the configured provider (default: Claude). Output is saved as drafts awaiting human review. |
42
+
43
+ Machine translations stay drafts until a human accepts them (`verbaly review --approve`), so an agent can fill gaps without silently shipping unreviewed text.
44
+
45
+ ## 📚 Docs
46
+
47
+ Full guide: [verbaly-web.vercel.app/docs](https://verbaly-web.vercel.app/docs)
48
+
49
+ ## License
50
+
51
+ [MIT](https://github.com/AronSoto/verbaly/blob/develop/LICENSE) © Aron Soto
package/dist/cli.js ADDED
@@ -0,0 +1,141 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire } from "node:module";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { parseArgs } from "node:util";
5
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
6
+ import { check, collectOrigins, effectiveDrafts, extractProject, formatCheckResult, formatStatusResult, loadCatalogs, loadConfig, loadDrafts, markDrafts, pruneCatalogs, resolveProvider, saveDrafts, status, syncCatalogs, translateCatalogs, writeCatalog, writeDts } from "@verbaly/compiler";
7
+ import { z } from "zod";
8
+ //#region src/server.ts
9
+ const { version } = createRequire(import.meta.url)("../package.json");
10
+ const text = (body) => ({ content: [{
11
+ type: "text",
12
+ text: body
13
+ }] });
14
+ const rootInput = z.string().optional().describe("Project root holding verbaly.config (defaults to the server working directory)");
15
+ function createVerbalyMcp(options = {}) {
16
+ const server = new McpServer({
17
+ name: "verbaly",
18
+ version
19
+ });
20
+ const config = (root) => loadConfig(root ?? options.root ?? process.cwd());
21
+ const guarded = (run) => async (args) => {
22
+ try {
23
+ return await run(args);
24
+ } catch (error) {
25
+ return {
26
+ content: [{
27
+ type: "text",
28
+ text: error instanceof Error ? error.message : String(error)
29
+ }],
30
+ isError: true
31
+ };
32
+ }
33
+ };
34
+ server.registerTool("verbaly_status", {
35
+ title: "Translation coverage",
36
+ description: "Translation coverage of the Verbaly project: total messages, translated count per locale and machine translations awaiting review (drafts). Read-only.",
37
+ inputSchema: { root: rootInput },
38
+ annotations: { readOnlyHint: true }
39
+ }, guarded(async ({ root }) => {
40
+ const cfg = await config(root);
41
+ const registry = await extractProject(cfg);
42
+ const result = status(cfg, loadCatalogs(cfg), registry, loadDrafts(cfg));
43
+ return text(formatStatusResult(result));
44
+ }));
45
+ server.registerTool("verbaly_missing", {
46
+ title: "Missing translations",
47
+ description: "List missing translations and unknown keys, the same gate `verbaly check` runs in CI. Optionally also lists machine translations awaiting review. Read-only.",
48
+ inputSchema: {
49
+ root: rootInput,
50
+ drafts: z.boolean().optional().describe("Also list machine translations awaiting human review")
51
+ },
52
+ annotations: { readOnlyHint: true }
53
+ }, guarded(async ({ root, drafts }) => {
54
+ const cfg = await config(root);
55
+ const registry = await extractProject(cfg);
56
+ const catalogs = loadCatalogs(cfg);
57
+ const result = check(cfg, catalogs, registry);
58
+ const unreviewed = drafts ? Object.entries(effectiveDrafts(loadDrafts(cfg), catalogs)) : [];
59
+ const lines = [];
60
+ if (!result.ok) lines.push(formatCheckResult(result));
61
+ for (const [locale, keys] of unreviewed) if (keys.length) lines.push(`[${locale}] ${keys.length} unreviewed: ${keys.join(", ")}`);
62
+ if (lines.length === 0) return text("all translations complete");
63
+ return text(lines.join("\n"));
64
+ }));
65
+ server.registerTool("verbaly_extract", {
66
+ title: "Extract messages",
67
+ description: "Scan the source files, add new messages to the locale catalogs and refresh the generated types (what `verbaly extract` does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.",
68
+ inputSchema: {
69
+ root: rootInput,
70
+ prune: z.boolean().optional().describe("Drop keys no longer referenced (deletes their translations)"),
71
+ dryRun: z.boolean().optional().describe("Report what would change, write nothing")
72
+ }
73
+ }, guarded(async ({ root, prune, dryRun }) => {
74
+ const cfg = await config(root);
75
+ const registry = await extractProject(cfg);
76
+ const catalogs = loadCatalogs(cfg);
77
+ const lines = [];
78
+ if (prune) {
79
+ const removed = pruneCatalogs(cfg, catalogs, registry);
80
+ for (const [locale, keys] of Object.entries(removed)) lines.push(dryRun ? `${locale}: would prune ${keys.length}: ${keys.join(", ")}` : `${locale}: ${keys.length} pruned`);
81
+ }
82
+ const { added } = syncCatalogs(cfg, catalogs, registry);
83
+ if (!dryRun) {
84
+ for (const locale of cfg.locales) writeCatalog(cfg, locale, catalogs[locale] ?? {});
85
+ if (cfg.dts !== false) writeDts(cfg, catalogs[cfg.sourceLocale] ?? {}, cfg.dts);
86
+ }
87
+ lines.unshift(`${registry.messages().size} messages · locales: ${cfg.locales.join(", ")}${dryRun ? " (dry run, nothing written)" : ""}`);
88
+ for (const [locale, keys] of Object.entries(added)) lines.push(`${locale}: ${dryRun ? `would add ${keys.length}` : `+${keys.length} added`}`);
89
+ return text(lines.join("\n"));
90
+ }));
91
+ server.registerTool("verbaly_translate", {
92
+ title: "Machine-translate missing entries",
93
+ description: "Fill missing translations with the configured provider (default: Claude, needs @anthropic-ai/sdk and ANTHROPIC_API_KEY). New translations are saved as drafts awaiting human review (`verbaly review`). dryRun lists what would be translated without calling the provider.",
94
+ inputSchema: {
95
+ root: rootInput,
96
+ locales: z.array(z.string()).optional().describe("Target locales (default: all)"),
97
+ dryRun: z.boolean().optional().describe("List missing entries per locale, call no provider")
98
+ }
99
+ }, guarded(async ({ root, locales, dryRun }) => {
100
+ const cfg = await config(root);
101
+ const catalogs = loadCatalogs(cfg);
102
+ const result = await translateCatalogs(cfg, catalogs, await resolveProvider(cfg), {
103
+ locales,
104
+ batchSize: cfg.translate.batchSize,
105
+ dryRun,
106
+ origins: dryRun ? void 0 : await collectOrigins(cfg)
107
+ });
108
+ if (dryRun) {
109
+ const entries = Object.entries(result.pending);
110
+ if (entries.length === 0) return text("nothing to translate");
111
+ return text(entries.map(([locale, keys]) => `${locale}: ${keys.length} missing: ${keys.join(", ")}`).join("\n"));
112
+ }
113
+ const lines = [];
114
+ const drafts = loadDrafts(cfg);
115
+ for (const locale of Object.keys(result.translated)) {
116
+ writeCatalog(cfg, locale, catalogs[locale] ?? {});
117
+ markDrafts(drafts, locale, result.translated[locale]);
118
+ lines.push(`${locale}: +${result.translated[locale].length} translated (draft)`);
119
+ }
120
+ if (Object.keys(result.translated).length > 0) saveDrafts(cfg, drafts);
121
+ for (const [locale, keys] of Object.entries(result.invalid)) lines.push(`${locale}: ${keys.length} rejected (params/tags not preserved): ${keys.join(", ")}`);
122
+ if (lines.length === 0) return text("nothing to translate");
123
+ lines.push("drafts await human review: verbaly review (--approve accepts them)");
124
+ return text(lines.join("\n"));
125
+ }));
126
+ return server;
127
+ }
128
+ //#endregion
129
+ //#region src/cli.ts
130
+ const { values } = parseArgs({ options: { root: { type: "string" } } });
131
+ try {
132
+ await createVerbalyMcp({ root: values.root }).connect(new StdioServerTransport());
133
+ console.error("[verbaly-mcp] ready (stdio)");
134
+ } catch (error) {
135
+ console.error("[verbaly-mcp]", error instanceof Error ? error.message : error);
136
+ process.exitCode = 1;
137
+ }
138
+ //#endregion
139
+ export {};
140
+
141
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/server.ts","../src/cli.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport {\n check,\n collectOrigins,\n effectiveDrafts,\n extractProject,\n formatCheckResult,\n formatStatusResult,\n loadCatalogs,\n loadConfig,\n loadDrafts,\n markDrafts,\n pruneCatalogs,\n resolveProvider,\n saveDrafts,\n status,\n syncCatalogs,\n translateCatalogs,\n writeCatalog,\n writeDts,\n type ResolvedConfig,\n} from '@verbaly/compiler';\nimport { createRequire } from 'node:module';\nimport { z } from 'zod';\n\nconst { version } = createRequire(import.meta.url)('../package.json') as { version: string };\n\nexport interface VerbalyMcpOptions {\n root?: string;\n}\n\nconst text = (body: string): CallToolResult => ({ content: [{ type: 'text', text: body }] });\n\nconst rootInput = z\n .string()\n .optional()\n .describe('Project root holding verbaly.config (defaults to the server working directory)');\n\nexport function createVerbalyMcp(options: VerbalyMcpOptions = {}): McpServer {\n const server = new McpServer({ name: 'verbaly', version });\n\n const config = (root?: string): Promise<ResolvedConfig> =>\n loadConfig(root ?? options.root ?? process.cwd());\n\n // agents act on messages, not stack traces: every failure comes back as actionable text\n const guarded =\n <A>(run: (args: A) => Promise<CallToolResult>) =>\n async (args: A): Promise<CallToolResult> => {\n try {\n return await run(args);\n } catch (error) {\n return {\n content: [\n { type: 'text', text: error instanceof Error ? error.message : String(error) },\n ],\n isError: true,\n };\n }\n };\n\n server.registerTool(\n 'verbaly_status',\n {\n title: 'Translation coverage',\n description:\n 'Translation coverage of the Verbaly project: total messages, translated count per locale and machine translations awaiting review (drafts). Read-only.',\n inputSchema: { root: rootInput },\n annotations: { readOnlyHint: true },\n },\n guarded(async ({ root }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const result = status(cfg, loadCatalogs(cfg), registry, loadDrafts(cfg));\n return text(formatStatusResult(result));\n }),\n );\n\n server.registerTool(\n 'verbaly_missing',\n {\n title: 'Missing translations',\n description:\n 'List missing translations and unknown keys, the same gate `verbaly check` runs in CI. Optionally also lists machine translations awaiting review. Read-only.',\n inputSchema: {\n root: rootInput,\n drafts: z\n .boolean()\n .optional()\n .describe('Also list machine translations awaiting human review'),\n },\n annotations: { readOnlyHint: true },\n },\n guarded(async ({ root, drafts }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const catalogs = loadCatalogs(cfg);\n const result = check(cfg, catalogs, registry);\n const unreviewed = drafts ? Object.entries(effectiveDrafts(loadDrafts(cfg), catalogs)) : [];\n\n const lines: string[] = [];\n if (!result.ok) lines.push(formatCheckResult(result));\n for (const [locale, keys] of unreviewed) {\n if (keys.length) lines.push(`[${locale}] ${keys.length} unreviewed: ${keys.join(', ')}`);\n }\n if (lines.length === 0) return text('all translations complete');\n return text(lines.join('\\n'));\n }),\n );\n\n server.registerTool(\n 'verbaly_extract',\n {\n title: 'Extract messages',\n description:\n 'Scan the source files, add new messages to the locale catalogs and refresh the generated types (what `verbaly extract` does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.',\n inputSchema: {\n root: rootInput,\n prune: z\n .boolean()\n .optional()\n .describe('Drop keys no longer referenced (deletes their translations)'),\n dryRun: z.boolean().optional().describe('Report what would change, write nothing'),\n },\n },\n guarded(async ({ root, prune, dryRun }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const catalogs = loadCatalogs(cfg);\n\n const lines: string[] = [];\n if (prune) {\n const removed = pruneCatalogs(cfg, catalogs, registry);\n for (const [locale, keys] of Object.entries(removed)) {\n lines.push(\n dryRun\n ? `${locale}: would prune ${keys.length}: ${keys.join(', ')}`\n : `${locale}: ${keys.length} pruned`,\n );\n }\n }\n const { added } = syncCatalogs(cfg, catalogs, registry);\n if (!dryRun) {\n for (const locale of cfg.locales) {\n writeCatalog(cfg, locale, catalogs[locale] ?? {});\n }\n if (cfg.dts !== false) writeDts(cfg, catalogs[cfg.sourceLocale] ?? {}, cfg.dts);\n }\n lines.unshift(\n `${registry.messages().size} messages · locales: ${cfg.locales.join(', ')}${dryRun ? ' (dry run, nothing written)' : ''}`,\n );\n for (const [locale, keys] of Object.entries(added)) {\n lines.push(`${locale}: ${dryRun ? `would add ${keys.length}` : `+${keys.length} added`}`);\n }\n return text(lines.join('\\n'));\n }),\n );\n\n server.registerTool(\n 'verbaly_translate',\n {\n title: 'Machine-translate missing entries',\n description:\n 'Fill missing translations with the configured provider (default: Claude, needs @anthropic-ai/sdk and ANTHROPIC_API_KEY). New translations are saved as drafts awaiting human review (`verbaly review`). dryRun lists what would be translated without calling the provider.',\n inputSchema: {\n root: rootInput,\n locales: z.array(z.string()).optional().describe('Target locales (default: all)'),\n dryRun: z\n .boolean()\n .optional()\n .describe('List missing entries per locale, call no provider'),\n },\n },\n guarded(async ({ root, locales, dryRun }) => {\n const cfg = await config(root);\n const catalogs = loadCatalogs(cfg);\n const provider = await resolveProvider(cfg);\n const result = await translateCatalogs(cfg, catalogs, provider, {\n locales,\n batchSize: cfg.translate.batchSize,\n dryRun,\n origins: dryRun ? undefined : await collectOrigins(cfg),\n });\n\n if (dryRun) {\n const entries = Object.entries(result.pending);\n if (entries.length === 0) return text('nothing to translate');\n return text(\n entries\n .map(([locale, keys]) => `${locale}: ${keys.length} missing: ${keys.join(', ')}`)\n .join('\\n'),\n );\n }\n\n const lines: string[] = [];\n const drafts = loadDrafts(cfg);\n for (const locale of Object.keys(result.translated)) {\n writeCatalog(cfg, locale, catalogs[locale] ?? {});\n markDrafts(drafts, locale, result.translated[locale]!);\n lines.push(`${locale}: +${result.translated[locale]!.length} translated (draft)`);\n }\n if (Object.keys(result.translated).length > 0) saveDrafts(cfg, drafts);\n for (const [locale, keys] of Object.entries(result.invalid)) {\n lines.push(`${locale}: ${keys.length} rejected (params/tags not preserved): ${keys.join(', ')}`);\n }\n if (lines.length === 0) return text('nothing to translate');\n lines.push('drafts await human review: verbaly review (--approve accepts them)');\n return text(lines.join('\\n'));\n }),\n );\n\n return server;\n}\n","#!/usr/bin/env node\nimport { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';\nimport { parseArgs } from 'node:util';\nimport { createVerbalyMcp } from './server';\n\nconst { values } = parseArgs({ options: { root: { type: 'string' } } });\n\ntry {\n await createVerbalyMcp({ root: values.root }).connect(new StdioServerTransport());\n // stdout carries the protocol: any human-facing note goes to stderr\n console.error('[verbaly-mcp] ready (stdio)');\n} catch (error) {\n console.error('[verbaly-mcp]', error instanceof Error ? error.message : error);\n process.exitCode = 1;\n}\n"],"mappings":";;;;;;;;AA0BA,MAAM,EAAE,YAAY,cAAc,OAAO,KAAK,GAAG,CAAC,CAAC,iBAAiB;AAMpE,MAAM,QAAQ,UAAkC,EAAE,SAAS,CAAC;CAAE,MAAM;CAAQ,MAAM;AAAK,CAAC,EAAE;AAE1F,MAAM,YAAY,EACf,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SAAS,gFAAgF;AAE5F,SAAgB,iBAAiB,UAA6B,CAAC,GAAc;CAC3E,MAAM,SAAS,IAAI,UAAU;EAAE,MAAM;EAAW;CAAQ,CAAC;CAEzD,MAAM,UAAU,SACd,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAGlD,MAAM,WACA,QACJ,OAAO,SAAqC;EAC1C,IAAI;GACF,OAAO,MAAM,IAAI,IAAI;EACvB,SAAS,OAAO;GACd,OAAO;IACL,SAAS,CACP;KAAE,MAAM;KAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAAE,CAC/E;IACA,SAAS;GACX;EACF;CACF;CAEF,OAAO,aACL,kBACA;EACE,OAAO;EACP,aACE;EACF,aAAa,EAAE,MAAM,UAAU;EAC/B,aAAa,EAAE,cAAc,KAAK;CACpC,GACA,QAAQ,OA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AAE,EAAE,CAAC;AAEtE,IAAI;CACF,MAAM,iBAAiB,EAAE,MAAM,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,IAAI,qBAAqB,CAAC;CAEhF,QAAQ,MAAM,6BAA6B;AAC7C,SAAS,OAAO;CACd,QAAQ,MAAM,iBAAiB,iBAAiB,QAAQ,MAAM,UAAU,KAAK;CAC7E,QAAQ,WAAW;AACrB"}
@@ -0,0 +1,9 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ //#region src/server.d.ts
3
+ interface VerbalyMcpOptions {
4
+ root?: string;
5
+ }
6
+ declare function createVerbalyMcp(options?: VerbalyMcpOptions): McpServer;
7
+ //#endregion
8
+ export { type VerbalyMcpOptions, createVerbalyMcp };
9
+ //# sourceMappingURL=index.d.ts.map
package/dist/index.js ADDED
@@ -0,0 +1,128 @@
1
+ import { createRequire } from "node:module";
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { check, collectOrigins, effectiveDrafts, extractProject, formatCheckResult, formatStatusResult, loadCatalogs, loadConfig, loadDrafts, markDrafts, pruneCatalogs, resolveProvider, saveDrafts, status, syncCatalogs, translateCatalogs, writeCatalog, writeDts } from "@verbaly/compiler";
4
+ import { z } from "zod";
5
+ //#region src/server.ts
6
+ const { version } = createRequire(import.meta.url)("../package.json");
7
+ const text = (body) => ({ content: [{
8
+ type: "text",
9
+ text: body
10
+ }] });
11
+ const rootInput = z.string().optional().describe("Project root holding verbaly.config (defaults to the server working directory)");
12
+ function createVerbalyMcp(options = {}) {
13
+ const server = new McpServer({
14
+ name: "verbaly",
15
+ version
16
+ });
17
+ const config = (root) => loadConfig(root ?? options.root ?? process.cwd());
18
+ const guarded = (run) => async (args) => {
19
+ try {
20
+ return await run(args);
21
+ } catch (error) {
22
+ return {
23
+ content: [{
24
+ type: "text",
25
+ text: error instanceof Error ? error.message : String(error)
26
+ }],
27
+ isError: true
28
+ };
29
+ }
30
+ };
31
+ server.registerTool("verbaly_status", {
32
+ title: "Translation coverage",
33
+ description: "Translation coverage of the Verbaly project: total messages, translated count per locale and machine translations awaiting review (drafts). Read-only.",
34
+ inputSchema: { root: rootInput },
35
+ annotations: { readOnlyHint: true }
36
+ }, guarded(async ({ root }) => {
37
+ const cfg = await config(root);
38
+ const registry = await extractProject(cfg);
39
+ const result = status(cfg, loadCatalogs(cfg), registry, loadDrafts(cfg));
40
+ return text(formatStatusResult(result));
41
+ }));
42
+ server.registerTool("verbaly_missing", {
43
+ title: "Missing translations",
44
+ description: "List missing translations and unknown keys, the same gate `verbaly check` runs in CI. Optionally also lists machine translations awaiting review. Read-only.",
45
+ inputSchema: {
46
+ root: rootInput,
47
+ drafts: z.boolean().optional().describe("Also list machine translations awaiting human review")
48
+ },
49
+ annotations: { readOnlyHint: true }
50
+ }, guarded(async ({ root, drafts }) => {
51
+ const cfg = await config(root);
52
+ const registry = await extractProject(cfg);
53
+ const catalogs = loadCatalogs(cfg);
54
+ const result = check(cfg, catalogs, registry);
55
+ const unreviewed = drafts ? Object.entries(effectiveDrafts(loadDrafts(cfg), catalogs)) : [];
56
+ const lines = [];
57
+ if (!result.ok) lines.push(formatCheckResult(result));
58
+ for (const [locale, keys] of unreviewed) if (keys.length) lines.push(`[${locale}] ${keys.length} unreviewed: ${keys.join(", ")}`);
59
+ if (lines.length === 0) return text("all translations complete");
60
+ return text(lines.join("\n"));
61
+ }));
62
+ server.registerTool("verbaly_extract", {
63
+ title: "Extract messages",
64
+ description: "Scan the source files, add new messages to the locale catalogs and refresh the generated types (what `verbaly extract` does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.",
65
+ inputSchema: {
66
+ root: rootInput,
67
+ prune: z.boolean().optional().describe("Drop keys no longer referenced (deletes their translations)"),
68
+ dryRun: z.boolean().optional().describe("Report what would change, write nothing")
69
+ }
70
+ }, guarded(async ({ root, prune, dryRun }) => {
71
+ const cfg = await config(root);
72
+ const registry = await extractProject(cfg);
73
+ const catalogs = loadCatalogs(cfg);
74
+ const lines = [];
75
+ if (prune) {
76
+ const removed = pruneCatalogs(cfg, catalogs, registry);
77
+ for (const [locale, keys] of Object.entries(removed)) lines.push(dryRun ? `${locale}: would prune ${keys.length}: ${keys.join(", ")}` : `${locale}: ${keys.length} pruned`);
78
+ }
79
+ const { added } = syncCatalogs(cfg, catalogs, registry);
80
+ if (!dryRun) {
81
+ for (const locale of cfg.locales) writeCatalog(cfg, locale, catalogs[locale] ?? {});
82
+ if (cfg.dts !== false) writeDts(cfg, catalogs[cfg.sourceLocale] ?? {}, cfg.dts);
83
+ }
84
+ lines.unshift(`${registry.messages().size} messages · locales: ${cfg.locales.join(", ")}${dryRun ? " (dry run, nothing written)" : ""}`);
85
+ for (const [locale, keys] of Object.entries(added)) lines.push(`${locale}: ${dryRun ? `would add ${keys.length}` : `+${keys.length} added`}`);
86
+ return text(lines.join("\n"));
87
+ }));
88
+ server.registerTool("verbaly_translate", {
89
+ title: "Machine-translate missing entries",
90
+ description: "Fill missing translations with the configured provider (default: Claude, needs @anthropic-ai/sdk and ANTHROPIC_API_KEY). New translations are saved as drafts awaiting human review (`verbaly review`). dryRun lists what would be translated without calling the provider.",
91
+ inputSchema: {
92
+ root: rootInput,
93
+ locales: z.array(z.string()).optional().describe("Target locales (default: all)"),
94
+ dryRun: z.boolean().optional().describe("List missing entries per locale, call no provider")
95
+ }
96
+ }, guarded(async ({ root, locales, dryRun }) => {
97
+ const cfg = await config(root);
98
+ const catalogs = loadCatalogs(cfg);
99
+ const result = await translateCatalogs(cfg, catalogs, await resolveProvider(cfg), {
100
+ locales,
101
+ batchSize: cfg.translate.batchSize,
102
+ dryRun,
103
+ origins: dryRun ? void 0 : await collectOrigins(cfg)
104
+ });
105
+ if (dryRun) {
106
+ const entries = Object.entries(result.pending);
107
+ if (entries.length === 0) return text("nothing to translate");
108
+ return text(entries.map(([locale, keys]) => `${locale}: ${keys.length} missing: ${keys.join(", ")}`).join("\n"));
109
+ }
110
+ const lines = [];
111
+ const drafts = loadDrafts(cfg);
112
+ for (const locale of Object.keys(result.translated)) {
113
+ writeCatalog(cfg, locale, catalogs[locale] ?? {});
114
+ markDrafts(drafts, locale, result.translated[locale]);
115
+ lines.push(`${locale}: +${result.translated[locale].length} translated (draft)`);
116
+ }
117
+ if (Object.keys(result.translated).length > 0) saveDrafts(cfg, drafts);
118
+ for (const [locale, keys] of Object.entries(result.invalid)) lines.push(`${locale}: ${keys.length} rejected (params/tags not preserved): ${keys.join(", ")}`);
119
+ if (lines.length === 0) return text("nothing to translate");
120
+ lines.push("drafts await human review: verbaly review (--approve accepts them)");
121
+ return text(lines.join("\n"));
122
+ }));
123
+ return server;
124
+ }
125
+ //#endregion
126
+ export { createVerbalyMcp };
127
+
128
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/server.ts"],"sourcesContent":["import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';\nimport {\n check,\n collectOrigins,\n effectiveDrafts,\n extractProject,\n formatCheckResult,\n formatStatusResult,\n loadCatalogs,\n loadConfig,\n loadDrafts,\n markDrafts,\n pruneCatalogs,\n resolveProvider,\n saveDrafts,\n status,\n syncCatalogs,\n translateCatalogs,\n writeCatalog,\n writeDts,\n type ResolvedConfig,\n} from '@verbaly/compiler';\nimport { createRequire } from 'node:module';\nimport { z } from 'zod';\n\nconst { version } = createRequire(import.meta.url)('../package.json') as { version: string };\n\nexport interface VerbalyMcpOptions {\n root?: string;\n}\n\nconst text = (body: string): CallToolResult => ({ content: [{ type: 'text', text: body }] });\n\nconst rootInput = z\n .string()\n .optional()\n .describe('Project root holding verbaly.config (defaults to the server working directory)');\n\nexport function createVerbalyMcp(options: VerbalyMcpOptions = {}): McpServer {\n const server = new McpServer({ name: 'verbaly', version });\n\n const config = (root?: string): Promise<ResolvedConfig> =>\n loadConfig(root ?? options.root ?? process.cwd());\n\n // agents act on messages, not stack traces: every failure comes back as actionable text\n const guarded =\n <A>(run: (args: A) => Promise<CallToolResult>) =>\n async (args: A): Promise<CallToolResult> => {\n try {\n return await run(args);\n } catch (error) {\n return {\n content: [\n { type: 'text', text: error instanceof Error ? error.message : String(error) },\n ],\n isError: true,\n };\n }\n };\n\n server.registerTool(\n 'verbaly_status',\n {\n title: 'Translation coverage',\n description:\n 'Translation coverage of the Verbaly project: total messages, translated count per locale and machine translations awaiting review (drafts). Read-only.',\n inputSchema: { root: rootInput },\n annotations: { readOnlyHint: true },\n },\n guarded(async ({ root }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const result = status(cfg, loadCatalogs(cfg), registry, loadDrafts(cfg));\n return text(formatStatusResult(result));\n }),\n );\n\n server.registerTool(\n 'verbaly_missing',\n {\n title: 'Missing translations',\n description:\n 'List missing translations and unknown keys, the same gate `verbaly check` runs in CI. Optionally also lists machine translations awaiting review. Read-only.',\n inputSchema: {\n root: rootInput,\n drafts: z\n .boolean()\n .optional()\n .describe('Also list machine translations awaiting human review'),\n },\n annotations: { readOnlyHint: true },\n },\n guarded(async ({ root, drafts }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const catalogs = loadCatalogs(cfg);\n const result = check(cfg, catalogs, registry);\n const unreviewed = drafts ? Object.entries(effectiveDrafts(loadDrafts(cfg), catalogs)) : [];\n\n const lines: string[] = [];\n if (!result.ok) lines.push(formatCheckResult(result));\n for (const [locale, keys] of unreviewed) {\n if (keys.length) lines.push(`[${locale}] ${keys.length} unreviewed: ${keys.join(', ')}`);\n }\n if (lines.length === 0) return text('all translations complete');\n return text(lines.join('\\n'));\n }),\n );\n\n server.registerTool(\n 'verbaly_extract',\n {\n title: 'Extract messages',\n description:\n 'Scan the source files, add new messages to the locale catalogs and refresh the generated types (what `verbaly extract` does). Writes catalog files unless dryRun is set. prune drops keys no longer referenced in the code, translations included.',\n inputSchema: {\n root: rootInput,\n prune: z\n .boolean()\n .optional()\n .describe('Drop keys no longer referenced (deletes their translations)'),\n dryRun: z.boolean().optional().describe('Report what would change, write nothing'),\n },\n },\n guarded(async ({ root, prune, dryRun }) => {\n const cfg = await config(root);\n const registry = await extractProject(cfg);\n const catalogs = loadCatalogs(cfg);\n\n const lines: string[] = [];\n if (prune) {\n const removed = pruneCatalogs(cfg, catalogs, registry);\n for (const [locale, keys] of Object.entries(removed)) {\n lines.push(\n dryRun\n ? `${locale}: would prune ${keys.length}: ${keys.join(', ')}`\n : `${locale}: ${keys.length} pruned`,\n );\n }\n }\n const { added } = syncCatalogs(cfg, catalogs, registry);\n if (!dryRun) {\n for (const locale of cfg.locales) {\n writeCatalog(cfg, locale, catalogs[locale] ?? {});\n }\n if (cfg.dts !== false) writeDts(cfg, catalogs[cfg.sourceLocale] ?? {}, cfg.dts);\n }\n lines.unshift(\n `${registry.messages().size} messages · locales: ${cfg.locales.join(', ')}${dryRun ? ' (dry run, nothing written)' : ''}`,\n );\n for (const [locale, keys] of Object.entries(added)) {\n lines.push(`${locale}: ${dryRun ? `would add ${keys.length}` : `+${keys.length} added`}`);\n }\n return text(lines.join('\\n'));\n }),\n );\n\n server.registerTool(\n 'verbaly_translate',\n {\n title: 'Machine-translate missing entries',\n description:\n 'Fill missing translations with the configured provider (default: Claude, needs @anthropic-ai/sdk and ANTHROPIC_API_KEY). New translations are saved as drafts awaiting human review (`verbaly review`). dryRun lists what would be translated without calling the provider.',\n inputSchema: {\n root: rootInput,\n locales: z.array(z.string()).optional().describe('Target locales (default: all)'),\n dryRun: z\n .boolean()\n .optional()\n .describe('List missing entries per locale, call no provider'),\n },\n },\n guarded(async ({ root, locales, dryRun }) => {\n const cfg = await config(root);\n const catalogs = loadCatalogs(cfg);\n const provider = await resolveProvider(cfg);\n const result = await translateCatalogs(cfg, catalogs, provider, {\n locales,\n batchSize: cfg.translate.batchSize,\n dryRun,\n origins: dryRun ? undefined : await collectOrigins(cfg),\n });\n\n if (dryRun) {\n const entries = Object.entries(result.pending);\n if (entries.length === 0) return text('nothing to translate');\n return text(\n entries\n .map(([locale, keys]) => `${locale}: ${keys.length} missing: ${keys.join(', ')}`)\n .join('\\n'),\n );\n }\n\n const lines: string[] = [];\n const drafts = loadDrafts(cfg);\n for (const locale of Object.keys(result.translated)) {\n writeCatalog(cfg, locale, catalogs[locale] ?? {});\n markDrafts(drafts, locale, result.translated[locale]!);\n lines.push(`${locale}: +${result.translated[locale]!.length} translated (draft)`);\n }\n if (Object.keys(result.translated).length > 0) saveDrafts(cfg, drafts);\n for (const [locale, keys] of Object.entries(result.invalid)) {\n lines.push(`${locale}: ${keys.length} rejected (params/tags not preserved): ${keys.join(', ')}`);\n }\n if (lines.length === 0) return text('nothing to translate');\n lines.push('drafts await human review: verbaly review (--approve accepts them)');\n return text(lines.join('\\n'));\n }),\n );\n\n return server;\n}\n"],"mappings":";;;;;AA0BA,MAAM,EAAE,YAAY,cAAc,OAAO,KAAK,GAAG,CAAC,CAAC,iBAAiB;AAMpE,MAAM,QAAQ,UAAkC,EAAE,SAAS,CAAC;CAAE,MAAM;CAAQ,MAAM;AAAK,CAAC,EAAE;AAE1F,MAAM,YAAY,EACf,OAAO,CAAC,CACR,SAAS,CAAC,CACV,SAAS,gFAAgF;AAE5F,SAAgB,iBAAiB,UAA6B,CAAC,GAAc;CAC3E,MAAM,SAAS,IAAI,UAAU;EAAE,MAAM;EAAW;CAAQ,CAAC;CAEzD,MAAM,UAAU,SACd,WAAW,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAGlD,MAAM,WACA,QACJ,OAAO,SAAqC;EAC1C,IAAI;GACF,OAAO,MAAM,IAAI,IAAI;EACvB,SAAS,OAAO;GACd,OAAO;IACL,SAAS,CACP;KAAE,MAAM;KAAQ,MAAM,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAAE,CAC/E;IACA,SAAS;GACX;EACF;CACF;CAEF,OAAO,aACL,kBACA;EACE,OAAO;EACP,aACE;EACF,aAAa,EAAE,MAAM,UAAU;EAC/B,aAAa,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{
2
+ "name": "@verbaly/mcp",
3
+ "version": "0.29.0",
4
+ "description": "MCP server for Verbaly: translation status, missing keys, extraction and machine translation as tools for coding agents.",
5
+ "keywords": [
6
+ "i18n",
7
+ "mcp",
8
+ "model-context-protocol",
9
+ "agent",
10
+ "verbaly"
11
+ ],
12
+ "license": "MIT",
13
+ "author": "Aron Soto",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/AronSoto/verbaly.git",
17
+ "directory": "packages/mcp"
18
+ },
19
+ "homepage": "https://verbaly-web.vercel.app/docs/reference/cli",
20
+ "bugs": {
21
+ "url": "https://github.com/AronSoto/verbaly/issues"
22
+ },
23
+ "type": "module",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js"
29
+ }
30
+ },
31
+ "bin": {
32
+ "verbaly-mcp": "./dist/cli.js"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "LICENSE"
37
+ ],
38
+ "sideEffects": false,
39
+ "engines": {
40
+ "node": ">=20"
41
+ },
42
+ "publishConfig": {
43
+ "access": "public"
44
+ },
45
+ "dependencies": {
46
+ "@modelcontextprotocol/sdk": "^1.30.0",
47
+ "zod": "^4.4.3",
48
+ "@verbaly/compiler": "^0.29.0"
49
+ },
50
+ "devDependencies": {
51
+ "@types/node": "^26.1.1"
52
+ },
53
+ "scripts": {
54
+ "build": "tsdown",
55
+ "dev": "tsdown --watch",
56
+ "test": "vitest run --passWithNoTests",
57
+ "typecheck": "tsc --noEmit"
58
+ }
59
+ }