dodraw-mcp-server 0.1.0 → 0.1.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
@@ -1,63 +1,48 @@
1
1
 
2
2
  # DoDraw MCP Server
3
3
 
4
- An MCP server implementation for DoDraw (formerly 3DUML), providing tools to programmatically generate and manipulate 3D UML diagrams.
4
+ An MCP server implementation for DoDraw , providing tools to programmatically generate and manipulate 3D UML diagrams.
5
5
 
6
- ## Distribution & Usage
6
+ DoDraw application - https://dodraw.xyz
7
7
 
8
- There are two primary ways to distribute and use this server:
8
+ ### Configuring an MCP Client
9
9
 
10
- ### 1. Via NPM (Recommended)
10
+ To use the server with an MCP client (like Claude Desktop or an IDE extension), configure it as follows:
11
11
 
12
- This method allows users to run the server immediately without cloning the repository.
13
-
14
- #### For Use (Running with `npx`)
15
-
16
- Users can run the server directly using `npx`:
17
-
18
- ```bash
19
- npx -y dodraw-mcp-server
12
+ ```json
13
+ {
14
+ "mcpServers": {
15
+ "dodraw": {
16
+ "command": "npx",
17
+ "args": [
18
+ "-y",
19
+ "dodraw-mcp-server"
20
+ ]
21
+ }
22
+ }
23
+ }
20
24
  ```
21
25
 
22
- *(Note: Replace `dodraw-mcp-server` with your actual package name if scoped, e.g., `@your-org/dodraw-mcp-server`)*
26
+ On Windows, you might need to use `npx.cmd` if `npx` is not in your PATH or if you encounter issues:
23
27
 
24
- #### For Distribution (Publishing to NPM)
28
+ ```json
29
+ {
30
+ "mcpServers": {
31
+ "dodraw": {
32
+ "command": "npx.cmd",
33
+ "args": [
34
+ "-y",
35
+ "dodraw-mcp-server"
36
+ ]
37
+ }
38
+ }
39
+ }
40
+ ```
41
+ ### Example Usage
25
42
 
26
- To make the server available via `npx`, follow these steps:
43
+ Prompt to my agent:
27
44
 
28
- 1. **Login to NPM:**
29
- ```bash
30
- npm login
31
- ```
45
+ "Using dodraw MCP server generate example of decision diagram of some real life situation"
32
46
 
33
- 2. **Verify Package Details:**
34
- Ensure `package.json` has the correct `name`, `version`, and `bin` entry.
35
- ```json
36
- "bin": {
37
- "dodraw-mcp-server": "dist/src/index.js"
38
- }
39
- ```
40
-
41
- 3. **Build the Project:**
42
- Ensure the `dist` folder is up-to-date.
43
- ```bash
44
- npm run build
45
- ```
46
-
47
- 4. **Publish:**
48
- ```bash
49
- npm publish --access public
50
- ```
51
-
52
- ### 2. Via Source Code
53
-
54
- 1. Clone the repository.
55
- 2. Install dependencies: `npm install`.
56
- 3. Build: `npm run build`.
57
- 4. Configure your MCP Client (e.g., Claude Desktop) to point to the built file:
58
- ```json
59
- "dodraw": {
60
- "command": "node",
61
- "args": ["/path/to/repo/mcp-server/dist/src/index.js"]
62
- }
63
- ```
47
+ Agent response:
48
+ ![alt text](image.png)
@@ -326,7 +326,7 @@ async function handleToolCall(name, args) {
326
326
  state.nodes.push(newNode);
327
327
  state.edges.push(newEdge);
328
328
  await (0, fileHandler_1.saveDiagramFile)(args.filePath, state);
329
- return { content: [{ type: "text", text: `Added node '${args.label}' to the ${args.direction} of '${sourceNode.label}' and connected them.` }] };
329
+ return { content: [{ type: "text", text: `Added node '${args.label}' (ID: ${newNodeId}) to the ${args.direction} of '${sourceNode.label}' and connected them.` }] };
330
330
  }
331
331
  case "add_edge": {
332
332
  const state = await (0, fileHandler_1.readDiagramFile)(args.filePath);
package/image.png ADDED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dodraw-mcp-server",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "MCP server for DoDraw",
5
5
  "main": "dist/src/index.js",
6
6
  "bin": {
@@ -344,7 +344,7 @@ export async function handleToolCall(name: string, args: any): Promise<any> {
344
344
  state.edges.push(newEdge);
345
345
 
346
346
  await saveDiagramFile(args.filePath, state);
347
- return { content: [{ type: "text", text: `Added node '${args.label}' to the ${args.direction} of '${sourceNode.label}' and connected them.` }] };
347
+ return { content: [{ type: "text", text: `Added node '${args.label}' (ID: ${newNodeId}) to the ${args.direction} of '${sourceNode.label}' and connected them.` }] };
348
348
  }
349
349
  case "add_edge": {
350
350
  const state = await readDiagramFile(args.filePath);