Skip to main content
Glama

Weblate MCP Server

by mmntm
weblate-client.service.ts973 B
import { Injectable } from '@nestjs/common'; import { ConfigService } from '@nestjs/config'; import { createClient } from '../client/client/client'; import type { Client } from '../client/client/types'; @Injectable() export class WeblateClientService { private readonly client: Client; constructor(private configService: ConfigService) { const apiUrl = this.configService.get<string>('WEBLATE_API_URL'); const apiToken = this.configService.get<string>('WEBLATE_API_TOKEN'); if (!apiUrl || !apiToken) { throw new Error( 'WEBLATE_API_URL and WEBLATE_API_TOKEN must be configured', ); } // Ensure the API URL ends with /api const baseUrl = apiUrl.endsWith('/api') ? apiUrl : apiUrl + '/api'; this.client = createClient({ baseUrl, headers: { 'Authorization': `Token ${apiToken}`, 'Content-Type': 'application/json', }, }); } getClient(): Client { return this.client; } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mmntm/weblate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server