Simple MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Simple MCP Serversay hello to Alice"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
간단한 MCP 서버 PyCharm 프로젝트
이 프로젝트는 MCP 서버 구축의 핵심인 Tool, Resource, Prompt를 한 파일에서 실습하는 간단한 예제입니다.
1. 제공 기능
Tool
이름 | 설명 |
| 이름을 받아 인사말을 반환합니다. |
| 두 숫자를 더합니다. |
| 서버 컴퓨터의 현재 시간을 반환합니다. |
Resource
URI | 설명 |
|
|
| 입력한 이름으로 예제 프로필을 생성합니다. |
Prompt
이름 | 설명 |
| 주제와 설명 방식을 받아 요약용 Prompt를 생성합니다. |
Related MCP server: MCP Learning
2. 프로젝트 구조
simple_mcp_server_project/
├─ data/
│ └─ manual.txt
├─ __init__.py
├─ server.py
├─ requirements.txt
├─ .gitignore
└─ README.md3. PyCharm 설정
압축을 해제합니다.
PyCharm에서
Open을 선택합니다.simple_mcp_server_project폴더를 엽니다.File → Settings → Project → Python Interpreter로 이동합니다.Python 3.10 이상으로 새 가상환경을 생성합니다.
권장 버전은 Python 3.11입니다.
4. 패키지 설치
PyCharm Terminal에서 실행합니다.
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt5. MCP 서버 실행
python server.pystdio 서버는 웹 서버처럼 일반 화면을 제공하지 않습니다. MCP Client가 표준 입력과 표준 출력을 통해 연결하므로, 직접 실행했을 때 멈춘 것처럼 보이는 것이 정상입니다.
종료:
Ctrl + C6. MCP Inspector 테스트
Node.js가 설치되어 있다면 프로젝트 루트에서 실행합니다.
npx -y @modelcontextprotocol/inspector python server.pyInspector에서 다음 순서로 확인합니다.
Tools탭에서hello,add,get_current_time실행Resources탭에서manual://guide읽기동적 Resource
profile://홍길동확인Prompts탭에서summarize_document실행
7. Claude Desktop 연결 예시
Windows 설정 예시입니다.
{
"mcpServers": {
"simple-mcp-server": {
"command": "C:\\전체경로\\simple_mcp_server_project\\.venv\\Scripts\\python.exe",
"args": [
"C:\\전체경로\\simple_mcp_server_project\\server.py"
]
}
}
}전체경로는 실제 프로젝트 경로로 변경합니다.
8. 학습 순서
FastMCP객체 생성@mcp.tool()함수 등록@mcp.resource()URI 등록@mcp.prompt()Prompt 등록mcp.run(transport="stdio")실행
9. 주의 사항
stdio 서버에서는 일반 print()로 stdout에 로그를 남기면 MCP 통신 메시지가 손상될 수 있습니다.
디버깅 메시지는 stderr를 사용합니다.
import sys
print("디버깅 메시지", file=sys.stderr)This server cannot be deployed
Maintenance
Related MCP Connectors
Educational MCP server with 17 math/stats tools, visualizations, and persistent workspace
MCP server for AI dialogue using various LLM models via AceDataCloud
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA demonstration MCP server showcasing tools (calculator, file operations, weather, timestamp), resources (server config, system info, documentation), and reusable prompt templates for code review, documentation, and debugging.Apache 2.0
- AlicenseBqualityDmaintenanceA learning-focused MCP server that demonstrates how to build arithmetic tools for AI assistants, currently featuring addition functionality with structured input/output.19MIT
- FlicenseNot gradedqualityDmaintenanceA simple MCP server demonstrating resources, tools, and prompts, including a greeting resource, an addition tool, and a calculation prompt.-
- FlicenseNot gradedqualityDmaintenanceA learning-purpose MCP server providing tools for arithmetic calculation, current time retrieval, and text analysis.-