Reference Servers · MODEL CONTEXT PROTOCOL
MorvanZhou customized mcp
a demo of customized mcp
连接能力
MorvanZhou customized mcp 为 AI Agent 提供什么
来源目录未提供结构化功能列表,请在使用前阅读源仓库文档。
安全
MCP 收录不等于安全审核
MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。
README
仓库文档
This project leverages the mcp library with CLI support and integrates with OpenAI's API.
Make sure to install the required dependencies before running the project:
pip install -r requirements.txt-
Configure your OpenAI API key as an environment variable:
export OPENAI_API_KEY="your-api-key"
-
Start the MCP server:
python server.py
-
Use the client to interact with the server:
python client.py
-
Alternatively, use the orchestrator to query the LLM and tools:
python main.py
Run the client and call the get_weather tool:
python client.pyExample interaction:
You: List tools
Assistant: {
"tools": [
{
"name": "get_weather",
"description": "Get weather for a city",
"parameters": {
"city": {
"type": "string",
"description": "Name of the city"
}
}
}
]
}
You: Call get_weather with {"city": "Beijing"}
Assistant: 北京的天气是晴天
openai==1.70.0mcp[cli]==1.6.0
This project is licensed under the MIT License.
社区
收藏、评分与讨论
正在载入社区数据…