Tämä integrointiohje on saatavilla vain englanniksi.
BeMyWords as an MCP server (Claude Code, Cursor, Lovable)
Connect any MCP client to your BeMyWords workspace and an AI assistant can manage translations by conversation: check what's missing, register new source strings the moment it writes them, respect your glossary, fetch translation files into a project, and propose edits — which always land as needs review, never self-approved.
Shape of the integration:
- Create a Personal Access Token — for one project, or one for the whole workspace.
- Add BeMyWords to your MCP client by URL, with the token as a Bearer token.
- Ask the assistant to work: "What's missing in Norwegian?" — "Register these strings and fetch the nb file into src/locales."
Everything an assistant writes is attributed to you (the token's owner) with the assistant named as the instrument, labeled Assistant edit in the editor, and lands as needs-review for a human to approve.
Prerequisites
- A BeMyWords account and at least one project.
- A Personal Access Token, created under your avatar → Personal access tokens. Choose a single project, or "Whole workspace — every project" for a workspace token (starts with
pat_ws_) that lets one connection manage all your projects.
1. The server URL
Two scopes:
# One project
https://app.bemywords.no/api/<project-id>/mcp
# The whole workspace (requires a workspace token)
https://app.bemywords.no/api/mcp
The project id is in the project's URL in the dashboard, or ask the assistant to call list_projects on a workspace connection.
2. Connect your client
Claude Code
claude mcp add bemywords https://app.bemywords.no/api/mcp \
--transport http \
--header "Authorization: Bearer pat_ws_…"
Cursor — Settings → MCP → Add server: URL as above, auth header Authorization: Bearer <token>.
Lovable / v0 — add a custom connector: name BeMyWords, the URL above, auth type Bearer token. Both document custom connectors as development-time only: the assistant uses BeMyWords while it builds. What it leaves behind is one of two things — the Embed script tag in the app's HTML (the default: pages translate in the visitor's browser), or, if you ask for it, translation files inside the project. Their connector UIs are their own and change; if the flow differs from this, tell us and we'll correct the page.
3. What the assistant can do
Read — list_projects, get_project_status (per-language missing/drifted counts), get_embed_snippet (the project's script tag — the simplest way to ship), search_translations, get_translation (one key across languages, with comments), get_translations (a whole language as a json/yml/po/strings file, for translations inside a build), list_terminology (glossary, do-not-translate, substitution rules), get_checkup_report.
Write — enable_language (turn a target language on), register_source_strings (new keys only — an existing value is never changed), add_key, update_translation (lands as needs-review), set_translation_status, add_comment, flag_translation, add_glossary_term, and a bounded ai_translate_keys (approved translations are never overwritten).
Order matters for a new language: enable_language first, then register the strings. Anything registered after a language is on is translated into it automatically; strings that were already there need ai_translate_keys or the Translate action in the app.
4. Read-only connections
Send the header X-BeMyWords-Read-Only: 1 and the connection exposes only the read tools — useful for a dashboard assistant that should never touch copy.
5. A prompt to start from
App builders install by prompt the way a hosted site installs by script tag. Paste this into the builder's chat — the same text, prefilled with your project's URL, is on the project's Connect page:
Add an MCP connector named "BeMyWords": URL
https://app.bemywords.no/api/<project-id>/mcp, auth type Bearer token, token<paste your BeMyWords personal access token>.Then use it to make this app multilingual: - Call
get_project_statusfirst to see the source language, the languages already on, and the namespace keys. - Callenable_languagefor each language I asked for, before registering any strings. - Whenever you write user-facing text, register it withregister_source_stringsunder the namespace "app", keyed likesection.element. Never invent your own translations. - Followlist_terminologyin everything you write: glossary pairs are fixed, do-not-translate terms stay verbatim. - Ship it withget_embed_snippet: paste the script tag it returns into the app's HTML head (index.html). That translates every page in the visitor's browser and adds a language switcher — no translation files, no i18n library. - After adding new text later, just register it; the script picks it up. (Only if I ask for translation files in the build instead: wait untilget_project_statusshowsmissing= 0 for each language, then fetch each one withget_translationsintosrc/locales/<language>.json.)
The server also hands every client the same guidance at connection time (MCP instructions), so an assistant that was never given this prompt still lands on the same loop. Adapt the paths to whatever the builder generated — the only fixed parts are the tool names and the order.
Why Embed is the default here. A builder's app evolves by conversation — every "add a section" creates strings — and the script picks up newly registered text without another fetch. Files are the right choice when the translations must live in the repo, and the alternative is one sentence away in the prompt.
Notes
- Rate and word accounting are the same as the editor: AI translation through MCP accrues to the same usage meters.
- A workspace token never reaches outside its workspace; a project token never reaches outside its project.
- Revoke a token under Personal access tokens and the connection stops immediately.