@lefine/mcp 0.0.0-stage → 0.2.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lefine
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,69 @@
1
- # Temporary Holding Version
1
+ # @lefine/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Lefine for AI agents. Claude, Cursor and other MCP clients can translate your app, edit and publish
4
+ website pages, and make localized videos, with you approving anything that goes live.
5
+
6
+ ## Sign in
7
+
8
+ ```sh
9
+ npx lefine login
10
+ ```
11
+
12
+ Or set `LEFINE_TOKEN` to a key from Lefine, Settings > API keys. To let the agent reach Content,
13
+ Studio or your connected apps, make the key there and tick them under "Also reach".
14
+
15
+ ## Add it to your client
16
+
17
+ **Claude Desktop** (`claude_desktop_config.json`), and any client that starts a local server:
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "lefine": { "command": "npx", "args": ["-y", "lefine", "mcp"] }
23
+ }
24
+ }
25
+ ```
26
+
27
+ **Claude, ChatGPT, Claude Code, Cursor, VS Code and other remote-capable clients** can skip this
28
+ package and connect to the server directly. They sign in to Lefine with OAuth, so there is no key to
29
+ copy:
30
+
31
+ ```sh
32
+ claude mcp add --transport http lefine https://dash.lefine.ai/v1/mcp
33
+ ```
34
+
35
+ In Claude, add the same URL under Settings > Connectors > Add custom connector. A key also works:
36
+ add `--header "Authorization: Bearer <key>"`.
37
+
38
+ ## What the agent gets
39
+
40
+ Five tools, whatever your plan:
41
+
42
+ | Tool | What it does |
43
+ |---|---|
44
+ | `lefine_context` | The workspace, the modules that are on, and what the key may do. |
45
+ | `lefine_find` | Find an action by words, with its input schema. |
46
+ | `lefine_read` | Run an action that only reads. |
47
+ | `lefine_write` | Run an action that writes drafts. Nothing goes live. |
48
+ | `lefine_publish` | Run an action that goes live or spends credits. It asks you first. |
49
+
50
+ Every action, with what it needs: run `npx lefine actions` (add words to filter, e.g. `npx lefine actions content`).
51
+
52
+ The tools live on Lefine's server, so a new action reaches you without updating this package.
53
+
54
+ ## Options
55
+
56
+ - `LEFINE_TOKEN`: the key to use (wins over the saved one).
57
+ - `LEFINE_API_URL`: another Lefine server. A saved key is only sent to the server it was saved for.
58
+ - `lefine-mcp --version`, `lefine-mcp --help`.
59
+
60
+ Logs go to stderr; stdout carries only MCP messages.
61
+
62
+ ## Two tools for coding agents
63
+
64
+ `npx lefine mcp` (and this alias) add two tools next to the server's, answered on your machine:
65
+
66
+ - `lefine_find_similar_key`: keys whose name or source text is like the one you want, closest first. Agents call it first.
67
+ - `lefine_add_key`: adds one key with its source text, and refuses with the reason when the key exists in any namespace,
68
+ the same text already has a key, the namespace does not exist (`newNamespace: true` to make one), or the text is not
69
+ valid ICU. A new key is not live until someone publishes.
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env node
2
+ // @lefine/mcp is `lefine mcp` now. This name keeps working for configs that already say `npx -y @lefine/mcp`.
3
+ import { readFileSync } from "node:fs";
4
+ import { createRequire } from "node:module";
5
+ import { dirname, join } from "node:path";
6
+ import { pathToFileURL } from "node:url";
7
+
8
+ const manifest = createRequire(import.meta.url).resolve("lefine/package.json");
9
+ const { bin } = JSON.parse(readFileSync(manifest, "utf-8"));
10
+ process.argv.splice(2, 0, "mcp");
11
+ await import(pathToFileURL(join(dirname(manifest), bin.lefine)).href);
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@lefine/mcp",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.2.7",
4
+ "description": "Lefine as an MCP server for Claude Desktop, Cursor and other agents (same as `npx lefine mcp`)",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "bin": {
8
+ "lefine-mcp": "./bin/lefine-mcp.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "repository": {
19
+ "type": "git",
20
+ "url": "git+https://github.com/lefinehq/sdk.git",
21
+ "directory": "packages/lefine-mcp"
22
+ },
23
+ "homepage": "https://lefine.ai",
24
+ "keywords": [
25
+ "lefine",
26
+ "mcp",
27
+ "model-context-protocol",
28
+ "i18n",
29
+ "localization",
30
+ "claude"
31
+ ],
32
+ "scripts": {
33
+ "check:package": "bunx publint@0.3.25 --strict"
34
+ },
35
+ "engines": {
36
+ "node": ">=20"
37
+ },
38
+ "dependencies": {
39
+ "lefine": "^0.8.1"
40
+ }
41
+ }