BasicMCP_3Types_Ex

pmj-chosim/BasicMCP_3Types_Ex

3.1

If you are the rightful owner of BasicMCP_3Types_Ex and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Model Context Protocol (MCP) server is a framework designed to facilitate communication between AI models and applications, enabling seamless integration and interaction.

๋ชฉํ‘œ: Java ๊ธฐ๋ฐ˜ MCP ์„œ๋ฒ„, MCP ํ˜ธ์ŠคํŠธ์™€ ์—ฐ๊ฒฐ๋œ ํด๋ผ์ด์–ธํŠธ ๊ตฌ์ถ•

  • MCP ํ˜ธ์ŠคํŠธ: ์ƒ์„ฑํ˜• AI ๋ชจ๋ธ

    • GitHub์—์„œ ์ œ๊ณตํ•˜๋Š” ๋ฌด๋ฃŒ GPT 4o mini ๋ชจ๋ธ
  • MCP ํด๋ผ์ด์–ธํŠธ: ์ƒ์„ฑํ˜• AI ๋ชจ๋ธ <-> MCP ์„œ๋ฒ„

    • LangChain4j(SDK)๋ฅผ ์‚ฌ์šฉํ•ด MCP ํ˜ธ์ŠคํŠธ(GPT-4o) API์™€ MCP ์„œ๋ฒ„(์ง€์‹/์•ก์…˜ ๋„๊ตฌ) API ํ˜ธ์ถœ.
    • Spring Boot(Java 21) ๊ธฐ๋ฐ˜ ์•ฑ
  • MCP ์„œ๋ฒ„: ์ง€์‹/์•ก์…˜ ๋„๊ตฌ

    • ๊ณ„์‚ฐ๊ธฐ ๊ธฐ๋Šฅ(์•ก์…˜)์„ ๊ฐ€์ง„ SpringBoot(Java 21) ๊ธฐ๋ฐ˜ ์•ฑ

0. ์‚ฌ์ „ ์ค€๋น„

  • Docker or Docker Desktop
  • npx(npm)

1. MCP ์„œ๋ฒ„

cd calculator-server
docker build -t mcp-server .
docker run -p 8080:8080 --name calculator-container mcp-server
npx @modelcontextprotocol/inspector

2. MCP ํ˜ธ์ŠคํŠธ์„œ๋ฒ„ API ์ •๋ณด ๊ฐ€์ ธ์˜ค๊ธฐ

3. MCP ํด๋ผ์ด์–ธํŠธ

cd client

#example: docker build --build-arg GITHUB_TOKEN=sdsdsd1234  -t client .
docker build --build-arg GITHUB_TOKEN=your-token  -t client .

#example: docker run -e GITHUB_TOKEN=sdsdsd1234 -p 8081:8080 --name client client
docker run -e GITHUB_TOKEN=your-token -p 8081:8080 --name client client