|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
1 | 5 | # Strapi MCP Server Development Guide |
2 | 6 |
|
3 | | -## Build Commands |
4 | | -- `npm run build` - Build the project |
5 | | -- `npm run build:watch` - Build with watch mode |
6 | | -- `npm run start` - Start the server from build |
7 | | -- `npm run dev` - Run with ts-node |
8 | | -- `npm run dev:watch` - Run with nodemon watch mode |
9 | | -- `npm run prepublishOnly` - Prepare for publishing |
| 7 | +## Development Commands |
| 8 | +- `npm run build` - Compile TypeScript to build/ directory and make executable |
| 9 | +- `npm run build:watch` - Build with watch mode for development |
| 10 | +- `npm run start` - Start the compiled server from build/index.js |
| 11 | +- `npm run dev` - Run directly with ts-node for development |
| 12 | +- `npm run dev:watch` - Run with nodemon for hot reload during development |
| 13 | +- `npm run prepublishOnly` - Prepare for publishing (runs build automatically) |
| 14 | + |
| 15 | +## Testing |
| 16 | +- No formal test suite exists; test manually using MCP client |
| 17 | +- Use Claude Desktop or other MCP clients for integration testing |
| 18 | +- Configuration testing: create test config in `~/.mcp/strapi-mcp-server.config.json` |
10 | 19 |
|
11 | 20 | ## Code Style Guidelines |
12 | 21 | - **TypeScript**: Use strict mode with ES2022 target |
|
20 | 29 | - **Formatting**: 2-space indentation, semicolons required |
21 | 30 |
|
22 | 31 | ## Project Architecture |
| 32 | +- Single TypeScript file (`src/index.ts`) implements the entire MCP server |
| 33 | +- Built on @modelcontextprotocol/sdk with stdio transport for CLI usage |
| 34 | +- Configuration loaded from `~/.mcp/strapi-mcp-server.config.json` |
23 | 35 | - Server implements Model Context Protocol (MCP) for Strapi CMS |
24 | 36 | - Serves as middleware between AI assistants and Strapi instances |
25 | 37 | - Handles schema introspection, REST operations, media uploads |
26 | | -- Version 2.2.0 focuses on security and version compatibility |
| 38 | +- Current version focuses on security and version compatibility |
27 | 39 | - Supports both Strapi v4 and v5 with automatic version detection |
28 | 40 |
|
29 | 41 | ## Key Features |
|
0 commit comments