MCP-SERVER-TEST-1

sangyeons57/MCP-SERVER-TEST-1

3.1

If you are the rightful owner of MCP-SERVER-TEST-1 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.

This project implements a simple calculator server using the Model Context Protocol (MCP), providing basic mathematical operations integrated with Cursor IDE.

MCP ๊ณ„์‚ฐ๊ธฐ ์„œ๋ฒ„

์ด ํ”„๋กœ์ ํŠธ๋Š” Model Context Protocol(MCP)์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฐ„๋‹จํ•œ ๊ณ„์‚ฐ๊ธฐ ์„œ๋ฒ„๋ฅผ ๊ตฌํ˜„ํ•ฉ๋‹ˆ๋‹ค. Cursor IDE์™€ ์—ฐ๋™ํ•˜์—ฌ ๊ธฐ๋ณธ์ ์ธ ์ˆ˜ํ•™ ๊ณ„์‚ฐ ๊ธฐ๋Šฅ์„ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค.

๊ธฐ๋Šฅ

  • ๊ธฐ๋ณธ ์‚ฐ์ˆ  ์—ฐ์‚ฐ:
    • ๋”ํ•˜๊ธฐ (add)
    • ๋นผ๊ธฐ (subtract)
    • ๊ณฑํ•˜๊ธฐ (multiply)
    • ๋‚˜๋ˆ„๊ธฐ (divide)
    • ๊ฑฐ๋“ญ์ œ๊ณฑ (power)
  • Docker ์ปจํ…Œ์ด๋„ˆ๋ฅผ ํ†ตํ•œ ๊ฐ„ํŽธํ•œ ๋ฐฐํฌ
  • Cursor IDE์™€ ์—ฐ๋™

์„ค์น˜ ๋ฐ ์‹คํ–‰ ๋ฐฉ๋ฒ•

์‚ฌ์ „ ์š”๊ตฌ์‚ฌํ•ญ

  • Docker ๋ฐ Docker Compose ์„ค์น˜
  • Cursor IDE

๋กœ์ปฌ์—์„œ ์‹คํ–‰ํ•˜๊ธฐ

  1. ์ €์žฅ์†Œ ํด๋ก :

    git clone https://github.com/์‚ฌ์šฉ์ž๋ช…/mcp-calculator.git
    cd mcp-calculator
    
  2. Docker ์ปจํ…Œ์ด๋„ˆ ๋นŒ๋“œ ๋ฐ ์‹คํ–‰:

    docker-compose up --build -d
    
  3. ํ™•์ธ:

    curl -v http://localhost:8001/sse
    

    ์ •์ƒ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋ฉด 200 OK์™€ ํ•จ๊ป˜ SSE ์ŠคํŠธ๋ฆผ์ด ์‹œ์ž‘๋ฉ๋‹ˆ๋‹ค.

Cursor IDE์™€ ์—ฐ๊ฒฐํ•˜๊ธฐ

  1. Cursor IDE๋ฅผ ์‹คํ–‰ํ•ฉ๋‹ˆ๋‹ค.
  2. ๋ช…๋ น ํŒ”๋ ˆํŠธ(Windows/Linux: Ctrl+Shift+P, Mac: Cmd+Shift+P)์—์„œ Cursor Settings๋ฅผ ๊ฒ€์ƒ‰ํ•ฉ๋‹ˆ๋‹ค.
  3. ์„ค์ •์—์„œ MCP ์„น์…˜์œผ๋กœ ์ด๋™ํ•ฉ๋‹ˆ๋‹ค.
  4. Add Custom MCP Server๋ฅผ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  5. MCP ์„œ๋ฒ„ URL๋กœ http://localhost:8001/sse๋ฅผ ์ž…๋ ฅํ•ฉ๋‹ˆ๋‹ค.
  6. ์ด๋ฆ„์„ CalculatorMCP๋กœ ์ง€์ •ํ•ฉ๋‹ˆ๋‹ค.
  7. Cursor๋ฅผ ์žฌ์‹œ์ž‘ํ•ฉ๋‹ˆ๋‹ค.

์‚ฌ์šฉ ์˜ˆ์‹œ

Cursor์—์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:

@CalculatorMCP add 123 and 456
@CalculatorMCP multiply 78 by 9
@CalculatorMCP 5 to the power of 3

GitHub์—์„œ ํ”„๋กœ์ ํŠธ ํฌํฌํ•˜๊ธฐ

  1. GitHub ์ €์žฅ์†Œ ํŽ˜์ด์ง€์—์„œ "Fork" ๋ฒ„ํŠผ์„ ํด๋ฆญํ•ฉ๋‹ˆ๋‹ค.
  2. ํฌํฌ๋œ ์ €์žฅ์†Œ๋ฅผ ๋กœ์ปฌ์— ํด๋ก ํ•ฉ๋‹ˆ๋‹ค.
  3. ํ•„์š”ํ•œ ๊ฒฝ์šฐ ์ฝ”๋“œ๋ฅผ ์ˆ˜์ •ํ•ฉ๋‹ˆ๋‹ค.
  4. ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์ปค๋ฐ‹ํ•˜๊ณ  ํ‘ธ์‹œํ•ฉ๋‹ˆ๋‹ค.

๋ผ์ด์„ผ์Šค

MIT

๊ธฐ์—ฌํ•˜๊ธฐ

Pull Request๋Š” ์–ธ์ œ๋“ ์ง€ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค!