Polyprompt
FreeNot checkedAn MCP server that translates your coding prompts from your native language into a target language, enabling you to learn a new language through immersion and s
About
An MCP server that translates your coding prompts from your native language into a target language, enabling you to learn a new language through immersion and spaced repetition while building software.
README
Code with Claude, Codex or Gemini in your own language — and learn a new one while you build.
Polyprompt is an MCP server. You write your coding prompts in your native language (say, Italian); Polyprompt translates them into the language you want to learn (say, English), the AI agent does the work in that language, and every useful new word is saved and resurfaced with spaced repetition.
You learn a language passively, in the flow of real work, using the AI subscription you already pay for — no extra API key required.
You: "crea un endpoint REST per gli utenti"
↓ translate tool
Polyprompt: Italian → English
"create a REST endpoint for users"
endpoint — punto di accesso (noun) · users — utenti (noun)
↓
Agent builds the feature in English; the new words enter your review deck.
Two ways to learn
Polyprompt works in both directions — corrections one way, immersion the other — right inside your editor while you ship.
| Mode | You write in… | Polyprompt gives you… |
|---|---|---|
| Immersion | your native language (Italian) | the target translation (English) + a glossary, so you learn by osmosis |
| Tutor | the target language (English) | your mistakes corrected, each explained in your native language, plus an improved version |
Tutor mode — you try to write in English:
You: "add validate to the form and create a users"
↓ correct tool
Polyprompt: "add validation to the form and create a user"
"add validate" → "add validation" — 'validate' è un verbo; serve il sostantivo
"create a users" → "create a user" — dopo "a" va il singolare
↓
Agent builds the feature; you just learned two fixes — in Italian.
The agent picks the direction automatically from the language you wrote in (or pin one
with mode: immersion | tutor).
Why
Most developers learn technical English by osmosis — badly, slowly, and with gaps. Polyprompt turns the thousands of prompts you already write into deliberate, spaced language practice, without adding a separate study habit. Native in, target out, vocabulary remembered.
- Immersion, not friction — think in your language, ship in the one you're learning.
- Uses your subscription — translation runs on the host model via MCP sampling, so there's nothing extra to pay for or configure (API keys are optional fallbacks).
- Works everywhere MCP does — Claude Code, Codex CLI, Gemini CLI, and any other MCP client.
- Real spaced repetition — an SM-2 scheduler turns sightings into durable memory.
Quick start
One command installs Polyprompt, picks your languages, and connects it to every AI client it finds (Claude Code, Codex, Gemini) — all in one step:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/DisSa12/polyprompt/main/install.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/DisSa12/polyprompt/main/install.ps1 | iex
Target a single client with --client claude (sh) or -Client claude (PowerShell).
Prefer to do it by hand? It's still two small steps:
npm install -g polyprompt # 1. install (Node 18+); "npx -y polyprompt <cmd>" also works
polyprompt setup # 2. pick languages + connect your AI client(s) automatically
# polyprompt init --native it --target en # language setup only, no client wiring
Then just code. When you write in Italian, the agent calls translate, works in
English, and shows you what you said in English plus the new words.
Tip: ask your agent once — "use Polyprompt immersion mode" — or load the
immersionprompt the server exposes, so it consistently translates your prompts.
First run
The first time you run polyprompt init in a terminal, it walks you through a quick
language picker — choose the language you think in and the one you want to learn
(press Enter for the default, or type ? to list all 30+). Already know what you want, or
scripting it? Pass --native/--target and the prompts are skipped entirely.
Levels that adapt to you
Polyprompt meets you where you are and grows with you. Each time you write in the language you're learning, tutor mode grades how clean it was; write well consistently and Polyprompt raises your CEFR level on its own. As your level climbs, it gradually shifts the language of its explanations from your native one toward the one you're learning:
| Your level | Explanations are written in… |
|---|---|
| A1 – A2 | your native language |
| B1 | your native language, key terms kept in the target |
| B2 | a roughly even mix of both |
| C1 | mostly the target language |
| C2 | entirely the target language |
So a beginner is coached gently in their own language, while an advanced learner is
fully immersed. Turn it off with POLYPROMPT_NO_AUTO_LEVEL=1, or pin a level any time
with polyprompt config --level B1.
Staying up to date
Polyprompt keeps itself current. Everyday commands run a quiet, throttled check (at most
once a day) and update in the background when a newer version is published — whether you
installed it globally via npm or from a git clone. Force an update now with polyprompt update, or switch the automatic check off with POLYPROMPT_NO_UPDATE=1 (it never runs
in CI, or while the MCP server is serving a client).
How it works
flowchart LR
U["You"] -->|"write in Italian (native)"| H["Claude / Codex / Gemini"]
U -->|"write in English (target)"| H
H -->|"translate · immersion"| T["Polyprompt MCP server"]
H -->|"correct · tutor"| T
T -->|"sampling · your subscription"| H
T -->|"English text / corrections + glossary"| H
H -->|"builds the feature"| U
T -. saves vocabulary .-> G[("glossary.json · SM-2 deck")]
- The host AI calls the
translatetool with your native-language prompt. - Polyprompt translates it — by default via MCP sampling, i.e. by asking the host
AI itself to translate (your subscription, no extra key). If sampling isn't
available and no API key is set — or a configured engine fails at call time — it
returns instruct-mode guidance so the agent translates the prompt itself and logs
it via
record_translation. The learning loop never breaks. - New vocabulary is saved to
~/.polyprompt/glossary.jsonand scheduled for review. - The agent carries out your request using the translated text.
Tools
| Tool | What it does |
|---|---|
translate |
Immersion — translate a native-language prompt; save new words. |
correct |
Tutor — correct target-language writing; explain each mistake in your native language. |
record_translation |
Log a translation the agent made itself (instruct-mode / manual). |
explain |
Explain a word or phrase in your native language, with examples. |
review |
List vocabulary due for spaced-repetition review. |
record_review |
Grade recall (0–5) and reschedule a card. |
stats |
Show progress: words collected, mastered, due, streak. |
config |
View or change language pair, level, mode, and engine. |
It also exposes immersion and tutor prompts with behaviour instructions for the host AI.
CLI
The same engine is available from your terminal:
polyprompt translate "aggiungi validazione al form" --provider mock # immersion
polyprompt correct "add validate to the form" --provider mock # tutor
polyprompt explain "endpoint"
polyprompt review --limit 10
polyprompt grade "endpoint" 4 # grade recall (0-5) and reschedule
polyprompt stats
polyprompt config --mode tutor --level B1 # switch mode / level
polyprompt languages # list supported languages
polyprompt setup --client claude # connect Polyprompt to your AI client(s)
polyprompt update # update to the latest version right now
polyprompt uninstall --purge # disconnect from clients + delete your data
mockis a built-in offline engine — handy for trying Polyprompt without any model. It only translates between Italian and English; for other languages usesamplingor an API-key engine.
Configuration
Stored at ~/.polyprompt/config.json (override the directory with POLYPROMPT_HOME):
| Field | Meaning | Default |
|---|---|---|
nativeLang |
The language you think in (ISO 639-1) | it |
targetLang |
The language you're learning | en |
level |
Your CEFR level A1–C2 (tunes difficulty) |
A2 |
mode |
Default direction: immersion or tutor |
immersion |
provider |
Translation engine (see below) | auto |
Engines
provider |
Source | Needs |
|---|---|---|
auto (default) |
Best available, in order: sampling → anthropic → openai → gemini (first ready wins; mock is never auto-selected) |
— |
sampling |
The host AI via MCP sampling | An MCP client that supports sampling |
anthropic |
Anthropic API | ANTHROPIC_API_KEY |
openai |
OpenAI (or compatible) API | OPENAI_API_KEY (POLYPROMPT_OPENAI_BASE_URL optional) |
gemini |
Google Gemini API | GEMINI_API_KEY |
mock |
Offline dictionary (Italian and English only) | — (demo/testing) |
Model overrides: POLYPROMPT_MODEL, or per-engine POLYPROMPT_ANTHROPIC_MODEL /
POLYPROMPT_OPENAI_MODEL / POLYPROMPT_GEMINI_MODEL.
Behaviour switches: POLYPROMPT_NO_AUTO_LEVEL=1 disables the automatic level-ups;
POLYPROMPT_NO_UPDATE=1 disables the background self-update.
Client setup
Run polyprompt install <client> for copy-paste config. In short:
Claude Code
claude mcp add polyprompt -- polyprompt mcp
Codex CLI — ~/.codex/config.toml
[mcp_servers.polyprompt]
command = "polyprompt"
args = ["mcp"]
Gemini CLI — ~/.gemini/settings.json
{ "mcpServers": { "polyprompt": { "command": "polyprompt", "args": ["mcp"] } } }
See examples/ for ready-made files, including a Claude Code skill that turns on immersion behaviour automatically.
Uninstalling
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/DisSa12/polyprompt/main/uninstall.sh | sh
# Windows (PowerShell)
irm https://raw.githubusercontent.com/DisSa12/polyprompt/main/uninstall.ps1 | iex
# or by hand:
polyprompt uninstall --purge # disconnect from every client (+ delete local data)
npm uninstall -g polyprompt
uninstall removes Polyprompt from your MCP clients (Claude Code, Codex, Gemini);
--purge also deletes your local config and glossary.
Development
npm install
npm run build # compile to dist/
npm test # vitest (unit + in-memory MCP integration + a real stdio handshake)
npm run typecheck # tsc --noEmit
npm run dev -- translate "ciao" --provider mock # run the CLI from source
The codebase is small and layered: pure SRS/store logic (src/glossary),
engine-agnostic providers (src/providers), a runtime that ties them together
(src/runtime.ts), and a thin MCP/CLI surface (src/server, src/cli.ts).
Built and hardened across two adversarial multi-agent review passes — every confirmed finding applied, with 175 tests green.
Roadmap
- A mistakes deck — spaced repetition for the corrections tutor mode finds, not just vocabulary.
- Richer review UX (cloze, listening) and export to Anki.
- Per-project glossaries.
License
MIT — see LICENSE.
Install Polyprompt in Claude Desktop, Claude Code & Cursor
unyly install polypromptInstalls into Claude Desktop, Claude Code, Cursor & VS Code — handles npx, uvx and build-from-source repos for you.
First time? Get the CLI: curl -fsSL https://unyly.org/install | sh
Or configure manually
Run in your terminal:
claude mcp add polyprompt -- npx -y github:DisSa12/polypromptFAQ
Is Polyprompt MCP free?
Yes, Polyprompt MCP is free — one-click install via Unyly at no cost.
Does Polyprompt need an API key?
No, Polyprompt runs without API keys or environment variables.
Is Polyprompt hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Polyprompt in Claude Desktop, Claude Code or Cursor?
Open Polyprompt on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
GitHub
PRs, issues, code search, CI status
by GitHubFilesystem
Secure file operations with configurable access controls.
Memory
Knowledge graph-based persistent memory system.
Template MCP Server
A CLI tool to create a new Model Context Protocol server project with TypeScript support, dual transport options, and an extensible structure
by mcpdotdirectCompare Polyprompt with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All development MCPs
