@modudraft/mcp 0.14.0 → 0.14.2

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
@@ -33,13 +33,18 @@ Copy the key - you'll only see it once.
33
33
  "command": "npx",
34
34
  "args": ["-y", "@modudraft/mcp"],
35
35
  "env": {
36
- "MODUDRAFT_API_KEY": "mdft_your_key_here"
36
+ "MODUDRAFT_API_KEY": "mdft_your_key_here",
37
+ "MODUDRAFT_PROJECT_ROOTS": "/Users/you/code/your-repo"
37
38
  }
38
39
  }
39
40
  }
40
41
  }
41
42
  ```
42
43
 
44
+ `MODUDRAFT_PROJECT_ROOTS` is **optional**. You only need it if you want the agent to import from, or write files to, your code. It is the folder with your **source code**: the repo, or the git worktree, you want diagrams built from. The import tools read your `docker-compose.yml`, k8s manifests, OpenAPI specs, SQL and `.env` files from there, and `export_to_file` / `generate_docs` write their output there. The MCP never reads or writes files outside it. List several repos with `:` (`;` on Windows). Your diagrams themselves are saved to your Modudraft account, not to this folder.
45
+
46
+ Without it, all diagram tools work as usual. The file tools fall back to your client's workspace folders, or the folder the server was started in. Claude Desktop starts the server from `/`, so there the file tools stay off until you set it.
47
+
43
48
  **Cursor** (`.cursor/mcp.json` in your project or `~/.cursor/mcp.json` globally):
44
49
 
45
50
  ```json
@@ -62,8 +67,15 @@ Copy the key - you'll only see it once.
62
67
  |---|---|---|
63
68
  | `MODUDRAFT_API_KEY` | Yes | Your `mdft_…` API key |
64
69
  | `MODUDRAFT_API_URL` | No | Override API base URL (default: `https://api.modudraft.com`) |
70
+ | `MODUDRAFT_PROJECT_ROOTS` | No | Your source-code folder(s): the repo or git worktree the file tools (`scan_project`, `read_file`, `import_file`, `export_to_file`, ...) may read from and write to. Separate several with `:` (`;` on Windows); `~` is allowed. Used when your MCP client doesn't share its workspace folders. Your home directory or `/` is never accepted, so point it at the repo itself. |
65
71
  | `MODUDRAFT_AUTO_TIDY_MS` | No | Quiet period, in milliseconds, before the architecture tab is auto-tidied after nodes or edges are added or removed (default `8000`; `0` turns auto-tidy off). See [Auto-tidy](#auto-tidy) |
66
72
 
73
+
74
+ ### Upgrading to 0.14.2
75
+
76
+ - File tools (`read_file`, `import_file`, `import_directory`, `scan_project`, `export_to_file`, ...) only read and write inside your source-code folder (your repo or git worktree). The server takes it from your MCP client's workspace folders, then `MODUDRAFT_PROJECT_ROOTS`, then the folder the server was started in. Your home directory itself is never accepted, so Claude Desktop users who want the file tools should set the optional `MODUDRAFT_PROJECT_ROOTS` to their repo. Relative paths resolve against the first folder, and a leading `~` is expanded.
77
+ - `export_to_file`, `generate_docs` and `generate_runbook` refuse to overwrite an existing file unless you pass `overwrite: true`.
78
+
67
79
  ---
68
80
 
69
81
  ## Tools