Skip to content

L33gn21/mcp-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

4 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

1. Python ๊ตฌํ˜„

Python์œผ๋กœ ๊ตฌํ˜„๋œ MCP ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

Python OpenAI API ํ‚ค ์„ค์ •

  • OpenAI API ํ‚ค ์„ค์ •์ด ํ•„์š”ํ•ฉ๋‹ˆ๋‹ค. (_mcp_client.py์—์„œ ์„ค์ •)

Python MCP ์„œ๋ฒ„ ์„ค์ •

mcp.json:

{
    "mcpServers": {
      "mcp-test": {
        "command": "{python_path}",
        "args": ["{_mcp_server.py path (relative path allowed)}"]
      }
    }
}

Python ๋ฒ„์ „ ์‹คํ–‰ํ•˜๊ธฐ

  • Python 3.x
  1. Python ์˜์กด์„ฑ ์„ค์น˜:
pip install -r requirements.txt
  1. MCP Client ์‹คํ–‰:
python _mcp_client.py
  1. ์›น ๋ธŒ๋ผ์šฐ์ €์—์„œ http://localhost:8000 ์ ‘์†

2. Spring ๊ตฌํ˜„

Spring AI๋ฅผ ์‚ฌ์šฉํ•œ MCP ์˜ˆ์ œ์ž…๋‹ˆ๋‹ค.

Spring MCP ์„ค์ •

Spring AI์˜ Starter ํ†ตํ•ด ๊ตฌ์„ฑ๋˜๋ฉฐ application.properties์—์„œ ์ปค์Šคํ„ฐ๋งˆ์ด์ง• ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค.

Spring OpenAI API ํ‚ค ์„ค์ •

  • OpenAI API ํ‚ค ์„ค์ • (application.properties์—์„œ)

Spring ๋ฒ„์ „ ์‹คํ–‰ํ•˜๊ธฐ

  1. Java 21 ์„ค์น˜

  2. ํ”„๋กœ์ ํŠธ ๋นŒ๋“œ ๋ฐ ์‹คํ–‰:

./gradlew bootRun
  1. ์›น ๋ธŒ๋ผ์šฐ์ €์—์„œ http://localhost:8080 ์ ‘์†

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors