Skip to main content
Glama

Strapi MCP Server

스트라피 MCP

Strapi CMS용 MCP 서버로, 모델 컨텍스트 프로토콜을 통해 콘텐츠 유형 및 항목에 대한 액세스를 제공합니다.

개요

이 MCP 서버는 모든 Strapi CMS 인스턴스와 통합되어 다음을 제공합니다.

  • Strapi 콘텐츠 유형에 대한 리소스 액세스
  • Strapi에서 콘텐츠 유형을 만들고 업데이트하는 도구
  • 콘텐츠 항목 관리 도구(생성, 읽기, 업데이트, 삭제)
  • 개발 모드에서 Strapi 지원

설정

환경 변수

자격 증명을 저장하려면 프로젝트 루트에 .env 파일을 사용하는 것이 좋습니다.

  • STRAPI_URL : Strapi 인스턴스의 URL(기본값: http://localhost:1337 )
  • STRAPI_ADMIN_EMAIL : Strapi 관리자 사용자의 이메일 주소입니다(전체 기능, 특히 스키마 액세스를 위해 권장됨).
  • STRAPI_ADMIN_PASSWORD : Strapi 관리자 사용자의 비밀번호입니다(권장).
  • STRAPI_API_TOKEN : (선택적 대체) API 토큰입니다. 관리자 자격 증명이 제공되지 않은 경우 사용할 수 있지만 권한이 제한될 수 있습니다.
  • STRAPI_DEV_MODE : 개발 모드 기능을 활성화하려면 "true" 로 설정합니다(기본값은 false ).

.env 파일 예시:

지엑스피1

중요: 자격 증명을 커밋하지 않으려면 .gitignore 파일에 .env 추가하세요.

설치

npm install strapi-mcp

달리기

권장 방법( .env 파일 사용):

프로젝트를 빌드했는지 확인하세요( npm run build ). 그런 다음 Node.js v20.6.0+에서 --env-file 플래그를 사용하여 서버를 실행하세요.

node --env-file=.env build/index.js

대안(환경 변수를 직접 사용):

export STRAPI_URL=http://localhost:1337 export STRAPI_ADMIN_EMAIL=your_admin_email@example.com export STRAPI_ADMIN_PASSWORD=your_admin_password # export STRAPI_API_TOKEN=your-api-token # Optional fallback export STRAPI_DEV_MODE=true # optional # Run the globally installed package (if installed via npm install -g) strapi-mcp # Or run the local build directly node build/index.js

특징

  • 콘텐츠 유형 나열 및 읽기
  • 항목 가져오기, 생성, 업데이트 및 삭제
  • 미디어 파일 업로드
  • 관계 연결 및 연결 해제
  • 콘텐츠 유형 스키마 가져오기

변경 사항

0.1.6

  • create_content_type 도구가 추가되었습니다. Content-Type Builder API를 통해 새로운 콘텐츠 유형을 만들 수 있습니다(관리자 자격 증명이 필요함).
  • 우선순위가 지정된 관리자 자격 증명: 콘텐츠 유형 및 스키마를 가져올 때 관리자 이메일/비밀번호를 선호하도록 로직을 업데이트하여 안정성을 향상했습니다.
  • 업데이트된 문서: 인증 방법과 권장 실행 절차가 명확해졌습니다.

0.1.5

  • 다양한 대체 방법을 통해 향상된 콘텐츠 유형 검색
  • 더욱 강력한 오류 처리 및 로깅이 추가되었습니다.
  • 콘텐츠 유형에 대한 향상된 스키마 추론

0.1.4

  • 더욱 구체적인 오류 코드로 오류 처리가 개선되었습니다.
  • ResourceNotFoundAccessDenied 오류 코드가 추가되었습니다.
  • 일반적인 API 오류에 대한 더 나은 오류 메시지

0.1.3

  • 최초 공개

특허

MIT

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_content_type_schema - 특정 콘텐츠 유형에 대한 스키마(필드, 유형, 관계)를 가져옵니다.
  • connect_relation - 관련 항목을 항목의 관계 필드에 연결합니다.
  • disconnect_relation - 항목의 관계 필드에서 관련 항목의 연결을 끊습니다.
  • create_content_type - Content-Type Builder API를 사용하여 새로운 콘텐츠 유형을 만듭니다(관리자 권한 필요).

고급 기능

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

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

{ "contentType": "api::article.article", "filters": { "title": { "$contains": "hello" } }, "pagination": { "page": 1, "pageSize": 10 }, "sort": ["title:asc", "createdAt:desc"], "populate": ["author", "categories"] }
리소스 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_ADMIN_EMAILSTRAPI_ADMIN_PASSWORD (권장): Strapi 관리자의 자격 증명입니다. 콘텐츠 유형 스키마 가져오기와 같은 모든 기능에 필요합니다.
  • STRAPI_API_TOKEN (선택적 대체): Strapi API 토큰입니다. 관리자 권한이 제공되지 않은 경우에도 사용할 수 있지만, 토큰 권한에 따라 기능이 제한될 수 있습니다.
  • STRAPI_DEV_MODE (선택 사항): 개발 모드 기능을 활성화하려면 "true"로 설정합니다(기본값은 false).

인증 우선 순위

서버는 다음 순서로 인증 방법을 우선시합니다.

  1. 관리자 이메일 및 비밀번호( STRAPI_ADMIN_EMAIL , STRAPI_ADMIN_PASSWORD )
  2. API 토큰( STRAPI_API_TOKEN )

가장 좋은 결과를 얻으려면 관리자 자격 증명을 사용하는 것이 좋습니다.

Strapi 자격증 취득

  • 관리자 자격 증명: 기존 슈퍼 관리자의 이메일과 비밀번호를 사용하거나 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" } )

관계 연결

use_mcp_tool( server_name: "strapi-mcp", tool_name: "connect_relation", arguments: { "contentType": "api::article.article", "id": "1", "relationField": "authors", "relatedIds": [2, 3] } )

관계 단절

use_mcp_tool( server_name: "strapi-mcp", tool_name: "disconnect_relation", arguments: { "contentType": "api::article.article", "id": "1", "relationField": "authors", "relatedIds": [3] } )

콘텐츠 유형 만들기

use_mcp_tool( server_name: "strapi-mcp-local", tool_name: "create_content_type", arguments: { "displayName": "My New Product", "singularName": "product", "pluralName": "products", "kind": "collectionType", "description": "Represents products in the store", "draftAndPublish": true, "attributes": { "name": { "type": "string", "required": true }, "description": { "type": "text" }, "price": { "type": "decimal", "required": true }, "stock": { "type": "integer" } } } )

콘텐츠 유형 업데이트

use_mcp_tool( server_name: "strapi-mcp-local", tool_name: "update_content_type", arguments: { "contentType": "api::speaker.speaker", "attributes": { "isHighlightSpeaker": { "type": "boolean", "default": false }, "newTextField": { "type": "string" } } } )

리소스 액세스

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

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

  1. 개요
    1. 설정
      1. 환경 변수
      2. 설치
      3. 달리기
    2. 특징
      1. 변경 사항
        1. 0.1.6
        2. 0.1.5
        3. 0.1.4
        4. 0.1.3
      2. 특허
        1. strapi-mcp MCP 서버
          1. 특징
          2. 개발
          3. 설치
          4. 사용 예

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that enables AI assistants to interact with Strapi CMS instances through a standardized interface, supporting content types and REST API operations.
          Last updated -
          5
          65
          20
          JavaScript
          MIT License
          • Apple
        • -
          security
          A
          license
          -
          quality
          An MCP server that allows accessing and managing ledger files through Claude by providing account listing, balance checking, and transaction register viewing capabilities.
          Last updated -
          1
          Python
          GPL 3.0
          • Apple
        • A
          security
          A
          license
          A
          quality
          An MCP server that enables Claude to interact with Twitter, allowing for posting tweets and searching Twitter content.
          Last updated -
          2
          108
          195
          TypeScript
          MIT License
          • Apple
        • A
          security
          F
          license
          A
          quality
          An MCP server that integrates Claude with Anki flashcards, allowing users to review due cards and create new flashcards directly through conversation.
          Last updated -
          6
          8
          Python
          • Apple

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/l33tdawg/strapi-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server