MCP Python Server — API Wrapper
MCP Python 서버—API 래퍼
이 프로젝트는 외부 API를 쿼리하는 도구를 제공하는 Python으로 MCP 서버를 만듭니다. MCP(Model Context Protocol)를 지원하는 Claude Desktop 또는 ChatGPT Desktop과 호환됩니다.
✨ 특징
MCP를 통한 도구 노출
외부 API에 대한 HTTP 쿼리
claude.json을 통해 Claude/Desktop과 직접 통합
Related MCP server: MCP Starter
🚀 요구 사항
파이썬 3.9 이상
mcp[cli] (pip 또는 uv를 통해 설치 가능)
Claude 또는 ChatGPT 데스크톱(MCP 지원 포함)
📁 프로젝트 구조
지엑스피1
⚙️ 설치
피프와 함께
pip install "mcp[cli]"UV 포함(추천)
uv init mcp-api-server
cd mcp-api-server
uv add "mcp[cli]"MCP 설치
mcp install mi_script.py.env로 설치
mcp install mi_script.py -f .env종속성 설치
pip install -r requirements.txt환경 변수
프로젝트 루트에 .env 파일을 만들어 선택적 환경 변수를 정의합니다.
# .env
API_KEY=mi_api_key
API_URL=https://miapi.com/consulta👷 빠른 시작(Quickstart)
서버 server.py를 생성합니다.
from mcp.server.fastmcp import FastMCP
import httpx
mcp = FastMCP("API Wrapper")
@mcp.tool(description="Consulta una API externa")
async def consultar_api(param: str) -> str:
"""Consulta una API externa con un parámetro y devuelve la respuesta."""
async with httpx.AsyncClient() as client:
r = await client.get(f"https://miapi.com/consulta?param={param}")
return r.text개발 모드에서 로컬로 실행
mcp dev server.py프로덕션 모드에서 실행
mcp run server.py또는 uv를 사용하여:
uv run --with mcp[cli] mcp run server.py🚀 Claude/Desktop과 통합
Claude/Desktop 구성 폴더에서 claude.json을 찾으세요.
Windows의 경우: %APPDATA%\Claude\claude.json
Linux/macOS: ~/.claude/claude.json
예:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"/codigo/backend-curso-inkor/proyectos_memes"
]
},
"Demo": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"mcp",
"run",
"C:\\codigo\\backend-curso-inkor\\MCP\\server.py"
]
}
}
}🤖 Claude/Desktop 내에서 사용하세요
모델에게 다음과 같이 질문할 수 있습니다.
"ping" 매개변수와 함께 consult_api 도구를 사용하세요.
그리고 모델은 MCP 서버를 사용하여 실시간 HTTP 호출을 수행합니다.
🎁 보너스: 도구 확장
@mcp.tool()
async def traducir(texto: str, lang: str) -> str:
return f"Traducido: {texto} → {lang}"🔍 리소스
공식 MCP 문서: https://docs.mcp.run/
Python SDK 저장소: https://github.com/modelcontextprotocol/mcp
✅ 사랑과 httpx로 만들었습니다 🚀
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
A Model Context Protocol server for Wix AI tools
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA custom Model Context Protocol server that gives Claude Desktop and other LLMs access to file system operations and command execution capabilities through standardized tool interfaces.23Apache 2.0
- AlicenseDqualityDmaintenanceA foundation for building custom local Model Context Protocol (MCP) servers that provide tools accessible to AI assistants like Cursor or Claude Desktop.137MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows integration with Claude Desktop by creating and managing custom tools that can be executed through the MCP framework.88
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server built with the mcp-framework for developing and managing custom tools. It provides a structured foundation for building and integrating modular components like data processors and API clients into Claude Desktop.12
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cdryampi/MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server