MCP cover image
See in Github
2025-03-30

1

Github Watches

0

Github Forks

0

Github Stars

Docker 설정 가이드 - CRM MCP 서버

이 가이드는 Model Context Protocol (MCP) 서버를 Docker 이미지로 빌드하고 배포하는 방법을 설명합니다.

1. 프로젝트 개요

이 프로젝트는 Spring AI를 사용하여 MCP 서버를 구현하였으며, 주요 기능은 다음과 같습니다:

  • CRM 캠페인 생성
  • 타겟팅 룰 설정
  • 이메일 콘텐츠 생성
  • 캠페인 스케줄 설정

2. Docker 설정 내용

Dockerfile 설명

# Simple Dockerfile for MCP Server that uses local JAR file
FROM eclipse-temurin:17-jre-jammy

WORKDIR /app

# Set timezone
ENV TZ=Asia/Seoul
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# Copy the JAR file from local build
COPY build/libs/mcpserver-0.0.1-SNAPSHOT.jar app.jar

# Configure to use standard input/output
ENTRYPOINT ["java", "-Xms512m", "-Xmx1g", "-jar", "app.jar"]

이 Dockerfile은:

  1. JDK 17 기반 경량 이미지를 사용합니다.
  2. 타임존을 한국(Asia/Seoul)으로 설정합니다.
  3. 로컬에서 빌드된 JAR 파일을 이미지에 복사합니다.
  4. 표준 입출력(STDIO)을 사용하도록 설정되었습니다.

3. 빌드 및 배포 방법

준비사항

  1. Docker Desktop이 설치되어 있어야 합니다.
  2. Docker Hub 계정이 필요합니다 (yoonbeopgong 계정 사용).
  3. Docker Hub에 로그인되어 있어야 합니다:
    docker login
    

Linux/Mac에서 빌드 및 배포

다음 명령어를 실행하여 이미지를 빌드하고 Docker Hub에 푸시합니다:

chmod +x build_and_push.sh
./build_and_push.sh

Windows에서 빌드 및 배포

다음 명령어를 실행합니다:

build_and_push.bat

4. 사용 방법

MCP 서버를 실행하기 위해 다음 명령어를 사용합니다:

docker run -i --rm yoonbeopgong/crm-mcp-server

설정 파일에서 사용하는 방법

JSON 설정에서 다음과 같이 MCP 서버를 참조합니다:

{
  "mcpServers": {
    "crmMcpServer": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "yoonbeopgong/crm-mcp-server"
      ],
      "env": {}
    }
  }
}

5. 테스트

이미지 테스트

다음 스크립트를 실행하여 Docker 이미지가 제대로 작동하는지 테스트할 수 있습니다:

Linux/Mac:

chmod +x test-docker.sh
./test-docker.sh

Windows:

test-docker.bat

6. 주의사항 및 팁

  1. Docker 이미지는 JAR 파일만 포함하므로 매우 가벼운 편입니다.
  2. 표준 입출력 방식이므로 별도 포트를 노출하지 않습니다.
  3. Docker Hub에 푸시하려면 반드시 로그인되어 있어야 합니다.
  4. 이 설정은 development/testing 환경을 위한 것이며, production 환경에서는 추가 보안 설정이 필요할 수 있습니다.

7. 문제 해결

Docker 빌드 실패 시

  1. JDK 버전 확인: 프로젝트가 Java 17로 설정되어 있는지 확인하세요.
  2. Gradle 빌드 확인: ./gradlew build를 실행하여 JAR 파일이 생성되는지 확인하세요.
  3. Docker 로그 확인: docker build -t yoonbeopgong/crm-mcp-server . --no-cache를 실행하여 캐시 없이 빌드 시도해보세요.

컨테이너 실행 실패 시

  1. 로그 확인: docker logs [container_id]로 로그를 확인하세요.
  2. JAR 파일 존재 확인: Dockerfile이 올바른 경로의 JAR 파일을 참조하는지 확인하세요.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • Contraband Interactive
  • Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.

  • rustassistant.com
  • Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • lumpenspace
  • Take an adjectivised noun, and create images making it progressively more adjective!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • modelcontextprotocol
  • 模型上下文协议服务器

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • n8n-io
  • 具有本机AI功能的公平代码工作流程自动化平台。将视觉构建与自定义代码,自宿主或云相结合,400+集成。

    Reviews

    3 (1)
    Avatar
    user_uAglByI4
    2025-04-18

    I have been using crm-mcp-server by pamaybg and it has transformed our customer relationship management. The integration was seamless, and the features cater perfectly to our needs. Highly recommended for any business looking to optimize their CRM processes! Check it out at their GitHub page!