Skip to main content
Glama
xcstrings-mcp-server

xcstrings-mcp-server

README.md
# xcstrings-mcp-server

MCP stdio server for manipulating Xcode string catalogs through `xcstrings-cli`.

## Features

- `xcstrings_init`
- `xcstrings_add`
- `xcstrings_remove`
- `xcstrings_languages`
- `xcstrings_strings`

## Requirements

- Node.js 20+

## Install

```bash
npm install @teleprompter/xcstrings-mcp-server
```

## Default catalog resolution

`catalogPath` resolution order:
1. Tool input `catalogPath`
2. `XCSTRINGS_DEFAULT_PATH` env var
3. `Teleprompter/Resources/teleprompter-ios-localization/Localizable.xcstrings`

## MCP client config (example)

```json
{
  "mcpServers": {
    "xcstrings": {
      "command": "npx",
      "args": ["-y", "@teleprompter/xcstrings-mcp-server"],
      "env": {
        "XCSTRINGS_DEFAULT_PATH": "/absolute/path/to/Localizable.xcstrings"
      }
    }
  }
}
```

## Tool reference

### `xcstrings_init`
Input:
```json
{
  "catalogPath": "optional/path/to/Localizable.xcstrings"
}
```
Output:
```json
{
  "catalogPath": "/abs/path/Localizable.xcstrings",
  "created": true
}
```

### `xcstrings_add`
Input:
```json
{
  "key": "home.title",
  "lang": "en",
  "value": "Home",
  "catalogPath": "optional/path/to/Localizable.xcstrings"
}
```
Output:
```json
{
  "catalogPath": "/abs/path/Localizable.xcstrings",
  "key": "home.title",
  "lang": "en",
  "value": "Home",
  "updated": true
}
```

### `xcstrings_remove`
Input:
```json
{
  "key": "home.title",
  "lang": "en",
  "catalogPath": "optional/path/to/Localizable.xcstrings"
}
```
Output:
```json
{
  "catalogPath": "/abs/path/Localizable.xcstrings",
  "key": "home.title",
  "lang": "en",
  "updated": true
}
```

### `xcstrings_languages`
Input:
```json
{}
```
Output:
```json
{
  "languages": ["en", "ja", "fr"]
}
```

### `xcstrings_strings`
Input:
```json
{
  "catalogPath": "optional/path/to/Localizable.xcstrings",
  "lang": "optional language code",
  "missingLanguages": false
}
```
Output:
```json
{
  "strings": [
    {
      "key": "home.title",
      "localizations": {}
    }
  ]
}
```

## Development

```bash
npm install
npm run test
npm run build
```

## Publishing

- Package is published from Git tags matching `v*` via GitHub Actions.
- Workflow uses `NODE_AUTH_TOKEN` and supports npm provenance.

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation5/5

Each tool maps to a distinct verb on the same resource: init, add, remove, plus two listing tools with clearly different outputs (language codes vs. catalog strings). The list tools could look similar at a glance, but the descriptions make the split (supported languages vs. actual strings) explicit.

Naming Consistency5/5

All five tools share the xcstrings_ prefix followed by a concise verb or noun (init, add, remove, languages, strings). The pattern is predictable and readable across the whole set.

Tool Count5/5

Five tools is well-scoped for a focused .xcstrings catalog management server; each tool earns its place with no filler. Nothing feels missing or bloated at this granularity.

Completeness4/5

Lifecycle coverage is solid: create catalog, add/update entries, remove keys or language entries, and inspect languages and strings. Minor gaps remain, such as reading a single key's translations in detail, copying/renaming a key, or a validate/sync operation for missing translations.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues