@eraserlabs/eraser-mcp 0.3.3-next.8 → 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 +42 -7
- package/dist/schemas/renderPrompt.d.ts +4 -2
- package/dist/schemas/renderPrompt.d.ts.map +1 -1
- package/dist/schemas/renderPrompt.js +1 -1
- package/dist/schemas/shared.d.ts +4 -2
- package/dist/schemas/shared.d.ts.map +1 -1
- package/dist/schemas/shared.js +9 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Eraser MCP Server
|
|
2
2
|
|
|
3
|
-
Model Context Protocol (MCP) server for
|
|
3
|
+
Model Context Protocol (MCP) server for [Eraser](https://eraser.io) - generate diagrams and access your files and diagrams.
|
|
4
4
|
|
|
5
5
|
## Quick Start
|
|
6
6
|
|
|
@@ -56,15 +56,50 @@ Add to your Claude Desktop config:
|
|
|
56
56
|
|
|
57
57
|
## Available Tools
|
|
58
58
|
|
|
59
|
+
### AI Diagram
|
|
60
|
+
|
|
61
|
+
Prompt to diagram.
|
|
62
|
+
|
|
59
63
|
| Tool | Description |
|
|
60
64
|
|------|-------------|
|
|
61
|
-
| `renderSequenceDiagram` | Render sequence diagrams |
|
|
62
|
-
| `renderEntityRelationshipDiagram` | Render ERD diagrams |
|
|
63
|
-
| `renderCloudArchitectureDiagram` | Render cloud architecture diagrams |
|
|
64
|
-
| `renderFlowchart` | Render flowcharts |
|
|
65
|
-
| `renderBpmnDiagram` | Render BPMN diagrams |
|
|
66
65
|
| `renderPrompt` | Generate diagrams from natural language using AI |
|
|
67
|
-
|
|
66
|
+
|
|
67
|
+
### Rendering
|
|
68
|
+
|
|
69
|
+
Diagram code (DSL) to diagram.
|
|
70
|
+
|
|
71
|
+
| Tool | Description |
|
|
72
|
+
|------|-------------|
|
|
73
|
+
| `renderSequenceDiagram` | Render sequence diagrams from diagram code |
|
|
74
|
+
| `renderEntityRelationshipDiagram` | Render ERD diagrams from diagram code |
|
|
75
|
+
| `renderCloudArchitectureDiagram` | Render cloud architecture diagrams from diagram code |
|
|
76
|
+
| `renderFlowchart` | Render flowcharts from diagram code |
|
|
77
|
+
| `renderBpmnDiagram` | Render BPMN diagrams from diagram code |
|
|
78
|
+
| `renderElements` | Render multiple diagram elements from diagram code |
|
|
79
|
+
|
|
80
|
+
### Files
|
|
81
|
+
|
|
82
|
+
CRUD for files on app.eraser.io.
|
|
83
|
+
|
|
84
|
+
| Tool | Description |
|
|
85
|
+
|------|-------------|
|
|
86
|
+
| `createFile` | Create a new Eraser file with document and/or diagram elements |
|
|
87
|
+
| `listFiles` | List files in the workspace with pagination, sorting, and filtering |
|
|
88
|
+
| `getFile` | Get a single file including metadata, content, and diagram elements |
|
|
89
|
+
| `updateFile` | Update an existing file's metadata and/or document content |
|
|
90
|
+
| `archiveFile` | Archive (soft-delete) a file |
|
|
91
|
+
|
|
92
|
+
### Diagrams
|
|
93
|
+
|
|
94
|
+
CRUD for diagrams on app.eraser.io.
|
|
95
|
+
|
|
96
|
+
| Tool | Description |
|
|
97
|
+
|------|-------------|
|
|
98
|
+
| `listDiagrams` | List all diagrams in a file |
|
|
99
|
+
| `createDiagram` | Create a new diagram in an existing file |
|
|
100
|
+
| `getDiagram` | Get a specific diagram from a file |
|
|
101
|
+
| `updateDiagram` | Update the code of an existing diagram |
|
|
102
|
+
| `deleteDiagram` | Permanently delete a diagram from a file |
|
|
68
103
|
|
|
69
104
|
## Documentation
|
|
70
105
|
|
|
@@ -52,10 +52,12 @@ export declare const renderPromptSchema: z.ZodObject<{
|
|
|
52
52
|
standard: "standard";
|
|
53
53
|
premium: "premium";
|
|
54
54
|
}>>;
|
|
55
|
-
|
|
55
|
+
gitContexts: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
56
|
+
publicRepoUrl: z.ZodString;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
56
58
|
repoName: z.ZodString;
|
|
57
59
|
orgName: z.ZodString;
|
|
58
|
-
}, z.core.$strip
|
|
60
|
+
}, z.core.$strip>]>>>;
|
|
59
61
|
}, z.core.$loose>;
|
|
60
62
|
export type RenderPromptInput = z.infer<typeof renderPromptSchema>;
|
|
61
63
|
//# sourceMappingURL=renderPrompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderPrompt.d.ts","sourceRoot":"","sources":["../../src/schemas/renderPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"renderPrompt.d.ts","sourceRoot":"","sources":["../../src/schemas/renderPrompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAUf,CAAC;AAEjB,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
|
@@ -11,6 +11,6 @@ exports.renderPromptSchema = shared_1.renderOptionsSchema
|
|
|
11
11
|
attachments: zod_1.z.array(zod_1.z.unknown()).optional(),
|
|
12
12
|
contextId: zod_1.z.string().optional().describe('ID of an AI preset belonging to the team.'),
|
|
13
13
|
mode: zod_1.z.enum(shared_1.aiModeSettings).optional(),
|
|
14
|
-
|
|
14
|
+
gitContexts: zod_1.z.array(shared_1.gitRepoSchema).optional().describe('Git repository contexts for diagram generation. Supports one or more repositories.'),
|
|
15
15
|
})
|
|
16
16
|
.passthrough();
|
package/dist/schemas/shared.d.ts
CHANGED
|
@@ -38,10 +38,12 @@ export declare const diagramElementSchema: z.ZodObject<{
|
|
|
38
38
|
x: z.ZodOptional<z.ZodNumber>;
|
|
39
39
|
y: z.ZodOptional<z.ZodNumber>;
|
|
40
40
|
}, z.core.$strip>;
|
|
41
|
-
export declare const gitRepoSchema: z.ZodObject<{
|
|
41
|
+
export declare const gitRepoSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
42
|
+
publicRepoUrl: z.ZodString;
|
|
43
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
42
44
|
repoName: z.ZodString;
|
|
43
45
|
orgName: z.ZodString;
|
|
44
|
-
}, z.core.$strip>;
|
|
46
|
+
}, z.core.$strip>]>;
|
|
45
47
|
export declare const fileOptionsSchema: z.ZodObject<{
|
|
46
48
|
create: z.ZodOptional<z.ZodBoolean>;
|
|
47
49
|
linkAccess: z.ZodOptional<z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wCAAyC,CAAC;AACxE,eAAO,MAAM,iBAAiB,4CAA6C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,qCAAsC,CAAC;AACpE,eAAO,MAAM,iBAAiB,0CAA2C,CAAC;AAC1E,eAAO,MAAM,kBAAkB,oIAOrB,CAAC;AACX,eAAO,MAAM,cAAc,kCAAmC,CAAC;AAC/D,eAAO,MAAM,aAAa,4BAA6B,CAAC;AACxD,eAAO,MAAM,kBAAkB,0BAA2B,CAAC;AAE3D;;;GAGG;AACH,oBAAY,YAAY;IACtB,EAAE,qBAAqB;IACvB,GAAG,gCAAgC;IACnC,GAAG,+BAA+B;IAClC,IAAI,sBAAsB;IAC1B,IAAI,iBAAiB;CACtB;AAED,eAAO,MAAM,gBAAgB,gCAA6B,CAAC;AAC3D,eAAO,MAAM,cAAc;;;;;;;EAA6B,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/schemas/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;GAGG;AACH,eAAO,MAAM,iBAAiB,wCAAyC,CAAC;AACxE,eAAO,MAAM,iBAAiB,4CAA6C,CAAC;AAC5E,eAAO,MAAM,gBAAgB,qCAAsC,CAAC;AACpE,eAAO,MAAM,iBAAiB,0CAA2C,CAAC;AAC1E,eAAO,MAAM,kBAAkB,oIAOrB,CAAC;AACX,eAAO,MAAM,cAAc,kCAAmC,CAAC;AAC/D,eAAO,MAAM,aAAa,4BAA6B,CAAC;AACxD,eAAO,MAAM,kBAAkB,0BAA2B,CAAC;AAE3D;;;GAGG;AACH,oBAAY,YAAY;IACtB,EAAE,qBAAqB;IACvB,GAAG,gCAAgC;IACnC,GAAG,+BAA+B;IAClC,IAAI,sBAAsB;IAC1B,IAAI,iBAAiB;CACtB;AAED,eAAO,MAAM,gBAAgB,gCAA6B,CAAC;AAC3D,eAAO,MAAM,cAAc;;;;;;;EAA6B,CAAC;AAEzD,eAAO,MAAM,oBAAoB;;;;;;iBAM/B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;mBAQxB,CAAC;AAEH,eAAO,MAAM,iBAAiB;;;;;;;;;;iBAG5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,0EAAsD,CAAC;AAEtF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAahB,CAAC;AAGjB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
package/dist/schemas/shared.js
CHANGED
|
@@ -42,10 +42,15 @@ exports.diagramElementSchema = zod_1.z.object({
|
|
|
42
42
|
x: zod_1.z.number().optional(),
|
|
43
43
|
y: zod_1.z.number().optional(),
|
|
44
44
|
});
|
|
45
|
-
exports.gitRepoSchema = zod_1.z.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
45
|
+
exports.gitRepoSchema = zod_1.z.union([
|
|
46
|
+
zod_1.z.object({
|
|
47
|
+
publicRepoUrl: zod_1.z.string().describe('Full URL of a public GitHub repository (e.g. https://github.com/org/repo).'),
|
|
48
|
+
}),
|
|
49
|
+
zod_1.z.object({
|
|
50
|
+
repoName: zod_1.z.string().describe('Name of the repository.'),
|
|
51
|
+
orgName: zod_1.z.string().describe('Name of the organization.'),
|
|
52
|
+
}),
|
|
53
|
+
]);
|
|
49
54
|
exports.fileOptionsSchema = zod_1.z.object({
|
|
50
55
|
create: zod_1.z.boolean().optional().describe('Whether to create a new file. Defaults to false.'),
|
|
51
56
|
linkAccess: exports.LinkAccessEnum.optional().describe('Optional link sharing access level. Defaults to using team config.'),
|