idiolect-mcp 0.3.0 → 0.4.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.
Files changed (3) hide show
  1. package/README.md +51 -57
  2. package/package.json +35 -9
  3. package/server.mjs +303 -15581
package/README.md CHANGED
@@ -1,61 +1,55 @@
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 voice and Pro rewrite/draft tools, set `IDIOLECT_API_KEY`:
11
+
12
+ ```json
13
+ {
14
+ "mcpServers": {
15
+ "idiolect": {
16
+ "command": "npx",
17
+ "args": ["-y", "idiolect-mcp"],
18
+ "env": { "IDIOLECT_API_KEY": "idiolect_..." }
19
+ }
20
+ }
21
+ }
22
+ ```
23
+
24
+ ### Slug mode
25
+
26
+ 1. Get your voice at **https://idiolect.app** — note the slug in your result URL
27
+ (`idiolect.app/v/<slug>`).
28
+ 2. Add to your MCP config:
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "idiolect": {
34
+ "command": "npx",
35
+ "args": ["-y", "idiolect-mcp"],
36
+ "env": { "IDIOLECT_SLUG": "your-slug" }
37
+ }
38
+ }
39
+ }
40
+ ```
41
+
42
+ ## Tool
43
+
44
+ - **`get_my_voice`** — returns your Voice Card. The model calls it before writing
45
+ on your behalf, then writes as you. Pass `slug` per-call or set `IDIOLECT_SLUG`.
46
+ - **`score_voice`** — scores text against your voice. In account mode this uses
47
+ your API key; in slug mode it uses your local writing samples.
48
+ - **`rewrite_in_voice`** — account mode only. Rewrites drafted prose in your
49
+ actual voice.
50
+ - **`draft_in_voice`** — account mode only. Drafts from a brief in your voice.
51
+
52
+ Set `IDIOLECT_BASE` to point at a self-hosted instance (defaults to
53
+ `https://idiolect.app`).
54
+
55
+ 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.4.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/111mihir/idiolect.git",
23
+ "directory": "mcp"
24
+ },
25
+ "license": "MIT",
26
+ "files": [
27
+ "server.mjs",
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
  }