@mkrlbs/mcp-adonisjs 0.1.0 → 1.0.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 +55 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
# AdonisJS MCP Server
|
|
2
2
|
|
|
3
|
-
A secure [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server
|
|
3
|
+
A secure [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server
|
|
4
|
+
for executing AdonisJS Ace commands. This server allows AI assistants to
|
|
5
|
+
interact with AdonisJS projects through a controlled, secure interface.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
6
8
|
|
|
7
|
-
- 🔒 **Secure by default**: Blacklists dangerous commands and prevents shell
|
|
9
|
+
- 🔒 **Secure by default**: Blacklists dangerous commands and prevents shell
|
|
10
|
+
injection
|
|
8
11
|
- 🛠️ **Multiple tools**: Pre-configured tools for common AdonisJS operations
|
|
9
12
|
- ✅ **Validation**: Strict argument validation using Zod schemas
|
|
10
13
|
- 📦 **TypeScript**: Fully typed with TypeScript for better DX
|
|
@@ -22,10 +25,13 @@ npm install @mkrlbs/mcp-adonisjs
|
|
|
22
25
|
Creates an AdonisJS controller using `node ace make:controller`.
|
|
23
26
|
|
|
24
27
|
**Arguments:**
|
|
28
|
+
|
|
25
29
|
- `name` (string, required): Name of the controller to create
|
|
26
|
-
- `resource` (boolean, optional): Whether to create a resource controller
|
|
30
|
+
- `resource` (boolean, optional): Whether to create a resource controller
|
|
31
|
+
(default: false)
|
|
27
32
|
|
|
28
33
|
**Example:**
|
|
34
|
+
|
|
29
35
|
```json
|
|
30
36
|
{
|
|
31
37
|
"name": "UserController",
|
|
@@ -38,9 +44,11 @@ Creates an AdonisJS controller using `node ace make:controller`.
|
|
|
38
44
|
Creates an AdonisJS service using `node ace make:service`.
|
|
39
45
|
|
|
40
46
|
**Arguments:**
|
|
47
|
+
|
|
41
48
|
- `name` (string, required): Name of the service to create
|
|
42
49
|
|
|
43
50
|
**Example:**
|
|
51
|
+
|
|
44
52
|
```json
|
|
45
53
|
{
|
|
46
54
|
"name": "AuthService"
|
|
@@ -52,10 +60,12 @@ Creates an AdonisJS service using `node ace make:service`.
|
|
|
52
60
|
Executes any AdonisJS Ace command with security checks.
|
|
53
61
|
|
|
54
62
|
**Arguments:**
|
|
63
|
+
|
|
55
64
|
- `command` (string, required): The Ace command to run (e.g., 'make:model')
|
|
56
65
|
- `args` (array of strings, optional): Arguments to pass to the command
|
|
57
66
|
|
|
58
67
|
**Example:**
|
|
68
|
+
|
|
59
69
|
```json
|
|
60
70
|
{
|
|
61
71
|
"command": "make:model",
|
|
@@ -68,6 +78,7 @@ Executes any AdonisJS Ace command with security checks.
|
|
|
68
78
|
### Blacklisted Commands
|
|
69
79
|
|
|
70
80
|
The following commands are blacklisted for security reasons:
|
|
81
|
+
|
|
71
82
|
- `db:wipe`
|
|
72
83
|
- `migration:fresh`
|
|
73
84
|
- `migration:refresh`
|
|
@@ -77,7 +88,9 @@ Attempting to run these commands will result in an error.
|
|
|
77
88
|
|
|
78
89
|
### Shell Injection Protection
|
|
79
90
|
|
|
80
|
-
All command arguments are validated to prevent shell injection attacks. The
|
|
91
|
+
All command arguments are validated to prevent shell injection attacks. The
|
|
92
|
+
following characters are not allowed:
|
|
93
|
+
|
|
81
94
|
- `;` (semicolon)
|
|
82
95
|
- `&` (ampersand)
|
|
83
96
|
- `|` (pipe)
|
|
@@ -97,7 +110,23 @@ Add to your `claude_desktop_config.json`:
|
|
|
97
110
|
|
|
98
111
|
```json
|
|
99
112
|
{
|
|
100
|
-
"
|
|
113
|
+
"servers": {
|
|
114
|
+
"adonisjs": {
|
|
115
|
+
"command": "npx",
|
|
116
|
+
"args": ["-y", "@mkrlbs/mcp-adonisjs"]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### VS Code
|
|
123
|
+
|
|
124
|
+
1. Create a `.vscode/mcp.json` file in your project root.
|
|
125
|
+
2. Add the configuration below:
|
|
126
|
+
|
|
127
|
+
```json
|
|
128
|
+
{
|
|
129
|
+
"servers": {
|
|
101
130
|
"adonisjs": {
|
|
102
131
|
"command": "npx",
|
|
103
132
|
"args": ["-y", "@mkrlbs/mcp-adonisjs"]
|
|
@@ -106,9 +135,29 @@ Add to your `claude_desktop_config.json`:
|
|
|
106
135
|
}
|
|
107
136
|
```
|
|
108
137
|
|
|
138
|
+
**Local Development:**
|
|
139
|
+
|
|
140
|
+
If you are developing this package and want to test it locally within your VS
|
|
141
|
+
Code workspace:
|
|
142
|
+
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"servers": {
|
|
146
|
+
"adonisjs-local": {
|
|
147
|
+
"command": "node",
|
|
148
|
+
"args": ["${workspaceFolder}/build/index.js"],
|
|
149
|
+
"env": {
|
|
150
|
+
"cwd": "${workspaceFolder}"
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
109
157
|
### Other MCP Clients
|
|
110
158
|
|
|
111
|
-
The server uses stdio transport and can be configured with any MCP-compatible
|
|
159
|
+
The server uses stdio transport and can be configured with any MCP-compatible
|
|
160
|
+
client. Provide the command:
|
|
112
161
|
|
|
113
162
|
```bash
|
|
114
163
|
npx @mkrlbs/mcp-adonisjs
|
|
@@ -136,4 +185,3 @@ npm run watch
|
|
|
136
185
|
## License
|
|
137
186
|
|
|
138
187
|
MIT
|
|
139
|
-
|