weblate-mcp

weblate-mcp MCP server

by mmntm
0 stars
1 forks
Available MCP Tools 0 tools

Model Context Protocol tools provided by this server

No tools information available for this server.

Check the GitHub repository or documentation for more details.

README

A Model Context Protocol (MCP) server that provides seamless integration with Weblate translation management platform. This server enables AI assistants to interact directly with your Weblate instance for comprehensive translation management.

🌟 Features

  • *οΏ½ Complete Weblate API Access: Full integration with Weblate's REST API
  • *οΏ½ AI-Powered Workflow: Natural language interaction with your translation projects
  • *οΏ½ Project Management: Create, list, and manage translation projects
  • *οΏ½ Component Operations: Handle translation components and configurations
  • ✏️ Translation Management: Update, search, and manage translations
  • *οΏ½ Language Support: Work with all supported languages in your Weblate instance
  • *οΏ½ Multiple Transports: HTTP/SSE, Streamable HTTP, and STDIO support
  • *�️ Type Safety: Full TypeScript implementation with comprehensive error handling

🎯 What is This?

This MCP server acts as a bridge between AI assistants (like Claude Desktop) and your Weblate translation management platform. Instead of manually navigating the Weblate web interface, you can use natural language to:

  • "List all projects in my Weblate instance"
  • "Show me the French translations for the frontend component"
  • "Update the welcome message translation"
  • "Create a new translation project"

πŸš€ Quick Start

The easiest way to use this MCP server is with npx - no installation required!

For Claude Desktop or other MCP clients:

{
  "mcpServers": {
    "weblate": {
      "command": "npx",
      "args": ["-y", "@mmntm/weblate-mcp"],
      "env": {
        "WEBLATE_API_URL": "https://your-weblate-instance.com/api",
        "WEBLATE_API_TOKEN": "your-weblate-api-token"
      }
    }
  }
}

Manual testing:

npx @mmntm/weblate-mcp

Option 2: Development Setup

Prerequisites

  • Node.js 18+
  • pnpm package manager
  • Weblate instance with API access

Installation

git clone <this-repo>
cd weblate-mcp
pnpm install

cp .env.example .env

pnpm build
pnpm start

Server runs on http://localhost:3001 by default.

Environment Configuration

WEBLATE_API_URL=https://your-weblate-instance.com
WEBLATE_API_TOKEN=your-api-token-here
PORT=3001
NODE_ENV=production
LOG_LEVEL=info

πŸ”— MCP Client Configuration

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "weblate": {
      "command": "npx",
      "args": ["-y", "@mmntm/weblate-mcp"],
      "env": {
        "WEBLATE_API_URL": "https://your-weblate-instance.com/api",
        "WEBLATE_API_TOKEN": "your-weblate-api-token"
      }
    }
  }
}

Claude Desktop (Development/Local)

For development or local builds:

{
  "mcpServers": {
    "weblate": {
      "command": "node",
      "args": ["/path/to/weblate-mcp/dist/main.js"],
      "env": {
        "WEBLATE_API_URL": "https://your-weblate-instance.com/api",
        "WEBLATE_API_TOKEN": "your-api-token"
      }
    }
  }
}

HTTP Clients (Cursor, VS Code, Web Apps)

{
  "transport": "http",
  "url": "http://localhost:3001/mcp"
}

πŸ› οΈ Available Tools

πŸ“Š Project Management

ToolDescription
list_projectsList all projects in your Weblate instance
get_projectGet detailed information about a specific project
create_projectCreate a new translation project

πŸ”§ Component Management

ToolDescription
list_componentsList all components in a project
get_componentGet detailed information about a component
create_componentCreate a new translation component

✏️ Translation Management

ToolDescription
list_translationsList all translations for a component
get_translationGet detailed information about a translation
update_translationUpdate translation strings

🌐 Language Management

ToolDescription
list_languagesList all available languages
get_languageGet detailed information about a language

πŸ’‘ Usage Examples

Project Operations

