microcms-mcp-server 0.3.0 → 0.3.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/README.md CHANGED
@@ -1,368 +1,87 @@
1
1
  # microCMS MCP Server
2
2
 
3
- A Model Context Protocol (MCP) server for microCMS API integration. This server enables AI assistants like Claude to interact with microCMS content management system.
3
+ [microCMS](https://microcms.io/) のMCP(Model Context Protocol)サーバーです。
4
+ ClaudeなどのAIアシスタントがmicroCMSのコンテンツ管理システムとやり取りできるようにします。
4
5
 
5
- ## Features
6
+ ## 必要なもの
6
7
 
7
- - **Content Management**: Full CRUD operations for microCMS list-type APIs
8
- - **Eight Core Tools**:
9
- - `microcms_get_list` - Retrieve content lists with filtering and pagination
10
- - `microcms_get_content` - Get individual content items
11
- - `microcms_create_content` - Create new content
12
- - `microcms_update_content` - Update content (PUT)
13
- - `microcms_patch_content` - Partially update content (PATCH)
14
- - `microcms_delete_content` - Delete content
15
- - `microcms_get_media` - Retrieve media files (Management API)
16
- - `microcms_upload_media` - Upload media files (Management API)
17
- - **Full API Support**: Supports all microCMS query parameters including drafts, filters, pagination, and depth expansion
8
+ - microCMSのサービスIDとAPIキー
18
9
 
19
- ## Requirements
10
+ ## セットアップ
20
11
 
21
- - Node.js 18.0.0 or higher
22
- - microCMS account and API key
12
+ ### 方法1: Desktop Extension (DXT) をつかう
23
13
 
24
- ## Installation
14
+ Claude Desktopに導入する場合、dxtファイルを使って簡単にインストールできます。
25
15
 
26
- ### Method 1: Using npx (Recommended)
16
+ 1. [リリースページ](https://github.com/microcmsio/microcms-mcp-server/releases) から最新の `microcms-mcp-server.dxt` をダウンロード
17
+ 2. Claude Desktopを起動し、設定 > エクステンション を開く
18
+ 3. ダウンロードしたdxtファイルをClaude Desktopにドラッグ&ドロップ
19
+ 4. サービスIDとAPIキーを設定する
27
20
 
28
- No installation required! Use directly with npx:
29
21
 
30
- ```bash
31
- npx microcms-mcp-server --service-id your-service-id --api-key your-api-key
32
- ```
33
-
34
- ### Method 2: Global Installation
35
-
36
- ```bash
37
- npm install -g microcms-mcp-server
38
- microcms-mcp-server --service-id your-service-id --api-key your-api-key
39
- ```
40
-
41
- ### Method 3: Development Setup
42
-
43
- 1. Clone this repository
44
- 2. Install dependencies:
45
- ```bash
46
- npm install
47
- ```
48
-
49
- 3. Build the project:
50
- ```bash
51
- npm run build
52
- ```
53
-
54
- ## Configuration
55
-
56
- You can configure microCMS credentials in two ways:
57
-
58
- ### Method 1: Environment Variables
59
-
60
- 1. Copy the environment template:
61
- ```bash
62
- cp .env.example .env
63
- ```
64
-
65
- 2. Configure your microCMS credentials in `.env`:
66
- ```bash
67
- MICROCMS_SERVICE_ID=your-service-id
68
- MICROCMS_API_KEY=your-api-key
69
- ```
70
-
71
- ### Method 2: Command Line Arguments
72
-
73
- Pass credentials directly as command line arguments:
74
- ```bash
75
- node dist/index.js --service-id your-service-id --api-key your-api-key
76
- ```
22
+ ### 方法2: npx をつかう
77
23
 
78
- **Note**: Command line arguments take precedence over environment variables.
79
-
80
- ## Usage
81
-
82
- ### Running the Server
83
-
84
- Using environment variables:
85
- ```bash
86
- npm start
87
- ```
88
-
89
- Using command line arguments:
90
- ```bash
91
- npm run start:args
92
- # or directly:
93
- node dist/index.js --service-id your-service-id --api-key your-api-key
94
- ```
95
-
96
- ### Using with Claude Desktop
97
-
98
- Add the following to your Claude Desktop MCP configuration file:
99
-
100
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
101
- **Windows**: `%APPDATA%/Claude/claude_desktop_config.json`
102
-
103
- #### Option 1: Using npx (Recommended)
104
24
  ```json
105
25
  {
106
26
  "mcpServers": {
107
27
  "microcms": {
108
28
  "command": "npx",
109
29
  "args": [
110
- "microcms-mcp-server",
111
- "--service-id", "your-service-id",
112
- "--api-key", "your-api-key"
113
- ]
114
- }
115
- }
116
- }
117
- ```
118
-
119
- #### Option 2: Using global installation
120
- ```json
121
- {
122
- "mcpServers": {
123
- "microcms": {
124
- "command": "microcms-mcp-server",
125
- "args": [
126
- "--service-id", "your-service-id",
127
- "--api-key", "your-api-key"
30
+ "-y",
31
+ "microcms-mcp-server@latest",
32
+ "--service-id", "<MICROCMS_SERVICE_ID>",
33
+ "--api-key", "<MICROCMS_API_KEY>"
128
34
  ]
129
35
  }
130
36
  }
131
37
  }
132
38
  ```
133
39
 
134
- #### Option 3: Using local development setup
135
- ```json
136
- {
137
- "mcpServers": {
138
- "microcms": {
139
- "command": "node",
140
- "args": [
141
- "/path/to/microcms-mcp-server/dist/index.js",
142
- "--service-id", "your-service-id",
143
- "--api-key", "your-api-key"
144
- ]
145
- }
146
- }
147
- }
148
- ```
40
+ `MICROCMS_SERVICE_ID`, `MICROCMS_API_KEY` はご自身のものに置き換えてください。
149
41
 
150
- Replace:
151
- - `your-service-id` with your microCMS service ID
152
- - `your-api-key` with your microCMS API key
153
- - `/path/to/microcms-mcp-server/` with the actual path (Option 3 only)
42
+ 設定更新後、Claude Desktopを再起動してください。
154
43
 
155
- Restart Claude Desktop after updating the configuration.
44
+ ## 利用方法
156
45
 
157
- ### Development Mode
46
+ ### 1. 最初にmicroCMSのAPIスキーマを伝える
158
47
 
159
- ```bash
160
- npm run dev
161
48
  ```
162
-
163
- ### Available Scripts
164
-
165
- - `npm run build` - Build TypeScript to JavaScript
166
- - `npm start` - Run the compiled server
167
- - `npm run dev` - Development mode with auto-reload
168
- - `npm run lint` - Run ESLint
169
- - `npm run format` - Format code with Prettier
170
-
171
- ## Tool Examples
172
-
173
- ### Get Content List
174
- ```json
175
- {
176
- "name": "microcms_get_list",
177
- "arguments": {
178
- "endpoint": "blogs",
179
- "limit": 10,
180
- "orders": "-publishedAt"
181
- }
182
- }
49
+ これはmicroCMSのAPIスキーマです。内容を理解してください
183
50
  ```
184
51
 
185
- ### Get Individual Content
186
- ```json
187
- {
188
- "name": "microcms_get_content",
189
- "arguments": {
190
- "endpoint": "blogs",
191
- "contentId": "article-1"
192
- }
193
- }
194
- ```
52
+ APIスキーマは [microCMSの管理画面 > API設定](https://document.microcms.io/manual/export-and-import-api-schema) からJSON形式でエクスポートできます。
195
53
 
196
- ### Create New Content
197
- ```json
198
- {
199
- "name": "microcms_create_content",
200
- "arguments": {
201
- "endpoint": "blogs",
202
- "content": {
203
- "title": "My Blog Post",
204
- "body": "Content here...",
205
- "category": "tech",
206
- "thumbnail": "https://example.com/image.jpg"
207
- }
208
- }
209
- }
210
- ```
54
+ ### 2. microCMSからコンテンツを取得・入稿します
211
55
 
212
- ### Update Content with Image
213
- ```json
214
- {
215
- "name": "microcms_update_content",
216
- "arguments": {
217
- "endpoint": "blogs",
218
- "contentId": "article-1",
219
- "content": {
220
- "title": "Updated Title",
221
- "image": "https://example.com/new-image.jpg"
222
- }
223
- }
224
- }
56
+ microCMSのコンテンツを確認する
225
57
  ```
226
-
227
- ### Get Media Files
228
- ```json
229
- {
230
- "name": "microcms_get_media",
231
- "arguments": {
232
- "limit": 20,
233
- "imageOnly": true,
234
- "fileName": "sample"
235
- }
236
- }
58
+ microCMSの news から最新の記事を10件取得してください
237
59
  ```
238
60
 
239
- ### Upload Media File (Base64)
240
- ```json
241
- {
242
- "name": "microcms_upload_media",
243
- "arguments": {
244
- "fileData": "base64-encoded-file-data",
245
- "fileName": "image.jpg",
246
- "mimeType": "image/jpeg"
247
- }
248
- }
61
+ microCMSにコンテンツを作成して入稿する
249
62
  ```
250
-
251
- ### Upload Media File (External URL)
252
- ```json
253
- {
254
- "name": "microcms_upload_media",
255
- "arguments": {
256
- "externalUrl": "https://example.com/image.jpg"
257
- }
258
- }
63
+ MCPサーバーの概要や利用例について調べ、それを1000文字程度でまとめてmicroCMSの blogs に入稿してください
259
64
  ```
260
65
 
261
- ## Field Type Specifications
262
-
263
- When creating or updating content, different field types require specific formats:
264
-
265
- ### Text Fields
266
- ```json
267
- "title": "Article Title"
66
+ microCMSのコンテンツを取得してレビューしてもらう
268
67
  ```
269
-
270
- ### Rich Editor Fields
271
- ```json
272
- "body": "<h1>見出し</h1><p>このようにHTMLで入稿できます</p>"
273
- ```
274
-
275
- ### Image Fields
276
- Must use URLs from the same microCMS service:
277
- ```json
278
- "thumbnail": "https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample.png"
279
- ```
280
-
281
- ### Multiple Image Fields
282
- ```json
283
- "gallery": [
284
- "https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample1.png",
285
- "https://images.microcms-assets.io/assets/xxxxxxxx/yyyyyyyy/sample2.png"
286
- ]
287
- ```
288
-
289
- ### Date Fields
290
- Use ISO 8601 format:
291
- ```json
292
- "publishedAt": "2020-04-23T14:32:38.163Z"
293
- ```
294
-
295
- ### Select Fields
296
- ```json
297
- "categories": ["カテゴリ1", "カテゴリ2"]
68
+ microCMSの xxxxxx のコンテンツを取得して、日本語的におかしい部分があれば指摘して
298
69
  ```
299
70
 
300
- ### Content Reference Fields
301
- Single reference:
302
- ```json
303
- "relatedArticle": "article-id-123"
304
- ```
305
-
306
- Multiple references:
307
- ```json
308
- "relatedArticles": ["article-id-123", "article-id-456"]
71
+ microCMSのメディア一覧に画像をアップロードする
309
72
  ```
73
+ 次の画像をmicroCMSにアップロードして。
310
74
 
311
- ### Complete Example
312
- ```json
313
- {
314
- "name": "microcms_create_content",
315
- "arguments": {
316
- "endpoint": "blogs",
317
- "content": {
318
- "title": "My Blog Post",
319
- "body": "<h2>Introduction</h2><p>This is a paragraph with <strong>bold text</strong>.</p>",
320
- "thumbnail": "https://images.microcms-assets.io/assets/xxx/yyy/image.png",
321
- "publishedAt": "2024-01-15T10:30:00.000Z",
322
- "categories": ["tech", "tutorial"],
323
- "relatedArticles": ["article-1", "article-2"]
324
- }
325
- }
326
- }
75
+ - https://example.com/sample-image-1.png
76
+ - https://example.com/sample-image-2.png
77
+ - https://example.com/sample-image-3.png
327
78
  ```
328
79
 
329
- ## Media Management
330
-
331
- ### Media Retrieval (`microcms_get_media`)
332
- - **API Type**: Management API v2 (direct fetch)
333
- - **Permissions**: Requires "media retrieval" permissions
334
- - **Features**:
335
- - Pagination with tokens (15-second validity)
336
- - Filter by filename
337
- - Image-only filtering
338
- - Returns URLs, dimensions, and metadata
339
-
340
- ### Media Upload (`microcms_upload_media`)
341
- - **API Type**: Management API v1 (via JS SDK)
342
- - **Permissions**: Requires "media upload" permissions
343
- - **Upload Methods**:
344
- 1. **File Data Upload**: Base64 encoded file data with filename and mimeType
345
- 2. **External URL Upload**: Direct upload from external URL
346
- - **Limitations**:
347
- - File size: 5MB maximum
348
- - One file per request
349
- - Available on Team, Business, Advanced, Enterprise plans
350
- - **Returns**: microCMS asset URLs
351
- - Images: `https://images.microcms-assets.io/...`
352
- - Files: `https://files.microcms-assets.io/...`
353
-
354
- ## API Reference
355
-
356
- All tools support the full range of microCMS API parameters. Content tools use the [Content API](https://document.microcms.io/content-api), while media tools use the [Management API](https://document.microcms.io/management-api).
357
-
358
- ## Error Handling
80
+ ### より詳しい使い方
359
81
 
360
- The server provides detailed error messages for:
361
- - Missing required environment variables
362
- - Invalid API requests
363
- - microCMS API errors
364
- - Malformed tool parameters
82
+ こちらの記事でより詳しい使い方を紹介しています。
83
+ [MCPサーバーからmicroCMSにコンテンツを入稿する | Zenn](https://zenn.dev/himara2/articles/14eb2260c4f0e4)
365
84
 
366
- ## License
85
+ ## ライセンス
367
86
 
368
- MIT
87
+ MIT
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,wBAAgB,QAAQ,SAyCvB;AAED,wBAAsB,MAAM,kBA0D3B"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAMA,wBAAgB,QAAQ,SA0CvB;AAED,wBAAsB,MAAM,kBA0D3B"}
package/dist/cli.js CHANGED
@@ -33,6 +33,7 @@ Claude Desktop Configuration:
33
33
  "microcms": {
34
34
  "command": "npx",
35
35
  "args": [
36
+ "-y",
36
37
  "microcms-mcp-server",
37
38
  "--service-id", "your-service-id",
38
39
  "--api-key", "your-api-key"
@@ -84,8 +85,8 @@ export async function runCli() {
84
85
  console.error('Run with --help for more information.');
85
86
  process.exit(1);
86
87
  }
87
- // サーバーを起動(既存のロジックを使用)
88
- const { startServer } = await import('./index.js');
88
+ // サーバーを起動
89
+ const { startServer } = await import('./server.js');
89
90
  await startServer();
90
91
  }
91
92
  catch (error) {
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAItC,MAAM,UAAU,QAAQ;IACtB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuCb,CAAC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,MAAM;IAC1B,IAAI,CAAC;QACH,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC;YACxC,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3B,OAAO,EAAE;gBACP,YAAY,EAAE;oBACZ,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,GAAG;iBACX;gBACD,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,KAAK,EAAE,GAAG;iBACX;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,SAAS;oBACf,KAAK,EAAE,GAAG;iBACX;aACF;YACD,gBAAgB,EAAE,IAAI;SACvB,CAAC,CAAC;QAEH,IAAI,MAAM,CAAC,IAAI,EAAE,CAAC;YAChB,QAAQ,EAAE,CAAC;YACX,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,gCAAgC;QAChC,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CAAC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AC,GAAG,CAAC,mBAAmB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,EAAE,CAAC;YACtE,OAAO,CAAC,KAAK,CAAC,2CAA2C,CAAC,CAAC;YAC3D,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC;YACnC,OAAO,CAAC,KAAK,CAAC,6CAA6C,CAAC,CAAC;YAC7D,OAAO,CAAC,KAAK,CAAC,qEAAqE,CAAC,CAAC;YACrF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;YAClB,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;YACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QAED,UAAU;QACV,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;QACpD,MAAM,WAAW,EAAE,CAAC;IAEtB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;QAC1C,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC;AAED,YAAY;AACZ,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,UAAU,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IACpD,MAAM,EAAE,CAAC;AACX,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
- export declare function startServer(): Promise<void>;
2
+ export {};
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AA0GA,wBAAsB,WAAW,kBAgBhC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js CHANGED
@@ -1,118 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
- import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
5
- import { getListTool, handleGetList } from './tools/get-list.js';
6
- import { getContentTool, handleGetContent } from './tools/get-content.js';
7
- import { createContentTool, handleCreateContent } from './tools/create-content.js';
8
- import { updateContentTool, handleUpdateContent } from './tools/update-content.js';
9
- import { patchContentTool, handlePatchContent } from './tools/patch-content.js';
10
- import { deleteContentTool, handleDeleteContent } from './tools/delete-content.js';
11
- import { getMediaTool, handleGetMedia } from './tools/get-media.js';
12
- import { uploadMediaTool, handleUploadMedia } from './tools/upload-media.js';
13
- const server = new Server({
14
- name: 'microcms-mcp-server',
15
- version: '1.0.0',
16
- description: 'A Model Context Protocol server for microCMS API',
17
- }, {
18
- capabilities: {
19
- tools: {},
20
- },
21
- });
22
- server.setRequestHandler(ListToolsRequestSchema, async () => {
23
- return {
24
- tools: [
25
- getListTool,
26
- getContentTool,
27
- createContentTool,
28
- updateContentTool,
29
- patchContentTool,
30
- deleteContentTool,
31
- getMediaTool,
32
- uploadMediaTool,
33
- ],
34
- };
35
- });
36
- server.setRequestHandler(CallToolRequestSchema, async (request) => {
37
- const { name, arguments: args } = request.params;
38
- const params = args;
39
- try {
40
- let result;
41
- switch (name) {
42
- case 'microcms_get_list':
43
- result = await handleGetList(params);
44
- break;
45
- case 'microcms_get_content':
46
- result = await handleGetContent(params);
47
- break;
48
- case 'microcms_create_content':
49
- result = await handleCreateContent(params);
50
- break;
51
- case 'microcms_update_content':
52
- result = await handleUpdateContent(params);
53
- break;
54
- case 'microcms_patch_content':
55
- result = await handlePatchContent(params);
56
- break;
57
- case 'microcms_delete_content':
58
- result = await handleDeleteContent(params);
59
- break;
60
- case 'microcms_get_media':
61
- result = await handleGetMedia(params);
62
- break;
63
- case 'microcms_upload_media':
64
- result = await handleUploadMedia(params);
65
- break;
66
- default:
67
- throw new Error(`Unknown tool: ${name}`);
68
- }
69
- return {
70
- content: [
71
- {
72
- type: 'text',
73
- text: JSON.stringify(result, null, 2),
74
- },
75
- ],
76
- };
77
- }
78
- catch (error) {
79
- const errorMessage = error instanceof Error ? error.message : String(error);
80
- return {
81
- content: [
82
- {
83
- type: 'text',
84
- text: `Error: ${errorMessage}`,
85
- },
86
- ],
87
- isError: true,
88
- };
89
- }
90
- });
91
- export async function startServer() {
92
- try {
93
- // Validate configuration early to provide better error messages
94
- const { parseConfig } = await import('./config.js');
95
- parseConfig();
96
- const transport = new StdioServerTransport();
97
- await server.connect(transport);
98
- console.error('microCMS MCP Server running on stdio');
99
- }
100
- catch (error) {
101
- if (error instanceof Error && error.message.includes('microCMS credentials')) {
102
- console.error('Configuration Error:', error.message);
103
- process.exit(1);
104
- }
105
- throw error;
106
- }
107
- }
2
+ import { startServer } from './server.js';
108
3
  async function main() {
109
4
  await startServer();
110
5
  }
111
- // 直接実行された場合のみサーバーを起動
112
- if (import.meta.url === `file://${process.argv[1]}`) {
113
- main().catch((error) => {
114
- console.error('Fatal error in main():', error);
115
- process.exit(1);
116
- });
117
- }
6
+ main();
118
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAA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U,IAAI;IACjB,MAAM,WAAW,EAAE,CAAC;AACtB,CAAC;AAED,IAAI,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function startServer(): Promise<void>;
2
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAkHA,wBAAsB,WAAW,kBAgBhC"}
package/dist/server.js ADDED
@@ -0,0 +1,117 @@
1
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
4
+ import { getListTool, handleGetList } from './tools/get-list.js';
5
+ import { getContentTool, handleGetContent } from './tools/get-content.js';
6
+ import { createContentPublishedTool, handleCreateContentPublished } from './tools/create-content-published.js';
7
+ import { createContentDraftTool, handleCreateContentDraft } from './tools/create-content-draft.js';
8
+ import { updateContentPublishedTool, handleUpdateContentPublished } from './tools/update-content-published.js';
9
+ import { updateContentDraftTool, handleUpdateContentDraft } from './tools/update-content-draft.js';
10
+ import { patchContentTool, handlePatchContent } from './tools/patch-content.js';
11
+ import { deleteContentTool, handleDeleteContent } from './tools/delete-content.js';
12
+ import { getMediaTool, handleGetMedia } from './tools/get-media.js';
13
+ import { uploadMediaTool, handleUploadMedia } from './tools/upload-media.js';
14
+ const server = new Server({
15
+ name: 'microcms-mcp-server',
16
+ version: '1.0.0',
17
+ description: 'A Model Context Protocol server for microCMS API',
18
+ }, {
19
+ capabilities: {
20
+ tools: {},
21
+ },
22
+ });
23
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
24
+ return {
25
+ tools: [
26
+ getListTool,
27
+ getContentTool,
28
+ createContentPublishedTool,
29
+ createContentDraftTool,
30
+ updateContentPublishedTool,
31
+ updateContentDraftTool,
32
+ patchContentTool,
33
+ deleteContentTool,
34
+ getMediaTool,
35
+ uploadMediaTool,
36
+ ],
37
+ };
38
+ });
39
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
40
+ const { name, arguments: args } = request.params;
41
+ const params = args;
42
+ try {
43
+ let result;
44
+ switch (name) {
45
+ case 'microcms_get_list':
46
+ result = await handleGetList(params);
47
+ break;
48
+ case 'microcms_get_content':
49
+ result = await handleGetContent(params);
50
+ break;
51
+ case 'microcms_create_content_published':
52
+ result = await handleCreateContentPublished(params);
53
+ break;
54
+ case 'microcms_create_content_draft':
55
+ result = await handleCreateContentDraft(params);
56
+ break;
57
+ case 'microcms_update_content_published':
58
+ result = await handleUpdateContentPublished(params);
59
+ break;
60
+ case 'microcms_update_content_draft':
61
+ result = await handleUpdateContentDraft(params);
62
+ break;
63
+ case 'microcms_patch_content':
64
+ result = await handlePatchContent(params);
65
+ break;
66
+ case 'microcms_delete_content':
67
+ result = await handleDeleteContent(params);
68
+ break;
69
+ case 'microcms_get_media':
70
+ result = await handleGetMedia(params);
71
+ break;
72
+ case 'microcms_upload_media':
73
+ result = await handleUploadMedia(params);
74
+ break;
75
+ default:
76
+ throw new Error(`Unknown tool: ${name}`);
77
+ }
78
+ return {
79
+ content: [
80
+ {
81
+ type: 'text',
82
+ text: JSON.stringify(result, null, 2),
83
+ },
84
+ ],
85
+ };
86
+ }
87
+ catch (error) {
88
+ const errorMessage = error instanceof Error ? error.message : String(error);
89
+ return {
90
+ content: [
91
+ {
92
+ type: 'text',
93
+ text: `Error: ${errorMessage}`,
94
+ },
95
+ ],
96
+ isError: true,
97
+ };
98
+ }
99
+ });
100
+ export async function startServer() {
101
+ try {
102
+ // Validate configuration early to provide better error messages
103
+ const { parseConfig } = await import('./config.js');
104
+ parseConfig();
105
+ const transport = new StdioServerTransport();
106
+ await server.connect(transport);
107
+ // console.error('microCMS MCP Server running on stdio');
108
+ }
109
+ catch (error) {
110
+ if (error instanceof Error && error.message.includes('microCMS credentials')) {
111
+ console.error('Configuration Error:', error.message);
112
+ process.exit(1);
113
+ }
114
+ throw error;
115
+ }
116
+ }
117
+ //# sourceMappingURL=server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AACnG,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG7E,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,qBAAqB;IAC3B,OAAO,EAAE,OAAO;IAChB,WAAW,EAAE,kDAAkD;CAChE,EACD;IACE,YAAY,EAAE;QACZ,KAAK,EAAE,EAAE;KACV;CACF,CACF,CAAC;AAEF,MAAM,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,KAAK,IAAI,EAAE;IAC1D,OAAO;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D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import type { ToolParameters } from '../types.js';
3
+ export declare const createContentDraftTool: Tool;
4
+ export declare function handleCreateContentDraft(params: ToolParameters): Promise<{
5
+ id: string;
6
+ }>;
7
+ //# sourceMappingURL=create-content-draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-content-draft.d.ts","sourceRoot":"","sources":["../../src/tools/create-content-draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,sBAAsB,EAAE,IAqBpC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,cAAc;;GAcpE"}
@@ -0,0 +1,36 @@
1
+ import { create } from '../client.js';
2
+ export const createContentDraftTool = {
3
+ name: 'microcms_create_content_draft',
4
+ description: 'Create new content in microCMS as draft. Field type specifications: Image fields require URLs from the same microCMS service (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png"), only the URL string is required. Multiple image fields use array format. Rich editor fields expect HTML strings. Date fields use ISO 8601 format. Select fields use arrays. Content reference fields use contentId strings or arrays for multiple references.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ endpoint: {
9
+ type: 'string',
10
+ description: 'Content type name (e.g., "blogs", "news")',
11
+ },
12
+ content: {
13
+ type: 'object',
14
+ description: 'Content data to create (JSON object). Field formats: text="string", richEditor="<h1>HTML</h1>", image="https://images.microcms-assets.io/...", multipleImages=["url1","url2"], date="2020-04-23T14:32:38.163Z", select=["option1","option2"], contentReference="contentId" or ["id1","id2"].',
15
+ },
16
+ contentId: {
17
+ type: 'string',
18
+ description: 'Specific content ID to assign',
19
+ },
20
+ },
21
+ required: ['endpoint', 'content'],
22
+ },
23
+ };
24
+ export async function handleCreateContentDraft(params) {
25
+ const { endpoint, content, ...options } = params;
26
+ if (!content) {
27
+ throw new Error('content is required');
28
+ }
29
+ const createOptions = {
30
+ isDraft: true, // Always save as draft
31
+ };
32
+ if (options.contentId)
33
+ createOptions.contentId = options.contentId;
34
+ return await create(endpoint, content, createOptions);
35
+ }
36
+ //# sourceMappingURL=create-content-draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-content-draft.js","sourceRoot":"","sources":["../../src/tools/create-content-draft.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,mcAAmc;IAChd,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8RAA8R;aAC5S;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;KAClC;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,MAAsB;IACnE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;IAEjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,aAAa,GAA0B;QAC3C,OAAO,EAAE,IAAI,EAAE,uBAAuB;KACvC,CAAC;IAEF,IAAI,OAAO,CAAC,SAAS;QAAE,aAAa,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAEnE,OAAO,MAAM,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import type { ToolParameters } from '../types.js';
3
+ export declare const createContentPublishedTool: Tool;
4
+ export declare function handleCreateContentPublished(params: ToolParameters): Promise<{
5
+ id: string;
6
+ }>;
7
+ //# sourceMappingURL=create-content-published.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-content-published.d.ts","sourceRoot":"","sources":["../../src/tools/create-content-published.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,0BAA0B,EAAE,IAqBxC,CAAC;AAEF,wBAAsB,4BAA4B,CAAC,MAAM,EAAE,cAAc;;GAcxE"}
@@ -0,0 +1,36 @@
1
+ import { create } from '../client.js';
2
+ export const createContentPublishedTool = {
3
+ name: 'microcms_create_content_published',
4
+ description: 'Create new content in microCMS and publish it immediately. Field type specifications: Image fields require URLs from the same microCMS service (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png"), only the URL string is required. Multiple image fields use array format. Rich editor fields expect HTML strings. Date fields use ISO 8601 format. Select fields use arrays. Content reference fields use contentId strings or arrays for multiple references.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ endpoint: {
9
+ type: 'string',
10
+ description: 'Content type name (e.g., "blogs", "news")',
11
+ },
12
+ content: {
13
+ type: 'object',
14
+ description: 'Content data to create (JSON object). Field formats: text="string", richEditor="<h1>HTML</h1>", image="https://images.microcms-assets.io/...", multipleImages=["url1","url2"], date="2020-04-23T14:32:38.163Z", select=["option1","option2"], contentReference="contentId" or ["id1","id2"].',
15
+ },
16
+ contentId: {
17
+ type: 'string',
18
+ description: 'Specific content ID to assign',
19
+ },
20
+ },
21
+ required: ['endpoint', 'content'],
22
+ },
23
+ };
24
+ export async function handleCreateContentPublished(params) {
25
+ const { endpoint, content, ...options } = params;
26
+ if (!content) {
27
+ throw new Error('content is required');
28
+ }
29
+ const createOptions = {
30
+ isDraft: false, // Always publish
31
+ };
32
+ if (options.contentId)
33
+ createOptions.contentId = options.contentId;
34
+ return await create(endpoint, content, createOptions);
35
+ }
36
+ //# sourceMappingURL=create-content-published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-content-published.js","sourceRoot":"","sources":["../../src/tools/create-content-published.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,CAAC,MAAM,0BAA0B,GAAS;IAC9C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,qdAAqd;IACle,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8RAA8R;aAC5S;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;KAClC;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,MAAsB;IACvE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,CAAC;IAEjD,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,aAAa,GAA0B;QAC3C,OAAO,EAAE,KAAK,EAAE,iBAAiB;KAClC,CAAC;IAEF,IAAI,OAAO,CAAC,SAAS;QAAE,aAAa,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IAEnE,OAAO,MAAM,MAAM,CAAC,QAAQ,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACxD,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import type { ToolParameters } from '../types.js';
3
+ export declare const updateContentDraftTool: Tool;
4
+ export declare function handleUpdateContentDraft(params: ToolParameters): Promise<{
5
+ id: string;
6
+ }>;
7
+ //# sourceMappingURL=update-content-draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-content-draft.d.ts","sourceRoot":"","sources":["../../src/tools/update-content-draft.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,sBAAsB,EAAE,IAqBpC,CAAC;AAEF,wBAAsB,wBAAwB,CAAC,MAAM,EAAE,cAAc;;GAgBpE"}
@@ -0,0 +1,37 @@
1
+ import { update } from '../client.js';
2
+ export const updateContentDraftTool = {
3
+ name: 'microcms_update_content_draft',
4
+ description: 'Update content in microCMS (PUT - full update) as draft. Field type specifications: Image fields require URLs from the same microCMS service (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png"). Multiple image fields use array format. Rich editor fields expect HTML strings. Date fields use ISO 8601 format. Select fields use arrays. Content reference fields use contentId strings or arrays for multiple references.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ endpoint: {
9
+ type: 'string',
10
+ description: 'Content type name (e.g., "blogs", "news")',
11
+ },
12
+ contentId: {
13
+ type: 'string',
14
+ description: 'Content ID to update',
15
+ },
16
+ content: {
17
+ type: 'object',
18
+ description: 'Content data to update (JSON object). Field formats: text="string", richEditor="<h1>HTML</h1>", image="https://images.microcms-assets.io/...", multipleImages=["url1","url2"], date="2020-04-23T14:32:38.163Z", select=["option1","option2"], contentReference="contentId" or ["id1","id2"].',
19
+ },
20
+ },
21
+ required: ['endpoint', 'contentId', 'content'],
22
+ },
23
+ };
24
+ export async function handleUpdateContentDraft(params) {
25
+ const { endpoint, contentId, content } = params;
26
+ if (!contentId) {
27
+ throw new Error('contentId is required');
28
+ }
29
+ if (!content) {
30
+ throw new Error('content is required');
31
+ }
32
+ const updateOptions = {
33
+ isDraft: true, // Always save as draft
34
+ };
35
+ return await update(endpoint, contentId, content, updateOptions);
36
+ }
37
+ //# sourceMappingURL=update-content-draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-content-draft.js","sourceRoot":"","sources":["../../src/tools/update-content-draft.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,CAAC,MAAM,sBAAsB,GAAS;IAC1C,IAAI,EAAE,+BAA+B;IACrC,WAAW,EAAE,kbAAkb;IAC/b,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sBAAsB;aACpC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8RAA8R;aAC5S;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;KAC/C;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,MAAsB;IACnE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEhD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,aAAa,GAA0B;QAC3C,OAAO,EAAE,IAAI,EAAE,uBAAuB;KACvC,CAAC;IAEF,OAAO,MAAM,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACnE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import type { ToolParameters } from '../types.js';
3
+ export declare const updateContentPublishedTool: Tool;
4
+ export declare function handleUpdateContentPublished(params: ToolParameters): Promise<{
5
+ id: string;
6
+ }>;
7
+ //# sourceMappingURL=update-content-published.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-content-published.d.ts","sourceRoot":"","sources":["../../src/tools/update-content-published.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAyB,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,0BAA0B,EAAE,IAqBxC,CAAC;AAEF,wBAAsB,4BAA4B,CAAC,MAAM,EAAE,cAAc;;GAgBxE"}
@@ -0,0 +1,37 @@
1
+ import { update } from '../client.js';
2
+ export const updateContentPublishedTool = {
3
+ name: 'microcms_update_content_published',
4
+ description: 'Update content in microCMS (PUT - full update) and publish it immediately. Field type specifications: Image fields require URLs from the same microCMS service (e.g., "https://images.microcms-assets.io/assets/xxx/yyy/sample.png"). Multiple image fields use array format. Rich editor fields expect HTML strings. Date fields use ISO 8601 format. Select fields use arrays. Content reference fields use contentId strings or arrays for multiple references.',
5
+ inputSchema: {
6
+ type: 'object',
7
+ properties: {
8
+ endpoint: {
9
+ type: 'string',
10
+ description: 'Content type name (e.g., "blogs", "news")',
11
+ },
12
+ contentId: {
13
+ type: 'string',
14
+ description: 'Content ID to update',
15
+ },
16
+ content: {
17
+ type: 'object',
18
+ description: 'Content data to update (JSON object). Field formats: text="string", richEditor="<h1>HTML</h1>", image="https://images.microcms-assets.io/...", multipleImages=["url1","url2"], date="2020-04-23T14:32:38.163Z", select=["option1","option2"], contentReference="contentId" or ["id1","id2"].',
19
+ },
20
+ },
21
+ required: ['endpoint', 'contentId', 'content'],
22
+ },
23
+ };
24
+ export async function handleUpdateContentPublished(params) {
25
+ const { endpoint, contentId, content } = params;
26
+ if (!contentId) {
27
+ throw new Error('contentId is required');
28
+ }
29
+ if (!content) {
30
+ throw new Error('content is required');
31
+ }
32
+ const updateOptions = {
33
+ isDraft: false, // Always publish
34
+ };
35
+ return await update(endpoint, contentId, content, updateOptions);
36
+ }
37
+ //# sourceMappingURL=update-content-published.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-content-published.js","sourceRoot":"","sources":["../../src/tools/update-content-published.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,MAAM,CAAC,MAAM,0BAA0B,GAAS;IAC9C,IAAI,EAAE,mCAAmC;IACzC,WAAW,EAAE,ocAAoc;IACjd,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,2CAA2C;aACzD;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sBAAsB;aACpC;YACD,OAAO,EAAE;gBACP,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8RAA8R;aAC5S;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,SAAS,CAAC;KAC/C;CACF,CAAC;AAEF,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAAC,MAAsB;IACvE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEhD,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,uBAAuB,CAAC,CAAC;IAC3C,CAAC;IAED,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,aAAa,GAA0B;QAC3C,OAAO,EAAE,KAAK,EAAE,iBAAiB;KAClC,CAAC;IAEF,OAAO,MAAM,MAAM,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;AACnE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"upload-media.d.ts","sourceRoot":"","sources":["../../src/tools/upload-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,IAgC7B,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB;;GAwClE"}
1
+ {"version":3,"file":"upload-media.d.ts","sourceRoot":"","sources":["../../src/tools/upload-media.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,eAAO,MAAM,eAAe,EAAE,IAwB7B,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,mBAAmB;;GAwClE"}
@@ -22,14 +22,6 @@ export const uploadMediaTool = {
22
22
  description: 'External URL of the file to upload (alternative to fileData)',
23
23
  },
24
24
  },
