Docker 설정 가이드 - CRM MCP 서버

Docker 설정 가이드 - CRM MCP 서버

pamaybg

Developer Tools
Visit Server

README

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 파일을 참조하는지 확인하세요.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python