
tylersuard/mcp-123
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
MCP 서버 및 클라이언트의 가장 쉬운 구현. 서버 또는 클라이언트를 2줄의 코드로 설정합니다.
개요
사이트맵 MCP 서버 및 클라이언트를 실행하는 가장 쉬운 방법 (2 각 선) - : 2개의 선에서 서버 또는 클라이언트를 시작합니다. -: 당신의 공구에 있는 정상적인 기능을 씁니다. py file—— 그들은 MCP 서버가 자동으로 사용할 수있는 도구로 포함됩니다. - : 클라이언트는 OpenAI API 키를 사용하여 질문, 필요한 도구 호출. tools.py에서 함수를 정의합니다. 장식자가 필요 없으며 MCP 서버에 자동으로 추가됩니다. 예를 들면: - : 2개의 선에서 서버 또는 클라이언트를 시작합니다. -: 당신의 공구에 있는 정상적인 기능을 씁니다. py file—— 그들은 MCP 서버가 자동으로 사용할 수있는 도구로 포함됩니다. - : 클라이언트는 OpenAI API 키를 사용하여 질문, 필요한 도구 호출.
개요(AI 번역)
사이트맵
MCP 서버 및 클라이언트를 실행하는 가장 쉬운 방법 (2 각 선)
♨ 특징
-
Ultra-minimal setup: 서버 또는 클라이언트를 2개의 선으로 시작합니다.
-
** 쉬운 도구 생성 ** :
tools.py] 파일에 정상적인 함수를 쓰기 ** - 및 MCP 서버가 자동으로 사용할 수있는 도구로 포함 된 특수 래퍼. -
**OpenAI 통합 **: 클라이언트는 OpenAI API 키를 사용하여 질문, 필요한 도구 호출.
퀵스타트
1. 설치 요구 사항
##2. 도구 만들기
tools.py에서 함수를 정의합니다. 장식자가 필요 없으며 MCP 서버에 자동으로 추가됩니다. 예를 들면:
##3. MCP Server (2 라인) 시작
##4. MCP 클라이언트 설정 (2 선)
##5. MCP 클라이언트 사용
##6. MCP 클라이언트를 닫을 때
♨ 특징
-
Ultra-minimal setup: 서버 또는 클라이언트를 2개의 선으로 시작합니다.
-
** 쉬운 도구 생성 ** :
tools.py] 파일에 정상적인 기능을 쓰기 - ** 장식자 또는 특수 래퍼 필요 ** - 그들은 당신의 MCP 서버가 자동으로 사용할 수있는 도구로 포함됩니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
MCP-123
The easiest way to run an MCP server & client (2 lines each)
🚀 Features
-
Ultra-minimal setup: Start a server or client in 2 lines.
-
Easy tool creation: Write normal functions in your
tools.pyfile—no decorators or special wrappers needed—and they get included as tools that your MCP server can use automatically. -
OpenAI integration: The client uses your OpenAI API key to answer questions, calling tools as needed.
🖥️ Quickstart
1. Install Requirements
pip install -r requirements.txt
2. Create Your Tools
Define your functions in tools.py. No decorators needed, they are automatically added to your MCP server as tools. For example:
def add(a: int, b: int) -> int:
"""Add two numbers."""
return a + b
3. Start the MCP Server (2 lines)
from mcp123 import server
server.run_server("tools.py", port=9999)
4. Set up the MCP Client (2 lines)
from mcp123.client import McpClient
client = McpClient("http://localhost:9999", "sk-...your OpenAI key...")
5. Use the MCP Client
answer = client.ask("Add 15 and 14.")
print("Answer:", answer)
6. Close the MCP Client when you are done
client.close()
🚀 Features
-
Ultra-minimal setup: Start a server or client in 2 lines.
-
Easy tool creation: Write normal functions in your
tools.pyfile—no decorators or special wrappers needed—and they get included as tools that your MCP server can use automatically. -
OpenAI integration: The client uses your OpenAI API key to answer questions, calling tools as needed.
📝 How It Works
-
Server: Loads all top-level functions from
tools.pyand exposes them as MCP tools via HTTP. -
Client: Discovers available tools, sends prompts to OpenAI, and automatically calls tools if needed.
🛠️ Example Output
When you run the client, you’ll see:
Tools discovered:
[ ...list of tools... ]
Answer: 29
🔑 Requirements
-
Python 3.11+
-
OpenAI API key (for the client)
📢 Why MCP123?
-
Zero boilerplate: No need to write schemas or wrappers—just write functions.
-
LLM-native: Designed for seamless LLM tool use.
-
Extensible: Add more tools by simply adding functions.
🤝 Credits
-
Built with FastMCP
-
Inspired by the Model Context Protocol (MCP)
📬 Feedback & Contributions
Pull requests and issues are welcome, but only if they are in ALL-CAPS.
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →