@langapi/mcp-server 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ This package enables AI assistants like Claude, Cursor, and VS Code extensions t
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
# 1. Get your API key at https://langapi.io (
|
|
10
|
+
# 1. Get your API key at https://langapi.io (1,000 free credits)
|
|
11
11
|
|
|
12
12
|
# 2. Add to your AI tool (example for Claude Desktop on macOS):
|
|
13
13
|
# Edit ~/Library/Application Support/Claude/claude_desktop_config.json
|
|
@@ -72,7 +72,21 @@ After editing, **restart Claude Desktop** for changes to take effect.
|
|
|
72
72
|
|
|
73
73
|
### Claude Code (CLI)
|
|
74
74
|
|
|
75
|
-
**Option 1:
|
|
75
|
+
**Option 1: CLI command** (quickest)
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
# Add to current project (stored in .mcp.json)
|
|
79
|
+
claude mcp add --transport stdio langapi \
|
|
80
|
+
--env LANGAPI_API_KEY=your-api-key-here \
|
|
81
|
+
-- npx @langapi/mcp-server
|
|
82
|
+
|
|
83
|
+
# Or add globally for all projects (stored in ~/.claude.json)
|
|
84
|
+
claude mcp add --transport stdio langapi --scope user \
|
|
85
|
+
--env LANGAPI_API_KEY=your-api-key-here \
|
|
86
|
+
-- npx @langapi/mcp-server
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Option 2: Project-level config** (recommended for teams)
|
|
76
90
|
|
|
77
91
|
Create `.mcp.json` in your project root:
|
|
78
92
|
|
|
@@ -90,9 +104,9 @@ Create `.mcp.json` in your project root:
|
|
|
90
104
|
}
|
|
91
105
|
```
|
|
92
106
|
|
|
93
|
-
**Option
|
|
107
|
+
**Option 3: User-level config**
|
|
94
108
|
|
|
95
|
-
Add to `~/.claude
|
|
109
|
+
Add to `~/.claude.json`:
|
|
96
110
|
|
|
97
111
|
```json
|
|
98
112
|
{
|
|
@@ -108,7 +122,7 @@ Add to `~/.claude/settings.json`:
|
|
|
108
122
|
}
|
|
109
123
|
```
|
|
110
124
|
|
|
111
|
-
**Option
|
|
125
|
+
**Option 4: Environment variable**
|
|
112
126
|
|
|
113
127
|
```bash
|
|
114
128
|
export LANGAPI_API_KEY="your-api-key-here"
|
|
@@ -116,6 +130,22 @@ export LANGAPI_API_KEY="your-api-key-here"
|
|
|
116
130
|
|
|
117
131
|
Then the MCP server will pick it up automatically.
|
|
118
132
|
|
|
133
|
+
**Verify connection:**
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
# List configured servers
|
|
137
|
+
claude mcp list
|
|
138
|
+
|
|
139
|
+
# Check server status inside Claude Code
|
|
140
|
+
/mcp
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Remove server:**
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
claude mcp remove langapi
|
|
147
|
+
```
|
|
148
|
+
|
|
119
149
|
---
|
|
120
150
|
|
|
121
151
|
### Cursor
|
|
@@ -291,8 +321,8 @@ Compare source locale against targets to identify missing keys and estimate cost
|
|
|
291
321
|
"cost_estimate": {
|
|
292
322
|
"words_to_translate": 45,
|
|
293
323
|
"credits_required": 90,
|
|
294
|
-
"current_balance":
|
|
295
|
-
"balance_after_sync":
|
|
324
|
+
"current_balance": 1000,
|
|
325
|
+
"balance_after_sync": 910
|
|
296
326
|
}
|
|
297
327
|
}
|
|
298
328
|
```
|
|
@@ -326,8 +356,8 @@ Sync translations via the LangAPI API. **Default is dry_run=true for safety.**
|
|
|
326
356
|
"cost": {
|
|
327
357
|
"words_to_translate": 45,
|
|
328
358
|
"credits_required": 90,
|
|
329
|
-
"current_balance":
|
|
330
|
-
"balance_after_sync":
|
|
359
|
+
"current_balance": 1000,
|
|
360
|
+
"balance_after_sync": 910
|
|
331
361
|
},
|
|
332
362
|
"message": "Preview: 2 keys to sync, 90 credits required. Run with dry_run=false to execute."
|
|
333
363
|
}
|
|
@@ -448,7 +478,7 @@ I found a next-intl project with English (150 keys) and German (120 keys) transl
|
|
|
448
478
|
You: What translations are missing for German?
|
|
449
479
|
|
|
450
480
|
Claude: [Calls get_translation_status]
|
|
451
|
-
German is missing 30 keys. The sync would cost 85 credits (you have
|
|
481
|
+
German is missing 30 keys. The sync would cost 85 credits (you have 1000 credits).
|
|
452
482
|
|
|
453
483
|
You: Sync the German translations
|
|
454
484
|
|
|
@@ -539,7 +569,7 @@ For self-hosted or enterprise deployments:
|
|
|
539
569
|
|
|
540
570
|
LangAPI uses a credit-based billing system:
|
|
541
571
|
- **1 credit = 1 word** to translate
|
|
542
|
-
- New users get **
|
|
572
|
+
- New users get **1,000 free credits**
|
|
543
573
|
- Top up with **100,000 credits for $15** (no subscription, no expiry)
|
|
544
574
|
|
|
545
575
|
Get your API key at [langapi.io](https://langapi.io).
|