claude-ia-mcp-tools
API 클라이언트 → 비즈니스 로직 → MCP 도구
일반 애플리케이션 코드와 MCP 도구 양쪽에서 API 클라이언트와 비즈니스 로직을 재사용하는 방법을 보여 주는 작은 Python 예제입니다.
구조
src/example/
├── api/
│ └── api_client.py
├── business/
│ └── service.py
├── mcp/
│ └── server.py
└── main.py이 예제는 앱에서 노출하는 5개의 작업을 제공합니다.
get_userlist_userscreate_userupdate_userdelete_user
MCP 계층은 의도적으로 얇게 유지됩니다. MCP 입력을 검증한 후 비즈니스 서비스에 위임하고, 비즈니스 서비스는 HTTP 작업을 API 클라이언트에 위임합니다.
Related MCP server: JSONPlaceholder MCP Server
설치
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txtMCP 서버 실행
python -m src.example.mcp.server또는 MCP 클라이언트를 실행하도록 구성합니다.
python -m src.example.mcp.serverMCP 서버 사용
터미널을 통해
{"jsonrpc":"2.0","method":"tools/list","id":1}또는 Claude
{
"mcpServers": {
"example-users": {
"command": "python",
"args": ["-m", "src.example.mcp.server"]
}
}
}중요
이 예제는 자체 포함된 아키텍처 예제입니다. API 클라이언트는 https://jsonplaceholder.typicode.com을 공개 데모 API로 사용합니다.
실제 API의 경우 ApiClient 구현을 교체하고 비즈니스/MCP 인터페이스는 사실상 그대로 유지하세요.
테스트 워크플로 실행
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Build multi-tenant apps over MCP. Schemas, CRUD, deploys — access control enforced server-side.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceWraps the JSONPlaceholder fake REST API to enable testing and prototyping with CRUD operations on posts, comments, and other resources via MCP.590 npmMIT
- FlicenseNot gradedqualityDmaintenanceEnables interaction with the JSONPlaceholder REST API for managing posts, comments, and users through MCP tools.-
- FlicenseNot gradedqualityDmaintenanceA minimal demo MCP server exposing user management tools (list, get, create, update, delete users) over both stdio and HTTP/SSE transports, wrapping an Express REST API to illustrate local vs remote MCP connectivity.-
- AlicenseNot gradedqualityCmaintenanceEnables retrieving user and post data through MCP tools, with Zod-based request validation and OpenAPI/Swagger UI support.MIT