idiolect-mcp 0.3.0 → 0.5.0

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 CHANGED
@@ -1,61 +1,105 @@
1
- # Idiolect Plugin
1
+ # idiolect-mcp
2
2
 
3
- Write in **your** voice — everywhere your agent writes. Idiolect rewrites the prose
4
- an agent drafts on your behalf (commit messages, PR descriptions, docs, release
5
- notes, replies) into your own writing voice, and scores how close it got on a
6
- validated voice‑fidelity metric. Works in **Claude Code** and **Codex**.
3
+ MCP server that makes any MCP-compatible AI (Claude Desktop, Claude Code, …)
4
+ write in **your** voice, using your [Idiolect AI](https://idiolect.app) Voice Card.
7
5
 
8
6
  ## Setup
9
7
 
10
- 1. **Get your API key** — sign in at <https://idiolect.lol/connect> and generate one.
11
- 2. **Claude Code:**
12
- ```
13
- /plugin marketplace add 111mihir/idiolect-plugin
14
- /plugin install idiolect@idiolect
15
- ```
16
- Then set your key in the environment Claude Code runs in:
17
- ```
18
- export IDIOLECT_API_KEY=idl_sk_your_key_here
19
- ```
20
- 3. **Codex:** register Idiolect as an MCP server — one command, no clone (it runs
21
- via `npx`, writing an `[mcp_servers.idiolect]` entry to `~/.codex/config.toml`):
22
- ```
23
- codex mcp add idiolect \
24
- --env IDIOLECT_API_KEY=idl_sk_your_key_here \
25
- --env IDIOLECT_BASE=https://idiolect.lol \
26
- -- npx -y idiolect-mcp
27
- ```
28
-
29
- The plugin bundles a self‑contained MCP server (`server.mjs`) — no `npm install`
30
- needed.
31
-
32
- ## Slash commands
33
-
34
- Commands are namespaced by the plugin:
35
-
36
- - `/idiolect:voice` — show a summary of your writing voice.
37
- - `/idiolect:rewrite <text>` — rewrite text into your voice (+ Voice Match).
38
- - `/idiolect:draft <brief>` — draft new content from a brief, in your voice.
39
- - `/idiolect:check <text>` — score any text against your voice.
40
-
41
- ## The skill
42
-
43
- The **in‑your‑voice** skill triggers automatically whenever the agent drafts prose
44
- for you: it calls `get_my_voice`, rewrites the draft via `rewrite_in_voice`, and
45
- shows the Voice Match — so everything you "write" through the agent sounds like you.
46
-
47
- ## Tools (MCP)
48
-
49
- | Tool | What it does |
50
- | --- | --- |
51
- | `get_my_voice` | Load your Voice Card (call before writing on your behalf). |
52
- | `rewrite_in_voice` | Rewrite text in your voice; returns Voice Match + before→after delta. |
53
- | `draft_in_voice` | Draft new prose in your voice from a brief. |
54
- | `score_voice` | Voice Match of any text against your own writing. |
55
-
56
- Pro is required for `rewrite_in_voice` / `draft_in_voice`. Your voice and corpus
57
- live in your Idiolect account; the key resolves to them server‑side.
58
-
59
- ---
60
-
61
- Built from the Idiolect monorepo. To regenerate `server.mjs`, run `plugin/build.sh`.
8
+ ### Account mode
9
+
10
+ For account-resolved Writing Profile creation, loading, scoring, rewrite, and draft tools,
11
+ set `IDIOLECT_API_KEY`:
12
+
13
+ ```json
14
+ {
15
+ "mcpServers": {
16
+ "idiolect": {
17
+ "command": "npx",
18
+ "args": ["-y", "idiolect-mcp"],
19
+ "env": { "IDIOLECT_API_KEY": "idiolect_..." }
20
+ }
21
+ }
22
+ }
23
+ ```
24
+
25
+ ### Slug mode
26
+
27
+ 1. Get your voice at **https://idiolect.app** — note the slug in your result URL
28
+ (`idiolect.app/v/<slug>`).
29
+ 2. Add to your MCP config:
30
+
31
+ ```json
32
+ {
33
+ "mcpServers": {
34
+ "idiolect": {
35
+ "command": "npx",
36
+ "args": ["-y", "idiolect-mcp"],
37
+ "env": { "IDIOLECT_SLUG": "your-slug" }
38
+ }
39
+ }
40
+ }
41
+ ```
42
+
43
+ ## Tools
44
+
45
+ Remote OAuth and account-mode stdio advertise the same user-facing tools.
46
+ Setup state, evidence approval, retries, and idempotency stay inside the server;
47
+ clients receive one `next` action and never coordinate workflow versions or locks.
48
+
49
+ - **`write`** — writes new prose in the user's Writing Profile or own style.
50
+ - **`rewrite`** — rewrites supplied prose in the user's Writing Profile.
51
+ - **`refine_writing`** — changes returned writing, applies a template, or records its outcome.
52
+ - **`view_writing_profile`** — lists Writing Profiles and shows the selected or current profile.
53
+ - **`list_writing_samples`** — lists the writing behind one profile.
54
+ - **`create_writing_profile`** — creates a new profile without changing another.
55
+ - **`add_writing_samples`** — adds approved writing to a selected or current profile.
56
+ - **`rename_writing_profile`** — renames a profile.
57
+ - **`set_current_writing_profile`** — makes a profile current.
58
+ - **`set_default_writing_template`** — sets or clears the default template when no profile exists.
59
+ - **`add_writing_rule`** — stores a lasting rule in the user's words.
60
+ - **`remove_writing_rule`** — stops following one stored rule.
61
+ - **`remove_writing_sample`** — revokes one ready or waiting sample.
62
+ - **`delete_writing_profile`** — deletes a selected profile.
63
+
64
+ Cached account-mode tool names remain callable but are not advertised. Slug mode keeps its
65
+ legacy local-samples catalogue; locally configured samples are used only for stateless scoring
66
+ and are not stored.
67
+
68
+ When an account has no Writing Profile, `write` and `rewrite` return the setup choices.
69
+ `create_writing_profile` returns exact missing blocks and characters when evidence is thin.
70
+ Feedback can be accepted, corrected-and-accepted, or rejected only against a
71
+ succeeded server-issued output.
72
+ Correction prose is retained only when the applicable consent gates permit it and
73
+ within its existing expiry rule. An explicitly approved correction can be added as
74
+ private V2 evidence; it never changes the current Writing Profile or silently activates
75
+ V2. A stored Writing Profile is never described as provisional.
76
+
77
+ The setup response includes neither an activation token nor a capability/setup URL.
78
+ `create_writing_profile` runs only after explicit permission from evidence you supplied or
79
+ approved. Creating a profile and
80
+ succeeding at a first generation are not activation. Canonical native activation
81
+ occurs only after accepted or corrected-and-accepted feedback.
82
+
83
+ ## Credits and retries
84
+
85
+ Generation is free during beta, and completed drafts and rewrites no longer carry a credit
86
+ state. The account's balance and access are shown at idiolect.app/settings. Future credits-mode
87
+ states cover available, low, zero, unlimited, and temporarily unavailable balances without
88
+ changing the tool names.
89
+
90
+ A known zero balance returns a structured `purchase_required` tool error with the
91
+ stable first-party credit-management path. An accounting outage returns
92
+ `accounting_unavailable` without a purchase suggestion. Both denials happen before
93
+ generation or charging, so their retry object is explicitly scoped to
94
+ `pre_generation`. Successful generation does not yet promise replay after a lost
95
+ response, and paid enforcement remains disabled.
96
+
97
+ Internal generation coordination happens before provider work. A stale internal
98
+ state is refreshed before the client receives one public retry action. If durable
99
+ completion cannot be confirmed, prose is suppressed and the response uses plain
100
+ language without exposing coordination receipts.
101
+
102
+ Set `IDIOLECT_BASE` to point at a self-hosted instance (defaults to
103
+ `https://idiolect.app`).
104
+
105
+ MIT licensed.
package/package.json CHANGED
@@ -1,13 +1,39 @@
1
1
  {
2
2
  "name": "idiolect-mcp",
3
- "version": "0.3.0",
4
- "description": "MCP server that makes any MCP-compatible agent (Claude Code, Codex, Claude Desktop) write in YOUR voice — rewrites/drafts/scores prose against your Idiolect voice, on a validated fidelity metric.",
3
+ "version": "0.5.0",
4
+ "mcpName": "app.idiolect/idiolect-ai",
5
5
  "type": "module",
6
- "bin": { "idiolect-mcp": "server.mjs" },
7
- "files": ["server.mjs"],
8
- "homepage": "https://idiolect.lol",
9
- "repository": { "type": "git", "url": "git+https://github.com/111mihir/idiolect-plugin.git" },
10
- "keywords": ["mcp", "model-context-protocol", "claude", "codex", "ai", "writing", "voice", "idiolect", "ghostwriting"],
11
- "author": "Idiolect (https://idiolect.lol)",
12
- "license": "MIT"
6
+ "bin": {
7
+ "idiolect-mcp": "server.mjs"
8
+ },
9
+ "description": "MCP server that gives any MCP-compatible AI (Claude, etc.) your Idiolect AI voice — make AI write as you. https://idiolect.app",
10
+ "keywords": [
11
+ "mcp",
12
+ "model-context-protocol",
13
+ "claude",
14
+ "ai",
15
+ "writing",
16
+ "voice",
17
+ "idiolect"
18
+ ],
19
+ "homepage": "https://idiolect.app",
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "https://github.com/Moshpit-Labs/idiolect-mcp.git"
23
+ },
24
+ "license": "MIT",
25
+ "files": [
26
+ "server.mjs",
27
+ "progressive-catalog.json",
28
+ "README.md"
29
+ ],
30
+ "engines": {
31
+ "node": ">=18"
32
+ },
33
+ "publishConfig": {
34
+ "access": "public"
35
+ },
36
+ "dependencies": {
37
+ "@modelcontextprotocol/sdk": "^1.0.4"
38
+ }
13
39
  }