@modudraft/mcp 0.1.1

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +98 -0
  3. package/dist/index.js +18748 -0
  4. package/package.json +32 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Modudraft
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 ADDED
@@ -0,0 +1,98 @@
1
+ # modudraft-mcp
2
+
3
+ MCP server for [Modudraft](https://github.com/modudraft/modudraft) — lets AI assistants create and edit system-design diagrams through natural language.
4
+
5
+ ## What it does
6
+
7
+ Exposes 14 tools over the [Model Context Protocol](https://modelcontextprotocol.io) (stdio transport):
8
+
9
+ | Tool | Description |
10
+ |------|-------------|
11
+ | `get_diagram` | Return current nodes and edges |
12
+ | `add_node` | Add a system component (database, queue, API, etc.) |
13
+ | `add_note` | Add a sticky note or title annotation |
14
+ | `add_boundary` | Add a named boundary box (VPC, service, zone…) |
15
+ | `update_node` | Change a node's label, tool, or position |
16
+ | `delete_node` | Remove a node and its connected edges |
17
+ | `add_edge` | Connect two nodes with a directed edge |
18
+ | `delete_edge` | Remove an edge |
19
+ | `clear_diagram` | Reset to an empty diagram |
20
+ | `export_diagram` | Export as a `.modudraft` JSON string |
21
+ | `import_diagram` | Load a diagram from a `.modudraft` string |
22
+ | `list_archetypes` | List all node archetypes (database, compute, queue…) |
23
+ | `list_tools` | List concrete tools for an archetype (postgresql, kafka…) |
24
+ | `list_protocols` | List edge protocol labels (HTTPS, gRPC, Kafka…) |
25
+
26
+ State is held in memory for the lifetime of the server process. Use `export_diagram` to save and `import_diagram` to reload.
27
+
28
+ ## Setup
29
+
30
+ ### Claude Desktop
31
+
32
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
33
+
34
+ ```json
35
+ {
36
+ "mcpServers": {
37
+ "modudraft": {
38
+ "command": "npx",
39
+ "args": ["-y", "modudraft-mcp"]
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ Restart Claude Desktop. The Modudraft tools will be available in any conversation.
46
+
47
+ ### Claude Code
48
+
49
+ ```bash
50
+ claude mcp add modudraft -- npx -y modudraft-mcp
51
+ ```
52
+
53
+ ### Other MCP clients
54
+
55
+ Any client that supports stdio MCP servers can run:
56
+
57
+ ```bash
58
+ npx modudraft-mcp
59
+ ```
60
+
61
+ Node.js ≥ 20 is required.
62
+
63
+ ---
64
+
65
+ ### Local development
66
+
67
+ ```bash
68
+ git clone https://github.com/modudraft/modudraft-mcp
69
+ git clone https://github.com/modudraft/modudraft # sibling dir, needed for @modudraft/core
70
+ cd modudraft-mcp
71
+ npm install
72
+ npm run build
73
+ ```
74
+
75
+ Then point your client at the local build instead of `npx modudraft-mcp`:
76
+
77
+ ```json
78
+ { "command": "node", "args": ["/path/to/modudraft-mcp/dist/index.js"] }
79
+ ```
80
+
81
+ ## Development
82
+
83
+ ```bash
84
+ npm run dev # watch mode (rebuilds on change)
85
+ npm run typecheck # type-check without building
86
+ ```
87
+
88
+ ## License
89
+
90
+ MIT
91
+
92
+ ## Example usage
93
+
94
+ Ask Claude:
95
+
96
+ > "Create a diagram for an e-commerce checkout flow with a React frontend, a Node API, PostgreSQL database, and a Redis cache. Add edges showing the data flow."
97
+
98
+ Claude will call `list_archetypes`, `add_node`, and `add_edge` to build the diagram, then you can `export_diagram` and open the `.modudraft` file in the web app.