25
- anyOf: [
26
- {
27
- required: ['fileData', 'fileName', 'mimeType']
28
- },
29
- {
30
- required: ['externalUrl']
31
- }
32
- ],
33
25
  },
34
26
  };
35
27
  export async function handleUploadMedia(params) {
@@ -1 +1 @@
1
- {"version":3,"file":"upload-media.js","sourceRoot":"","sources":["../../src/tools/upload-media.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE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ACH,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "microcms-mcp-server",
3
- "version": "0.3.0",
4
- "description": "microCMS MCP Server - A Model Context Protocol server for microCMS API",
3
+ "version": "0.3.6",
4
+ "description": "microCMS MCP Server - microCMSのコンテンツAPIやマネジメントAPIを利用し、LLMからコンテンツ管理ができるMCPサーバー",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
7
7
  "bin": {
@@ -11,8 +11,7 @@
11
11
  "dist/",
12
12
  "bin/",
13
13
  "README.md",
14
- "LICENSE",
15
- "mcp-config-sample.json"
14
+ "LICENSE"
16
15
  ],
17
16
  "scripts": {
18
17
  "build": "tsc",
@@ -35,17 +34,17 @@
35
34
  "cli"
36
35
  ],
37
36
  "author": {
38
- "name": "himaratsu",
39
- "url": "https://github.com/himaratsu"
37
+ "name": "microcmsio",
38
+ "url": "https://github.com/microcmsio"
40
39
  },
41
40
  "repository": {
42
41
  "type": "git",
43
- "url": "git+https://github.com/himaratsu/microcms-mcp-server.git"
42
+ "url": "git+https://github.com/microcmsio/microcms-mcp-server.git"
44
43
  },
45
44
  "bugs": {
46
- "url": "https://github.com/himaratsu/microcms-mcp-server/issues"
45
+ "url": "https://github.com/microcmsio/microcms-mcp-server/issues"
47
46
  },
48
- "homepage": "https://github.com/himaratsu/microcms-mcp-server#readme",
47
+ "homepage": "https://github.com/microcmsio/microcms-mcp-server#readme",
49
48
  "license": "MIT",
50
49
  "dependencies": {
51
50
  "@modelcontextprotocol/sdk": "^1.0.0",
@@ -65,4 +64,4 @@
65
64
  "publishConfig": {
66
65
  "access": "public"
67
66
  }
68
- }
67
+ }
@@ -1,13 +0,0 @@
1
- {
2
- "mcpServers": {
3
- "microcms-args": {
4
- "comment": "Using command line arguments",
5
- "command": "node",
6
- "args": [
7
- "/path/to/microcms-mcp-server/dist/index.js",
8
- "--service-id", "your-service-id",
9
- "--api-key", "your-api-key"
10
- ]
11
- }
12
- }
13
- }