Levelang MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add --transport http -H "Authorization: Bearer your-api-key" levelang-mcp https://your-mcp-server-url/mcp
README.md

Integrates the levelang.app translation API with AI assistants

levelang.app MCP Server

An MCP server that exposes the levelang.app translation API to AI assistants. Unlike standard translators that always produce native-speaker complexity, levelang.app constrains translations to the learner's proficiency level.


Features

  • Level-Aware Translation — Translate text at beginner, intermediate, advanced, or fluent proficiency with grammar constraints enforced per level
  • Multi-Language Support — French, German, Italian, Mandarin Chinese, Cantonese, with transliteration where applicable
  • Mood Control — Casual, polite, and formal translation styles
  • Language Discovery — Query available languages, levels, and moods dynamically from the backend
  • MCP Resourceslevelang://languages and levelang://languages/{code} for pulling language configs into context
  • Stateless Wrapper — No database, no shared state; translates MCP tool calls into backend HTTP requests

Quick Start

You need two things: the MCP server URL and an API key. No local setup required.

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "levelang": {
      "url": "https://your-mcp-server-url/mcp",
      "headers": {
        "Authorization": "Bearer your-api-key"
      }
    }
  }
}

Claude Desktop

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "levelang": {
      "url": "https://your-mcp-server-url/mcp",
      "headers": {
        "Authorization": "Bearer your-api-key"
      }
    }
  }
}

Restart Claude Desktop. A hammer icon in the chat input indicates MCP tools are available.

Example Usage

Once connected, ask your AI assistant things like:

Translate "I would like to order a coffee, please" into French at the beginner level.

What languages does Levelang support?

Compare how "I'm worried the new rules might prevent us from finishing on time" translates into German at beginner vs advanced level.

Server Configuration

The settings below are for running the MCP server (local development or self-hosting). End users connecting via URL do not need these.

All configuration is through environment variables. When running locally via stdio, these go in the env block of your MCP client config.

Variable Required Default Description
LEVELANG_API_BASE_URL No http://localhost:8000/api/v1 Levelang backend URL
LEVELANG_API_KEY Depends Service key (sk_xxx) for backend auth
MCP_TRANSPORT No stdio Transport: stdio or streamable-http
MCP_PORT No 8463 Port when using HTTP transport
MCP_API_KEYS No Comma-separated valid API keys for HTTP auth

LEVELANG_API_KEY is required when connecting to a remote backend (staging/production). It may be omitted for local development if the backend has auth disabled.

MCP_API_KEYS controls client authentication for the HTTP transport. When set, clients must send Authorization: Bearer <key> with a key from this list. When empty or unset, auth is disabled (open access). This has no effect on stdio transport.

Local stdio Connection

For local development you can run the MCP server as a subprocess instead of connecting via URL. This requires Python 3.12+, uv, and a running Levelang backend.

git clone https://github.com/beverage/levelang-mcp.git
cd levelang-mcp
uv sync
{
  "mcpServers": {
    "levelang": {
      "command": "uv",
      "args": [
        "run",
        "--directory", "/absolute/path/to/levelang-mcp",
        "python", "-m", "levelang_mcp"
      ],
      "env": {
        "LEVELANG_API_BASE_URL": "http://localhost:8000/api/v1"
      }
    }
  }
}

Development

Setup

uv sync
git config core.hooksPath .githooks

This enables pre-commit (auto-fix lint + format) and pre-push (lint + format check + tests) hooks.

Running Tests

uv run pytest tests/ -v

MCP Inspector

The MCP Inspector provides a web UI for browsing and invoking tools and resources:

npx @modelcontextprotocol/inspector uv run --directory /path/to/levelang-mcp python -m levelang_mcp

Project Structure

src/levelang_mcp/
├── __ma

Tools (2)

translateTranslates text into a target language at a specific proficiency level and mood.
get_languagesRetrieves available languages, proficiency levels, and moods.

Environment Variables

LEVELANG_API_BASE_URLLevelang backend URL
LEVELANG_API_KEYService key for backend authentication
MCP_TRANSPORTTransport type: stdio or streamable-http
MCP_PORTPort when using HTTP transport
MCP_API_KEYSComma-separated valid API keys for HTTP auth

Configuration

claude_desktop_config.json
{"mcpServers": {"levelang": {"url": "https://your-mcp-server-url/mcp", "headers": {"Authorization": "Bearer your-api-key"}}}}

Try it

Translate 'I would like to order a coffee, please' into French at the beginner level.
What languages does Levelang support?
Compare how 'I'm worried the new rules might prevent us from finishing on time' translates into German at beginner vs advanced level.
Translate 'Where is the nearest train station?' into Mandarin Chinese using a formal tone.

Frequently Asked Questions

What are the key features of Levelang MCP Server?

Level-aware translation with grammar constraints for beginner, intermediate, advanced, or fluent levels. Multi-language support including French, German, Italian, Mandarin Chinese, and Cantonese. Mood control for casual, polite, and formal translation styles. Dynamic language discovery for available configurations. MCP resource support for pulling language configs into context.

What can I use Levelang MCP Server for?

Language learners practicing specific grammar structures at their current proficiency level. Content creators generating localized text with specific tone and complexity requirements. Developers building educational tools that require dynamic, level-constrained translations.

How do I install Levelang MCP Server?

Install Levelang MCP Server by running: Add to ~/Library/Application Support/Claude/claude_desktop_config.json

What MCP clients work with Levelang MCP Server?

Levelang MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Levelang MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare