Lokalise MCP Tool

Lokalise MCP Tool

An MCP server that enables users to add translation keys to Lokalise projects using natural language through Cursor or standalone interfaces. It allows for the specification of project names, translation keys, default values, and target platforms.

Category
访问服务器

README

Lokalise MCP Tool

A Minimal Command-line Program (MCP) server for adding translation keys to your Lokalise projects, designed for integration with Cursor or standalone use.

📦 Installation

# For MCP usage (global installation)
npm install -g lokalise-mcp-server

# For library usage (project dependency)
npm install lokalise-mcp-server

NPM Package: https://www.npmjs.com/package/lokalise-mcp-server


🖼️ MCP Flow Diagram

MCP Flow

This diagram illustrates the Model Context Protocol (MCP) flow between Cursor, your MCP server, and Lokalise.

⚡️ Usage (Quick Start with Cursor MCP)

Option 1: NPM Package (Recommended)

🛠️ Add this to your mcp.json (or configure via Cursor UI):

{
  "mcpServers": {
    "lokalise": {
      "command": "npx",
      "args": ["-y", "lokalise-mcp-server"],
      "env": {
        "LOKALISE_API_KEY": "your_actual_api_key"
      }
    }
  }
}
  1. 🔄 Reload Window. It will automatically use the npm package.

Option 2: Docker (Alternative)

No need to run Docker or Podman manually!

  1. 🐳 Make sure Docker or Podman is installed and running.

  2. 🛠️ Add this to your mcp.json (or configure via Cursor UI):

    {
      "mcpServers": {
        "lokalise": {
          "command": "docker", // podman
          "args": [
            "run",
            "--rm",
            "-i",
            "-e", "LOKALISE_API_KEY",
            "rafee03/mcp-lokalise:latest"
          ],
          "env": {
            "LOKALISE_API_KEY": "your_actual_api_key"
          }
        }
      }
    }
    
    • You can use podman instead of docker if you prefer.
    • Cursor will automatically pull and run the image as needed.
  3. 🔄 Restart Cursor. It will handle everything for you.


📝 How to Use in Cursor

This tool takes these inputs:

  • projectName (required): The name of your Lokalise project (e.g., SpaceX).
  • keys (required): An array of objects, each with:
    • keyName (required): The translation key (e.g., hello)
    • defaultValue (optional): The default translation value (e.g., Hello)
    • platforms (optional): The platforms this key applies to (e.g., web, ios)

Example:

I want to add two keys, one is hello and another one is bye. their default values are Hello and Goodbye. both are in web platform. the project is spaceX

Cursor will automatically convert this to the correct input for the MCP tool.

Cursor MCP Lokalise Flow


📁 Project Files

TypeScript Source Files (src/):

  • src/mcp-server.ts: The main MCP server entry point for Cursor integration.
  • src/mcp.ts: Shared logic for interacting with the Lokalise API (used by the server).
  • src/server.ts: (Optional) HTTP server version (not required for Cursor).
  • src/add-key.ts: (Optional) CLI tool for adding a key interactively (not required for Cursor).

Compiled JavaScript Files (dist/):

  • dist/mcp-server.js: Compiled MCP server.
  • dist/mcp.js: Compiled API logic.
  • dist/server.js: Compiled HTTP server.
  • dist/add-key.js: Compiled CLI tool.

Other Files:

  • tsconfig.json: TypeScript configuration.
  • Dockerfile: For building the Docker image of the MCP server.
  • package.json: Project dependencies and scripts.
  • README.md: This documentation file.

🛠️ Setup (For Local Development or Customization)

1. 📥 Clone the Repository

git clone https://github.com/mdrafee03/mcp-lokalise.git
cd mcp-lokalise

2. 📦 Install Dependencies

npm install

3. 🔨 Build the Project

npm run build

4. 🔑 Set Your Lokalise API Key

In your MCP config (recommended for Cursor)

{
  "mcpServers": {
    "lokalise": {
      "command": "node",
      "args": ["{directory-of-the-project}/dist/mcp-server.js"],
      "env": {
        "LOKALISE_API_KEY": "your_actual_api_key"
      }
    }
  }
}

Available Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run dev - Run the MCP server in development mode with tsx
  • npm run server - Run the HTTP server in development mode with tsx
  • npm run add-key - Run the CLI tool in development mode with tsx
  • npm start - Run the compiled MCP server from dist/

Requirements


License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选