Strapi MCP Server

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Integrates with Strapi CMS to provide access to content types and entries through the MCP protocol, allowing creation, reading, updating, and deletion of content entries, as well as media uploads

strapi-mcp MCP 서버

Strapi CMS용 MCP 서버

Strapi CMS와 통합된 TypeScript 기반 MCP 서버입니다. MCP 프로토콜을 통해 Strapi 콘텐츠 유형 및 항목에 액세스할 수 있도록 하여 다음과 같은 작업을 수행할 수 있습니다.

  • Strapi 콘텐츠 유형을 리소스로 액세스
  • 콘텐츠 항목을 만들고, 읽고, 업데이트하고, 삭제합니다.
  • MCP 도구를 통해 Strapi 콘텐츠를 관리하세요

특징

자원

  • strapi://content-type/ URI를 통해 콘텐츠 유형을 나열하고 액세스합니다.
  • 각 콘텐츠 유형은 해당 항목을 JSON으로 노출합니다.
  • 구조화된 콘텐츠 액세스를 위한 애플리케이션/JSON MIME 유형

도구

  • list_content_types - Strapi에서 사용 가능한 모든 콘텐츠 유형을 나열합니다.
  • get_entries - 선택적 필터링, 페이지 매김, 정렬 및 관계 채우기를 통해 특정 콘텐츠 유형에 대한 항목을 가져옵니다.
  • get_entry - ID로 특정 항목 가져오기
  • create_entry - 콘텐츠 유형에 대한 새 항목을 만듭니다.
  • update_entry - 기존 항목 업데이트
  • delete_entry - 항목 삭제
  • upload_media - Strapi에 미디어 파일 업로드

고급 기능

필터링, 페이지 매김 및 정렬

get_entries 도구는 고급 쿼리 옵션을 지원합니다.

지엑스피1

리소스 URI

리소스는 다양한 URI 형식으로 액세스할 수 있습니다.

  • strapi://content-type/api::article.article - 모든 기사 가져오기
  • strapi://content-type/api::article.article/1 - ID 1인 기사 가져오기
  • strapi://content-type/api::article.article?filters={"title":{"$contains":"hello"}} - 필터링된 기사 가져오기

개발

종속성 설치:

npm install

서버를 빌드하세요:

npm run build

자동 재빌드를 사용한 개발의 경우:

npm run watch

설치

이 MCP 서버를 배포하고 테스트하는 방법에 대한 자세한 단계별 지침은 DEPLOYMENT.md 파일을 참조하세요.

빠른 설정:

  1. 서버 빌드: npm run build
  2. Strapi 인스턴스를 구성하고 API 토큰을 받으세요
  3. Claude Desktop에 서버 구성을 추가합니다.

MacOS의 경우: ~/Library/Application Support/Claude/claude_desktop_config.json Windows의 경우: %APPDATA%/Claude/claude_desktop_config.json

{ "mcpServers": { "strapi-mcp": { "command": "/path/to/strapi-mcp/build/index.js", "env": { "STRAPI_URL": "http://localhost:1337", "STRAPI_API_TOKEN": "your-api-token-here", "STRAPI_DEV_MODE": "false" } } } }

환경 변수

  • STRAPI_URL (선택 사항): Strapi 인스턴스의 URL(기본값은 http://localhost:1337 )
  • STRAPI_API_TOKEN (필수): 인증을 위한 Strapi API 토큰
  • STRAPI_DEV_MODE (선택 사항): 개발 모드 기능을 활성화하려면 "true"로 설정합니다(기본값은 false).

Strapi API 토큰 받기

  1. Strapi 관리자 패널에 로그인하세요
  2. 설정 > API 토큰으로 이동하세요.
  3. "새 API 토큰 만들기"를 클릭하세요.
  4. 이름, 설명 및 토큰 유형(가급적 "전체 액세스")을 설정합니다.
  5. 생성된 토큰을 복사하여 MCP 서버 구성에 사용하세요.

디버깅

MCP 서버는 stdio를 통해 통신하므로 디버깅이 어려울 수 있습니다. 패키지 스크립트로 제공되는 MCP Inspector를 사용하는 것이 좋습니다.

npm run inspector

검사기는 브라우저에서 디버깅 도구에 액세스할 수 있는 URL을 제공합니다.

사용 예

MCP 서버를 구성하고 실행하면 Claude와 함께 사용하여 Strapi CMS와 상호 작용할 수 있습니다. 몇 가지 예를 들면 다음과 같습니다.

콘텐츠 유형 목록

use_mcp_tool( server_name: "strapi-mcp", tool_name: "list_content_types", arguments: {} )

항목 가져오기

use_mcp_tool( server_name: "strapi-mcp", tool_name: "get_entries", arguments: { "contentType": "api::article.article", "filters": { "title": { "$contains": "hello" } }, "pagination": { "page": 1, "pageSize": 10 }, "sort": ["title:asc"] } )

항목 만들기

use_mcp_tool( server_name: "strapi-mcp", tool_name: "create_entry", arguments: { "contentType": "api::article.article", "data": { "title": "My New Article", "content": "This is the content of my article.", "publishedAt": "2023-01-01T00:00:00.000Z" } } )

미디어 업로드

use_mcp_tool( server_name: "strapi-mcp", tool_name: "upload_media", arguments: { "fileData": "base64-encoded-data-here", "fileName": "image.jpg", "fileType": "image/jpeg" } )

리소스 액세스

access_mcp_resource( server_name: "strapi-mcp", uri: "strapi://content-type/api::article.article" )
-
security - not tested
F
license - not found
-
quality - not tested

MCP 프로토콜을 통해 Strapi CMS 콘텐츠에 대한 액세스를 제공하여 사용자가 Claude를 통해 콘텐츠 항목을 만들고, 읽고, 업데이트하고, 삭제할 수 있도록 합니다.

  1. Features
    1. Resources
    2. Tools
    3. Advanced Features
  2. Development
    1. Installation
      1. Environment Variables
      2. Getting a Strapi API Token
      3. Debugging
    2. Usage Examples
      1. Listing Content Types
      2. Getting Entries
      3. Creating an Entry
      4. Uploading Media
      5. Accessing Resources
    ID: wrmh0bzzkr