Sponsored by Deepsite.site

실행과정

Created By
Armdiri8 months ago
Content

MCP 서버 구축기

계획

사무자동화를 위한 방법

  • 매일 오전 출근을 하게 되면 나의 스케쥴을 체크 한다.
  • 하루의 날씨를 체크해서 알려준다.
  • 메일에서 회신을 해야 하는 메일이 필요하다면 목록을 알려준다.
  • 협업툴 지라에서 나에게 할당된 티켓중에서 아직 완료되지 않은 티켓을 나열한다.

실행과정

# uv 설치 
brew install uv

uv init [mcp-server-name] --python 3.12 #원하는 버전 
cd [mcp-server-name]
uv venv #.venv 가상환경 설치 
source .venv/bin/activate
uv add "mcp[cli]"

# toml 파일 설치 (패키지)
cat pyproject.toml

# server.py 파일 만들기 
touch server.py

# cursor open
brew install --cask cursor
cursor .

## cursor app command execure 
cursor app -> cmd + shift + p -> Shell Command : Install 'cursor' command

# cursor docs add 
Cursor Setting -> Features -> Docs > +Add new doc 클릭 -> 
MCP https://modelcontextprotocol.io/
MCP llm.txt ( https://modelcontextprotocol.io/llms-full.txt )
MCP Python SDK ( https://github.com/modelcontextprotocol/python-sdk )

#cursor Rules
https://cursor.directory/fastapi-python-microservices-serverless-cursor-rules
-> npx copied (npx cursor-directory rules add fastapi-python-microservices-serverless-cursor-rules)
-> Terminal execute

## 자체실행 
mcp dev server.py
mcp install server.py (실행이후 에이전트 cursor, claude 확인 가능 )

Docker (서버로써 구독할때 사용)

# 이미지 빌드 및 컨테이너 시작 및 백그라운드
$ docker compose up -d --build

# 로그 확인 (백그라운드 실행 시)
$ docker compose logs -f

# 서버 중지
$ docker compose down

# 동시 실행
$ docker compose down & docker compose up -d --build & docker compose logs -f

structlog

uv pip install structlog

UNIT TEST

uv pip install python-dotenv
uv pip install pytest requests

# 개별로 테스트 실행 할때 
pytest test/test_github_tool.py
# 모든 테스트 실행
pytest -v -s
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
DeepChatYour AI Partner on Desktop
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Playwright McpPlaywright MCP server
ChatWiseThe second fastest AI chatbot™
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Tavily Mcp
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.