// List all projects
await list_projects();

// Get specific project details
await get_project({ slug: "my-project" });

// Create a new project
await create_project({
  name: "New Project",
  slug: "new-project",
  web: "https://example.com"
});

Translation Operations

// List translations for a component
await list_translations({
  project_slug: "my-project",
  component_slug: "frontend"
});

// Get specific translation
await get_translation({
  project_slug: "my-project",
  component_slug: "frontend",
  language_code: "fr"
});

// Update translations
await update_translation({
  project_slug: "my-project",
  component_slug: "frontend",
  language_code: "fr",
  translations: {
    "welcome": "Bienvenue",
    "goodbye": "Au revoir"
  }
});

πŸ“š Documentation

DocumentDescription
πŸ“– Documentation HubComplete documentation overview and quick start
πŸš€ Installation & SetupInstallation, configuration, and Claude Desktop setup
πŸ“‹ API ReferenceComplete API documentation with examples
πŸ› οΈ Development GuideContributing, development setup, and testing
πŸ—οΈ ArchitectureCodebase structure, patterns, and design decisions
πŸ“¦ Release ProcessRelease management and publishing workflow
πŸ”„ Changesets GuideVersion management with changesets

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   MCP Client    │───▢│  Weblate MCP     │───▢│  Weblate API    β”‚
β”‚  (IDE/Editor)   β”‚    β”‚     Server       β”‚    β”‚   (REST API)    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚
                              β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   MCP Tools      β”‚
                       β”‚ β€’ Projects       β”‚
                       β”‚ β€’ Components     β”‚
                       β”‚ β€’ Translations   β”‚
                       β”‚ β€’ Languages      β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Technology Stack:

  • NestJS: Modern Node.js framework with dependency injection
  • TypeScript: Full type safety and IntelliSense support
  • Weblate REST API: Comprehensive API wrapper with interfaces
  • MCP Protocol: Standard Model Context Protocol implementation
  • Axios: HTTP client for API communication

πŸ§ͺ Development

Development Setup

pnpm run dev

pnpm test

pnpm run test:e2e

pnpm run test:cov

pnpm build

Adding New Tools

  1. Create tool file in src/tools/
  2. Implement MCP tool interface
  3. Add to service providers
  4. Write tests
  5. Update documentation

See Development Guide for detailed instructions.

🎯 Use Cases

Translation Management

  • Project oversight: Monitor translation progress across projects
  • Content updates: Update translations programmatically
  • Quality assurance: Review and approve translations
  • Team coordination: Manage translation workflows

Development Integration

  • CI/CD pipelines: Automate translation updates in deployment
  • Content management: Sync translations with content systems
  • Localization testing: Validate translations in different contexts
  • Documentation: Generate translation reports and statistics

AI-Assisted Workflows

  • Natural language queries: Ask about translation status in plain English
  • Contextual operations: AI understands your translation needs
  • Batch operations: Perform bulk updates with AI assistance
  • Smart suggestions: Get AI-powered translation recommendations

πŸ”’ Security & Production

  • API Token Security: Store tokens securely, use environment variables
  • Rate Limiting: Built-in request throttling and retry logic
  • Error Handling: Comprehensive error responses with debugging info
  • Input Validation: All inputs validated with Zod schemas
  • HTTPS Support: Secure communication with Weblate instances

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines:

  1. Fork the repository
  2. Create a feature branch from main
  3. Implement changes with tests
  4. Update documentation
  5. Submit a pull request

Code Style

  • Use TypeScript for type safety
  • Follow NestJS conventions
  • Add comprehensive tests
  • Update documentation

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Weblate: For providing an excellent translation management platform
  • Model Context Protocol: For the standardized protocol specification
  • NestJS: For the robust application framework
  • Contributors: Everyone who helps improve this project

Built with ❀️ for the translation community

Need help? Check our documentation or create an issue!

Details
Category Translation Services
Scope cloud
Language TypeScript
License Unknown
OS Support
linux macos windows