strapi-mcp-connect 1.0.6
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/HOW_TO_USE.md +188 -0
- package/LICENSE +21 -0
- package/README.md +306 -0
- package/build/index.js +310 -0
- package/package.json +49 -0
package/HOW_TO_USE.md
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# 📖 Complete Beginner's Guide: How to Use `strapi-connect-mcp` on Any Computer / Laptop
|
|
2
|
+
|
|
3
|
+
This guide explains **step-by-step** how anyone can use the `strapi-connect-mcp` NPM package on their own computer, even if they have never used an MCP server before.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 🧠 What is this package and how does it work?
|
|
8
|
+
|
|
9
|
+
`strapi-connect-mcp` is a **Bridge** between your AI Editor (**Claude Desktop, Cursor, VS Code**) and your **Strapi CMS**.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────┐
|
|
13
|
+
│ AI Assistant (Claude / Cursor) │
|
|
14
|
+
└────────────────┬────────────────┘
|
|
15
|
+
│ (MCP Protocol)
|
|
16
|
+
▼
|
|
17
|
+
┌─────────────────────────────────┐
|
|
18
|
+
│ strapi-connect-mcp (NPM) │
|
|
19
|
+
└────────────────┬────────────────┘
|
|
20
|
+
│ (REST API + Token)
|
|
21
|
+
▼
|
|
22
|
+
┌─────────────────────────────────┐
|
|
23
|
+
│ Your Strapi CMS │
|
|
24
|
+
│ (http://localhost:1337) │
|
|
25
|
+
└─────────────────────────────────┘
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
> **Important Note:** You do **NOT** install this inside your Next.js frontend folder or Strapi backend folder. It is an independent tool configured directly inside your AI client.
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📋 Prerequisites (What you need on the other laptop)
|
|
33
|
+
|
|
34
|
+
1. **Node.js (version 18 or above)** installed:
|
|
35
|
+
- Check by opening terminal and running: `node -v`
|
|
36
|
+
- If not installed, download from [nodejs.org](https://nodejs.org).
|
|
37
|
+
2. **Strapi CMS Running**:
|
|
38
|
+
- Local (`http://localhost:1337`) or hosted URL (`https://your-strapi-app.com`).
|
|
39
|
+
3. An AI Editor:
|
|
40
|
+
- **Claude Desktop App** OR **Cursor IDE** OR **VS Code** with MCP extension.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🚀 Step 1: Generate Strapi API Token (in Strapi Admin)
|
|
45
|
+
|
|
46
|
+
Before configuring your AI tool, you need an API Token so the MCP server has permission to talk to Strapi:
|
|
47
|
+
|
|
48
|
+
1. Open your Strapi Admin Panel in your browser (e.g. `http://localhost:1337/admin`).
|
|
49
|
+
2. In the left sidebar, go to **Settings** $\rightarrow$ **API Tokens**.
|
|
50
|
+
3. Click the top-right button: **`+ Create new API Token`**.
|
|
51
|
+
4. Fill in the details:
|
|
52
|
+
- **Name:** `MCP Connector`
|
|
53
|
+
- **Token duration:** `Unlimited`
|
|
54
|
+
- **Token type:** `Full access` *(or select custom permissions)*
|
|
55
|
+
5. Click **Save**.
|
|
56
|
+
6. **Copy the Token immediately** (Strapi only shows this token once on screen).
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## ⚙️ Step 2: Configure in Your AI Editor (Choose Method A or B)
|
|
61
|
+
|
|
62
|
+
You have two easy ways to use this package on any laptop:
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### Option A: Direct Execution via `npx` (Recommended - Zero Installation)
|
|
67
|
+
|
|
68
|
+
With `npx`, you do **NOT** need to run any install command in your terminal. When the AI editor starts, `npx` automatically fetches and runs `strapi-connect-mcp`.
|
|
69
|
+
|
|
70
|
+
#### 1. If using Claude Desktop:
|
|
71
|
+
- **Windows File Path:** Press `Win + R`, paste `%APPDATA%\Claude\claude_desktop_config.json`, and press Enter.
|
|
72
|
+
- **macOS File Path:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
73
|
+
|
|
74
|
+
Add the following JSON into `claude_desktop_config.json`:
|
|
75
|
+
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"strapi": {
|
|
80
|
+
"command": "npx",
|
|
81
|
+
"args": [
|
|
82
|
+
"-y",
|
|
83
|
+
"strapi-connect-mcp"
|
|
84
|
+
],
|
|
85
|
+
"env": {
|
|
86
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
87
|
+
"STRAPI_API_TOKEN": "PASTE_YOUR_COPIED_STRAPI_TOKEN_HERE"
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### 2. If using Cursor IDE:
|
|
95
|
+
1. Open Cursor $\rightarrow$ Go to **Settings** (⚙️) $\rightarrow$ **Features** $\rightarrow$ **MCP**.
|
|
96
|
+
2. Click **Add New MCP Server**.
|
|
97
|
+
3. Set:
|
|
98
|
+
- **Name:** `strapi`
|
|
99
|
+
- **Type:** `command`
|
|
100
|
+
- **Command:** `npx -y strapi-connect-mcp`
|
|
101
|
+
- **Environment Variables:**
|
|
102
|
+
- `STRAPI_URL` = `http://localhost:1337`
|
|
103
|
+
- `STRAPI_API_TOKEN` = `PASTE_YOUR_STRAPI_TOKEN_HERE`
|
|
104
|
+
|
|
105
|
+
*(Or edit `.cursor/mcp.json` with the JSON config above).*
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### Option B: Permanent Global Install via `npm`
|
|
110
|
+
|
|
111
|
+
If you want to install it permanently on the computer:
|
|
112
|
+
|
|
113
|
+
1. Open your terminal (PowerShell / Command Prompt / Terminal) and run:
|
|
114
|
+
```bash
|
|
115
|
+
npm install -g strapi-connect-mcp
|
|
116
|
+
```
|
|
117
|
+
2. Now in your Claude Desktop or Cursor config (`claude_desktop_config.json`):
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
{
|
|
121
|
+
"mcpServers": {
|
|
122
|
+
"strapi": {
|
|
123
|
+
"command": "strapi-connect-mcp",
|
|
124
|
+
"env": {
|
|
125
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
126
|
+
"STRAPI_API_TOKEN": "PASTE_YOUR_COPIED_STRAPI_TOKEN_HERE"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## 🔄 Step 3: Restart Your AI Editor
|
|
136
|
+
|
|
137
|
+
After saving the configuration file:
|
|
138
|
+
1. **Fully close** Claude Desktop or Cursor (make sure it is not minimized in the system tray).
|
|
139
|
+
2. **Re-open** Claude Desktop / Cursor.
|
|
140
|
+
3. In Claude Desktop, you will see a small **Hammer (🔨) icon** appear in the chat prompt box with all Strapi tools:
|
|
141
|
+
- `test_connection`
|
|
142
|
+
- `get_entries`
|
|
143
|
+
- `get_entry`
|
|
144
|
+
- `get_single_type`
|
|
145
|
+
- `update_single_type`
|
|
146
|
+
- `create_entry`
|
|
147
|
+
- `update_entry`
|
|
148
|
+
- `delete_entry`
|
|
149
|
+
- `raw_query`
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
## 💬 Step 4: Test in AI Chat (Example Prompts)
|
|
154
|
+
|
|
155
|
+
Now, simply talk to your AI assistant in plain English or Hindi:
|
|
156
|
+
|
|
157
|
+
### 1. Test Connection:
|
|
158
|
+
> *"Test my Strapi connection using MCP."*
|
|
159
|
+
|
|
160
|
+
### 2. Fetch Collection Entries:
|
|
161
|
+
> *"List all entries from my **pages** collection in Strapi."*
|
|
162
|
+
> *"Fetch all **products** from Strapi with populate '*'."*
|
|
163
|
+
|
|
164
|
+
### 3. Fetch Single Types:
|
|
165
|
+
> *"Get the data for my **homepage** single type in Strapi."*
|
|
166
|
+
|
|
167
|
+
### 4. Create New Entries:
|
|
168
|
+
> *"Create a new page in Strapi with title 'Services' and slug 'services'."*
|
|
169
|
+
|
|
170
|
+
### 5. Update & Delete:
|
|
171
|
+
> *"Update page documentId 'abxpq43m8u45359hs4s2ngqv' title to 'Contact Us'."*
|
|
172
|
+
> *"Delete the page with ID 4 from Strapi."*
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## ❓ Troubleshooting & Common Issues
|
|
177
|
+
|
|
178
|
+
| Error | Why it happens | How to fix |
|
|
179
|
+
|---|---|---|
|
|
180
|
+
| **401 Unauthorized** | The `STRAPI_API_TOKEN` in config is invalid, expired, or was recreated in Strapi. | Generate a fresh Full Access token in Strapi Admin $\rightarrow$ Settings $\rightarrow$ API Tokens and update the config file. |
|
|
181
|
+
| **404 Not Found** | The collection name is incorrect (e.g. asking for "screens" instead of "pages"). | Use the exact **Plural API ID** from Strapi Admin $\rightarrow$ Content-Type Builder (e.g. `pages`, `articles`, `products`). |
|
|
182
|
+
| **Connection Refused / Failed** | Strapi server is not running or URL is wrong. | Make sure `npm run dev` is running in your Strapi backend folder and `STRAPI_URL` matches (e.g. `http://localhost:1337`). |
|
|
183
|
+
| **Tools not showing in Claude** | Config syntax error or editor wasn't restarted. | Validate your JSON format and completely restart Claude Desktop. |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 📄 License
|
|
188
|
+
MIT © [Kevin-patel](https://github.com/kevinpateldevelopment)
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026
|
|
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,306 @@
|
|
|
1
|
+
# strapi-connect-mcp
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/strapi-connect-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/strapi-connect-mcp)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
[](https://nodejs.org)
|
|
7
|
+
[](https://strapi.io)
|
|
8
|
+
[](https://modelcontextprotocol.io)
|
|
9
|
+
|
|
10
|
+
An enterprise-ready **Model Context Protocol (MCP)** server that connects AI assistants (**Claude Desktop, Cursor, VS Code, Windsurf, Claude Code, and Antigravity**) directly to your **Strapi Headless CMS**.
|
|
11
|
+
|
|
12
|
+
Empower your LLM to perform CRUD operations, inspect and update Single & Collection Types, filter, paginate, deeply populate relations/media, and manage draft/published content seamlessly using natural language.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## 🏛️ Architecture & How It Works
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
20
|
+
│ AI Client / Assistant │
|
|
21
|
+
│ (Claude Desktop, Cursor IDE, VS Code, Windsurf) │
|
|
22
|
+
└──────────────────────────────┬──────────────────────────────┘
|
|
23
|
+
│ Standard I/O (stdio)
|
|
24
|
+
│ JSON-RPC MCP Protocol
|
|
25
|
+
▼
|
|
26
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
27
|
+
│ strapi-connect-mcp │
|
|
28
|
+
│ (Type-Safe Zod Schema & Validation Engine) │
|
|
29
|
+
└──────────────────────────────┬──────────────────────────────┘
|
|
30
|
+
│ Authenticated REST API
|
|
31
|
+
│ (Bearer Token / API Key)
|
|
32
|
+
▼
|
|
33
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
34
|
+
│ Strapi CMS (v4 / v5) │
|
|
35
|
+
│ (http://localhost:1337) │
|
|
36
|
+
└─────────────────────────────────────────────────────────────┘
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## ✨ Key Highlights
|
|
42
|
+
|
|
43
|
+
- ⚡ **Zero Installation (`npx`)**: Run instantly in any MCP-compatible client without manual downloads or repository cloning.
|
|
44
|
+
- 📦 **Full Collection CRUD**: Complete create, read, update, and delete support across all collection types.
|
|
45
|
+
- 📄 **Native Single Types**: First-class support for single types (e.g. `homepage`, `navigation`, `footer`, `global`).
|
|
46
|
+
- 🚀 **Strapi v5 & v4 Ready**: Fully supports Strapi v5 `documentId` identifiers and `draft` / `published` workflows alongside classic numeric IDs.
|
|
47
|
+
- 🔗 **Deep Population & Filters**: Filter queries, sorting parameters, and `populate=*` for nested relations and media fields.
|
|
48
|
+
- 🛡️ **Type-Safe Validation**: Built on top of Zod schemas and official Model Context Protocol SDK.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## ⚙️ Environment Variables
|
|
53
|
+
|
|
54
|
+
| Variable | Required | Default | Description |
|
|
55
|
+
|---|---|---|---|
|
|
56
|
+
| `STRAPI_URL` | **Yes** | `http://localhost:1337` | The base URL of your Strapi CMS (e.g. `http://localhost:1337` or `https://cms.yourdomain.com`). |
|
|
57
|
+
| `STRAPI_API_TOKEN` | **Yes** | *(empty)* | Full-access or custom API Token generated from your Strapi Admin Panel. |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 🚀 Quick Setup Guide (All AI Clients)
|
|
62
|
+
|
|
63
|
+
### 1. Claude Desktop
|
|
64
|
+
|
|
65
|
+
Add this configuration to your Claude Desktop config:
|
|
66
|
+
- **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
67
|
+
- **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
68
|
+
|
|
69
|
+
```json
|
|
70
|
+
{
|
|
71
|
+
"mcpServers": {
|
|
72
|
+
"strapi": {
|
|
73
|
+
"command": "npx",
|
|
74
|
+
"args": [
|
|
75
|
+
"-y",
|
|
76
|
+
"strapi-connect-mcp"
|
|
77
|
+
],
|
|
78
|
+
"env": {
|
|
79
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
80
|
+
"STRAPI_API_TOKEN": "YOUR_STRAPI_API_TOKEN"
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### 2. Cursor IDE
|
|
90
|
+
|
|
91
|
+
1. Navigate to **Cursor Settings** $\rightarrow$ **Features** $\rightarrow$ **MCP** (or create `.cursor/mcp.json` in your project root):
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"mcpServers": {
|
|
96
|
+
"strapi": {
|
|
97
|
+
"command": "npx",
|
|
98
|
+
"args": [
|
|
99
|
+
"-y",
|
|
100
|
+
"strapi-connect-mcp"
|
|
101
|
+
],
|
|
102
|
+
"env": {
|
|
103
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
104
|
+
"STRAPI_API_TOKEN": "YOUR_STRAPI_API_TOKEN"
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### 3. Windsurf IDE
|
|
114
|
+
|
|
115
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
116
|
+
|
|
117
|
+
```json
|
|
118
|
+
{
|
|
119
|
+
"mcpServers": {
|
|
120
|
+
"strapi": {
|
|
121
|
+
"command": "npx",
|
|
122
|
+
"args": [
|
|
123
|
+
"-y",
|
|
124
|
+
"strapi-connect-mcp"
|
|
125
|
+
],
|
|
126
|
+
"env": {
|
|
127
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
128
|
+
"STRAPI_API_TOKEN": "YOUR_STRAPI_API_TOKEN"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### 4. VS Code (Cline / Roo Code / Copilot MCP)
|
|
138
|
+
|
|
139
|
+
Add to your workspace `.vscode/mcp.json` or settings:
|
|
140
|
+
|
|
141
|
+
```json
|
|
142
|
+
{
|
|
143
|
+
"servers": {
|
|
144
|
+
"strapi": {
|
|
145
|
+
"type": "stdio",
|
|
146
|
+
"command": "npx",
|
|
147
|
+
"args": [
|
|
148
|
+
"-y",
|
|
149
|
+
"strapi-connect-mcp"
|
|
150
|
+
],
|
|
151
|
+
"env": {
|
|
152
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
153
|
+
"STRAPI_API_TOKEN": "YOUR_STRAPI_API_TOKEN"
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
### 5. Antigravity IDE
|
|
163
|
+
|
|
164
|
+
Add to your global or workspace configuration (`~/.gemini/config/mcp_config.json`):
|
|
165
|
+
|
|
166
|
+
```json
|
|
167
|
+
{
|
|
168
|
+
"mcpServers": {
|
|
169
|
+
"strapi": {
|
|
170
|
+
"command": "npx",
|
|
171
|
+
"args": [
|
|
172
|
+
"-y",
|
|
173
|
+
"strapi-connect-mcp"
|
|
174
|
+
],
|
|
175
|
+
"env": {
|
|
176
|
+
"STRAPI_URL": "http://localhost:1337",
|
|
177
|
+
"STRAPI_API_TOKEN": "YOUR_STRAPI_API_TOKEN"
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
### 6. Claude Code CLI
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
claude mcp add strapi -- npx -y strapi-connect-mcp
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## 🛠️ Available MCP Tools & Parameters
|
|
196
|
+
|
|
197
|
+
| Tool | Purpose | Parameters |
|
|
198
|
+
|---|---|---|
|
|
199
|
+
| **`test_connection`** | Verifies Strapi instance health and token validity. | *(None)* |
|
|
200
|
+
| **`get_entries`** | Fetch collection entries with pagination, sorting, filters, populate & status. | `pluralApiId`, `page`, `pageSize`, `filters`, `populate`, `sort`, `status` |
|
|
201
|
+
| **`get_entry`** | Fetch a single collection entry by `id` or `documentId`. | `pluralApiId`, `id`, `populate`, `status` |
|
|
202
|
+
| **`get_single_type`** | Fetch single type content (e.g. `homepage`, `footer`). | `singularApiId`, `populate`, `status` |
|
|
203
|
+
| **`update_single_type`** | Update single type content. | `singularApiId`, `data` |
|
|
204
|
+
| **`create_entry`** | Create a new entry in a collection. | `pluralApiId`, `data`, `status` |
|
|
205
|
+
| **`update_entry`** | Modify an existing collection entry. | `pluralApiId`, `id`, `data` |
|
|
206
|
+
| **`delete_entry`** | Permanently delete a collection entry. | `pluralApiId`, `id` |
|
|
207
|
+
| **`raw_query`** | Execute direct requests on any custom Strapi endpoint. | `endpoint`, `method`, `body` |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 💡 Practical Examples
|
|
212
|
+
|
|
213
|
+
### 1. Fetching Entries with Relations
|
|
214
|
+
**Tool:** `get_entries`
|
|
215
|
+
```json
|
|
216
|
+
{
|
|
217
|
+
"pluralApiId": "articles",
|
|
218
|
+
"populate": "*",
|
|
219
|
+
"sort": "createdAt:desc",
|
|
220
|
+
"pageSize": 10
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
### 2. Creating a Published Entry
|
|
225
|
+
**Tool:** `create_entry`
|
|
226
|
+
```json
|
|
227
|
+
{
|
|
228
|
+
"pluralApiId": "pages",
|
|
229
|
+
"data": {
|
|
230
|
+
"title": "Pricing Plans",
|
|
231
|
+
"slug": "pricing",
|
|
232
|
+
"description": "Explore our subscription plans"
|
|
233
|
+
},
|
|
234
|
+
"status": "published"
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### 3. Fetching a Single Type
|
|
239
|
+
**Tool:** `get_single_type`
|
|
240
|
+
```json
|
|
241
|
+
{
|
|
242
|
+
"singularApiId": "homepage",
|
|
243
|
+
"populate": "*"
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## 🔑 Generating Your Strapi API Token
|
|
250
|
+
|
|
251
|
+
1. Open your Strapi Admin Panel (`http://localhost:1337/admin`).
|
|
252
|
+
2. Go to **Settings** $\rightarrow$ **API Tokens** $\rightarrow$ Click **Create new API Token**.
|
|
253
|
+
3. Choose:
|
|
254
|
+
- **Name:** `MCP Connector`
|
|
255
|
+
- **Token duration:** `Unlimited`
|
|
256
|
+
- **Token type:** `Full access` *(or configure granular permissions)*
|
|
257
|
+
4. Click **Save** and copy the generated token into your MCP configuration.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## 💬 Natural Language Prompt Examples
|
|
262
|
+
|
|
263
|
+
Once configured, simply talk to your AI assistant:
|
|
264
|
+
|
|
265
|
+
- *"List all entries from my **articles** collection in Strapi."*
|
|
266
|
+
- *"Fetch the **homepage** single type content and summarize it."*
|
|
267
|
+
- *"Create a new product in Strapi with title 'Wireless Headphones' and price 149."*
|
|
268
|
+
- *"Update the **about-page** entry to change the contact email."*
|
|
269
|
+
- *"Find all draft pages in Strapi."*
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## ❓ Troubleshooting & FAQs
|
|
274
|
+
|
|
275
|
+
| Issue | Root Cause | Solution |
|
|
276
|
+
|---|---|---|
|
|
277
|
+
| **401 Unauthorized** | Invalid, expired, or missing Strapi API Token. | Generate a fresh Full Access token in Strapi Admin $\rightarrow$ Settings $\rightarrow$ API Tokens and update your MCP configuration. |
|
|
278
|
+
| **404 Not Found** | Incorrect collection name or Plural API ID. | Check the exact **Plural API ID** in Strapi Admin $\rightarrow$ Content-Type Builder (e.g. use `pages`, `articles`, `products`). |
|
|
279
|
+
| **Connection Refused** | Strapi server is not running or URL is wrong. | Ensure `npm run dev` is active in your Strapi project and `STRAPI_URL` points to `http://localhost:1337`. |
|
|
280
|
+
| **Tools Not Showing** | Config syntax error or editor wasn't restarted. | Verify JSON syntax and fully restart your AI editor (check background processes). |
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## 🗺️ Roadmap
|
|
285
|
+
|
|
286
|
+
- [ ] Automated Schema & Content-Type Discovery (auto-detect all plural and singular API IDs).
|
|
287
|
+
- [ ] GraphQL query execution support.
|
|
288
|
+
- [ ] Advanced Strapi Media Library management integration.
|
|
289
|
+
- [ ] Batch entry creation & bulk updates.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## ⚠️ Known Limitations
|
|
294
|
+
|
|
295
|
+
- **REST API Dependency:** This MCP server communicates via Strapi's standard REST API. Ensure the REST endpoints are enabled in your Strapi project.
|
|
296
|
+
- **Permissions:** Operations depend on the permissions assigned to your Strapi API Token. If a tool fails with `403 Forbidden`, ensure the token has sufficient permissions for that content type in Strapi Admin $\rightarrow$ Settings $\rightarrow$ API Tokens.
|
|
297
|
+
- **Custom Plugins:** Custom plugins with non-standard API route structures can be accessed using the `raw_query` tool.
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
## 📄 License
|
|
302
|
+
|
|
303
|
+
Distributed under the **MIT License**.
|
|
304
|
+
|
|
305
|
+
Authored with ❤️ by **[Kevin-patel](https://github.com/kevinpateldevelopment)**
|
|
306
|
+
|
package/build/index.js
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import "dotenv/config";
|
|
3
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
4
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
// ---------------------------------------------------------------------------
|
|
7
|
+
// 1. CONFIG — read from environment variables (set these in your MCP client
|
|
8
|
+
// config, see README.md). Never hard-code your token in this file.
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
const STRAPI_URL = (process.env.STRAPI_URL || "http://localhost:1337").replace(/\/+$/, "");
|
|
11
|
+
const STRAPI_API_TOKEN = process.env.STRAPI_API_TOKEN || "";
|
|
12
|
+
if (!STRAPI_API_TOKEN) {
|
|
13
|
+
// We don't crash here — some Strapi setups allow public read access —
|
|
14
|
+
// but we warn on stderr (NEVER console.log — that corrupts the MCP
|
|
15
|
+
// stdio protocol, see "common mistakes" in README).
|
|
16
|
+
console.error("[strapi-mcp] WARNING: STRAPI_API_TOKEN is not set. Only public endpoints will work.");
|
|
17
|
+
}
|
|
18
|
+
// ---------------------------------------------------------------------------
|
|
19
|
+
// 2. SMALL HELPER — one place that talks to the Strapi REST API
|
|
20
|
+
// ---------------------------------------------------------------------------
|
|
21
|
+
async function strapiFetch(path, options = {}) {
|
|
22
|
+
const url = `${STRAPI_URL}/api${path}`;
|
|
23
|
+
const res = await fetch(url, {
|
|
24
|
+
...options,
|
|
25
|
+
headers: {
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
...(STRAPI_API_TOKEN
|
|
28
|
+
? { Authorization: `Bearer ${STRAPI_API_TOKEN}` }
|
|
29
|
+
: {}),
|
|
30
|
+
...(options.headers || {}),
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const text = await res.text();
|
|
34
|
+
let body;
|
|
35
|
+
try {
|
|
36
|
+
body = text ? JSON.parse(text) : null;
|
|
37
|
+
}
|
|
38
|
+
catch {
|
|
39
|
+
body = text;
|
|
40
|
+
}
|
|
41
|
+
if (!res.ok) {
|
|
42
|
+
// Strapi returns useful error detail in body.error — surface it
|
|
43
|
+
const message = typeof body === "object" && body && "error" in body
|
|
44
|
+
? JSON.stringify(body.error)
|
|
45
|
+
: `HTTP ${res.status} ${res.statusText}`;
|
|
46
|
+
throw new Error(`Strapi API error (${res.status}): ${message}`);
|
|
47
|
+
}
|
|
48
|
+
return body;
|
|
49
|
+
}
|
|
50
|
+
// ---------------------------------------------------------------------------
|
|
51
|
+
// 3. THE MCP SERVER
|
|
52
|
+
// ---------------------------------------------------------------------------
|
|
53
|
+
const server = new McpServer({
|
|
54
|
+
name: "strapi-mcp-server",
|
|
55
|
+
version: "1.0.0",
|
|
56
|
+
});
|
|
57
|
+
// --- Tool: test_connection -------------------------------------------------
|
|
58
|
+
server.registerTool("test_connection", {
|
|
59
|
+
title: "Test Strapi Connection",
|
|
60
|
+
description: "Checks that this MCP server can reach your Strapi instance. Always run this first.",
|
|
61
|
+
inputSchema: {},
|
|
62
|
+
}, async () => {
|
|
63
|
+
try {
|
|
64
|
+
const res = await fetch(`${STRAPI_URL}/_health`).catch(() => null);
|
|
65
|
+
return {
|
|
66
|
+
content: [
|
|
67
|
+
{
|
|
68
|
+
type: "text",
|
|
69
|
+
text: `Configured Strapi URL: ${STRAPI_URL}\nAPI token set: ${STRAPI_API_TOKEN ? "yes" : "no"}\nServer reachable: ${res ? "yes (HTTP " + res.status + ")" : "could not connect"}`,
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
catch (err) {
|
|
75
|
+
return {
|
|
76
|
+
content: [
|
|
77
|
+
{ type: "text", text: `Connection check failed: ${err.message}` },
|
|
78
|
+
],
|
|
79
|
+
isError: true,
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
// --- Tool: get_entries ------------------------------------------------------
|
|
84
|
+
server.registerTool("get_entries", {
|
|
85
|
+
title: "Get Strapi Entries",
|
|
86
|
+
description: "Fetch a list of entries for a collection type. Use the PLURAL API ID (e.g. 'articles', 'pages', 'products'). Supports pagination, filters, populate, sorting, and draft/published status.",
|
|
87
|
+
inputSchema: {
|
|
88
|
+
pluralApiId: z
|
|
89
|
+
.string()
|
|
90
|
+
.describe("Plural API ID of the collection type, e.g. 'pages', 'articles'"),
|
|
91
|
+
page: z
|
|
92
|
+
.number()
|
|
93
|
+
.int()
|
|
94
|
+
.min(1)
|
|
95
|
+
.default(1)
|
|
96
|
+
.describe("Page number (pagination)"),
|
|
97
|
+
pageSize: z
|
|
98
|
+
.number()
|
|
99
|
+
.int()
|
|
100
|
+
.min(1)
|
|
101
|
+
.max(100)
|
|
102
|
+
.default(25)
|
|
103
|
+
.describe("Results per page"),
|
|
104
|
+
filters: z
|
|
105
|
+
.string()
|
|
106
|
+
.optional()
|
|
107
|
+
.describe("Optional raw Strapi filter query string, e.g. 'filters[title][$contains]=hello'"),
|
|
108
|
+
populate: z
|
|
109
|
+
.string()
|
|
110
|
+
.optional()
|
|
111
|
+
.describe("Optional relations/media to populate, e.g. '*' for all, or 'author,image'"),
|
|
112
|
+
sort: z
|
|
113
|
+
.string()
|
|
114
|
+
.optional()
|
|
115
|
+
.describe("Optional sort string, e.g. 'createdAt:desc' or 'title:asc'"),
|
|
116
|
+
status: z
|
|
117
|
+
.enum(["draft", "published"])
|
|
118
|
+
.optional()
|
|
119
|
+
.describe("Strapi v5 draft and publish status: 'draft' or 'published' (default is published)"),
|
|
120
|
+
},
|
|
121
|
+
}, async ({ pluralApiId, page, pageSize, filters, populate, sort, status }) => {
|
|
122
|
+
const query = [
|
|
123
|
+
`pagination[page]=${page}`,
|
|
124
|
+
`pagination[pageSize]=${pageSize}`,
|
|
125
|
+
];
|
|
126
|
+
if (filters)
|
|
127
|
+
query.push(filters);
|
|
128
|
+
if (populate)
|
|
129
|
+
query.push(`populate=${encodeURIComponent(populate)}`);
|
|
130
|
+
if (sort)
|
|
131
|
+
query.push(`sort=${encodeURIComponent(sort)}`);
|
|
132
|
+
if (status)
|
|
133
|
+
query.push(`status=${status}`);
|
|
134
|
+
const data = await strapiFetch(`/${pluralApiId}?${query.join("&")}`);
|
|
135
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
136
|
+
});
|
|
137
|
+
// --- Tool: get_entry ---------------------------------------------------------
|
|
138
|
+
server.registerTool("get_entry", {
|
|
139
|
+
title: "Get Single Strapi Entry",
|
|
140
|
+
description: "Fetch a single collection entry by its numeric ID or documentId (Strapi v5).",
|
|
141
|
+
inputSchema: {
|
|
142
|
+
pluralApiId: z.string().describe("Plural API ID, e.g. 'pages', 'articles'"),
|
|
143
|
+
id: z.string().describe("The entry's id or documentId"),
|
|
144
|
+
populate: z
|
|
145
|
+
.string()
|
|
146
|
+
.optional()
|
|
147
|
+
.describe("Optional relations/media to populate, e.g. '*'"),
|
|
148
|
+
status: z
|
|
149
|
+
.enum(["draft", "published"])
|
|
150
|
+
.optional()
|
|
151
|
+
.describe("Strapi v5 draft status: 'draft' or 'published'"),
|
|
152
|
+
},
|
|
153
|
+
}, async ({ pluralApiId, id, populate, status }) => {
|
|
154
|
+
const query = [];
|
|
155
|
+
if (populate)
|
|
156
|
+
query.push(`populate=${encodeURIComponent(populate)}`);
|
|
157
|
+
if (status)
|
|
158
|
+
query.push(`status=${status}`);
|
|
159
|
+
const qs = query.length ? `?${query.join("&")}` : "";
|
|
160
|
+
const data = await strapiFetch(`/${pluralApiId}/${id}${qs}`);
|
|
161
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
162
|
+
});
|
|
163
|
+
// --- Tool: get_single_type ---------------------------------------------------
|
|
164
|
+
server.registerTool("get_single_type", {
|
|
165
|
+
title: "Get Strapi Single Type",
|
|
166
|
+
description: "Fetch data for a Single Type (e.g. 'homepage', 'navigation', 'footer', 'global').",
|
|
167
|
+
inputSchema: {
|
|
168
|
+
singularApiId: z
|
|
169
|
+
.string()
|
|
170
|
+
.describe("Singular API ID of the single type, e.g. 'homepage', 'footer'"),
|
|
171
|
+
populate: z
|
|
172
|
+
.string()
|
|
173
|
+
.optional()
|
|
174
|
+
.describe("Optional populate parameter, e.g. '*'"),
|
|
175
|
+
status: z
|
|
176
|
+
.enum(["draft", "published"])
|
|
177
|
+
.optional()
|
|
178
|
+
.describe("Strapi v5 status: 'draft' or 'published'"),
|
|
179
|
+
},
|
|
180
|
+
}, async ({ singularApiId, populate, status }) => {
|
|
181
|
+
const query = [];
|
|
182
|
+
if (populate)
|
|
183
|
+
query.push(`populate=${encodeURIComponent(populate)}`);
|
|
184
|
+
if (status)
|
|
185
|
+
query.push(`status=${status}`);
|
|
186
|
+
const qs = query.length ? `?${query.join("&")}` : "";
|
|
187
|
+
const data = await strapiFetch(`/${singularApiId}${qs}`);
|
|
188
|
+
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
189
|
+
});
|
|
190
|
+
// --- Tool: update_single_type ------------------------------------------------
|
|
191
|
+
server.registerTool("update_single_type", {
|
|
192
|
+
title: "Update Strapi Single Type",
|
|
193
|
+
description: "Update data for a Single Type (e.g. 'homepage', 'navigation', 'footer').",
|
|
194
|
+
inputSchema: {
|
|
195
|
+
singularApiId: z
|
|
196
|
+
.string()
|
|
197
|
+
.describe("Singular API ID of the single type, e.g. 'homepage', 'footer'"),
|
|
198
|
+
data: z
|
|
199
|
+
.union([z.record(z.any()), z.string()])
|
|
200
|
+
.describe("Field values to update as a JSON object"),
|
|
201
|
+
},
|
|
202
|
+
}, async ({ singularApiId, data }) => {
|
|
203
|
+
const parsedData = typeof data === "string" ? JSON.parse(data) : data;
|
|
204
|
+
const result = await strapiFetch(`/${singularApiId}`, {
|
|
205
|
+
method: "PUT",
|
|
206
|
+
body: JSON.stringify({ data: parsedData }),
|
|
207
|
+
});
|
|
208
|
+
return {
|
|
209
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
210
|
+
};
|
|
211
|
+
});
|
|
212
|
+
// --- Tool: create_entry -------------------------------------------------------
|
|
213
|
+
server.registerTool("create_entry", {
|
|
214
|
+
title: "Create Strapi Entry",
|
|
215
|
+
description: "Create a new entry in a collection type. 'data' must be a JSON object matching that content type's fields.",
|
|
216
|
+
inputSchema: {
|
|
217
|
+
pluralApiId: z.string().describe("Plural API ID, e.g. 'pages', 'articles'"),
|
|
218
|
+
data: z
|
|
219
|
+
.union([z.record(z.any()), z.string()])
|
|
220
|
+
.describe('Field values as a JSON object, e.g. { "title": "Hello", "body": "..." }'),
|
|
221
|
+
status: z
|
|
222
|
+
.enum(["draft", "published"])
|
|
223
|
+
.optional()
|
|
224
|
+
.describe("Strapi v5 draft and publish status (default: 'published' or draft)"),
|
|
225
|
+
},
|
|
226
|
+
}, async ({ pluralApiId, data, status }) => {
|
|
227
|
+
const parsedData = typeof data === "string" ? JSON.parse(data) : data;
|
|
228
|
+
const query = status ? `?status=${status}` : "";
|
|
229
|
+
const result = await strapiFetch(`/${pluralApiId}${query}`, {
|
|
230
|
+
method: "POST",
|
|
231
|
+
body: JSON.stringify({ data: parsedData }),
|
|
232
|
+
});
|
|
233
|
+
return {
|
|
234
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
// --- Tool: update_entry -------------------------------------------------------
|
|
238
|
+
server.registerTool("update_entry", {
|
|
239
|
+
title: "Update Strapi Entry",
|
|
240
|
+
description: "Update fields on an existing collection entry by documentId or id.",
|
|
241
|
+
inputSchema: {
|
|
242
|
+
pluralApiId: z.string().describe("Plural API ID, e.g. 'pages', 'articles'"),
|
|
243
|
+
id: z.string().describe("The entry's documentId (or numeric ID)"),
|
|
244
|
+
data: z
|
|
245
|
+
.union([z.record(z.any()), z.string()])
|
|
246
|
+
.describe("Only the fields you want to change, as a JSON object"),
|
|
247
|
+
},
|
|
248
|
+
}, async ({ pluralApiId, id, data }) => {
|
|
249
|
+
const parsedData = typeof data === "string" ? JSON.parse(data) : data;
|
|
250
|
+
const result = await strapiFetch(`/${pluralApiId}/${id}`, {
|
|
251
|
+
method: "PUT",
|
|
252
|
+
body: JSON.stringify({ data: parsedData }),
|
|
253
|
+
});
|
|
254
|
+
return {
|
|
255
|
+
content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
|
|
256
|
+
};
|
|
257
|
+
});
|
|
258
|
+
// --- Tool: delete_entry -------------------------------------------------------
|
|
259
|
+
server.registerTool("delete_entry", {
|
|
260
|
+
title: "Delete Strapi Entry",
|
|
261
|
+
description: "Permanently delete an entry by id or documentId. This cannot be undone.",
|
|
262
|
+
inputSchema: {
|
|
263
|
+
pluralApiId: z.string().describe("Plural API ID, e.g. 'pages', 'articles'"),
|
|
264
|
+
id: z.string().describe("The entry's id or documentId"),
|
|
265
|
+
},
|
|
266
|
+
}, async ({ pluralApiId, id }) => {
|
|
267
|
+
await strapiFetch(`/${pluralApiId}/${id}`, { method: "DELETE" });
|
|
268
|
+
return {
|
|
269
|
+
content: [
|
|
270
|
+
{ type: "text", text: `Deleted entry ${id} from ${pluralApiId}.` },
|
|
271
|
+
],
|
|
272
|
+
};
|
|
273
|
+
});
|
|
274
|
+
// --- Tool: raw_query ----------------------------------------------------------
|
|
275
|
+
server.registerTool("raw_query", {
|
|
276
|
+
title: "Raw Strapi API Request",
|
|
277
|
+
description: "Execute a direct GET, POST, PUT, or DELETE request against any Strapi API endpoint (e.g. '/users', '/custom-route').",
|
|
278
|
+
inputSchema: {
|
|
279
|
+
endpoint: z
|
|
280
|
+
.string()
|
|
281
|
+
.describe("The API path relative to /api, e.g. '/users' or '/pages?populate=*'"),
|
|
282
|
+
method: z.enum(["GET", "POST", "PUT", "DELETE"]).default("GET"),
|
|
283
|
+
body: z
|
|
284
|
+
.union([z.record(z.any()), z.string()])
|
|
285
|
+
.optional()
|
|
286
|
+
.describe("Optional JSON payload for POST/PUT requests"),
|
|
287
|
+
},
|
|
288
|
+
}, async ({ endpoint, method, body }) => {
|
|
289
|
+
const cleanEndpoint = endpoint.startsWith("/") ? endpoint : `/${endpoint}`;
|
|
290
|
+
const parsedBody = body && typeof body === "string" ? JSON.parse(body) : body;
|
|
291
|
+
const data = await strapiFetch(cleanEndpoint, {
|
|
292
|
+
method,
|
|
293
|
+
...(parsedBody ? { body: JSON.stringify(parsedBody) } : {}),
|
|
294
|
+
});
|
|
295
|
+
return {
|
|
296
|
+
content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
|
|
297
|
+
};
|
|
298
|
+
});
|
|
299
|
+
// ---------------------------------------------------------------------------
|
|
300
|
+
// 4. START THE SERVER over stdio
|
|
301
|
+
// ---------------------------------------------------------------------------
|
|
302
|
+
async function main() {
|
|
303
|
+
const transport = new StdioServerTransport();
|
|
304
|
+
await server.connect(transport);
|
|
305
|
+
console.error("[strapi-mcp] Server running on stdio, connected to", STRAPI_URL);
|
|
306
|
+
}
|
|
307
|
+
main().catch((err) => {
|
|
308
|
+
console.error("[strapi-mcp] Fatal error:", err);
|
|
309
|
+
process.exit(1);
|
|
310
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name":"strapi-mcp-connect",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "Model Context Protocol (MCP) server for Strapi CMS. Connects Claude Desktop, Cursor, VS Code, and AI IDEs to Strapi REST API.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"strapi-connect-mcp": "build/index.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"build",
|
|
12
|
+
"README.md",
|
|
13
|
+
"HOW_TO_USE.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"author": "Kevin",
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc && node -e \"require('fs').chmodSync('build/index.js','755')\"",
|
|
19
|
+
"prepublishOnly": "npm run build",
|
|
20
|
+
"start": "node build/index.js",
|
|
21
|
+
"dev": "tsc --watch",
|
|
22
|
+
"inspector": "npx @modelcontextprotocol/inspector node build/index.js"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"mcp",
|
|
26
|
+
"modelcontextprotocol",
|
|
27
|
+
"strapi",
|
|
28
|
+
"strapi-mcp",
|
|
29
|
+
"cms",
|
|
30
|
+
"ai",
|
|
31
|
+
"claude",
|
|
32
|
+
"cursor",
|
|
33
|
+
"llm",
|
|
34
|
+
"anthropic"
|
|
35
|
+
],
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@modelcontextprotocol/sdk": "^1.13.0",
|
|
39
|
+
"dotenv": "^16.4.5",
|
|
40
|
+
"zod": "^3.23.8"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@types/node": "^20.14.0",
|
|
44
|
+
"typescript": "^5.5.4"
|
|
45
|
+
},
|
|
46
|
+
"engines": {
|
|
47
|
+
"node": ">=18"
|
|
48
|
+
}
|
|
49
|
+
}
|