使用说明
MCP服务器演示
概述
使用以下命令构建简单的MCP服务器 KD金块:构建一个简单的MCP服务器
安装
使用UV
# Install UV globally (On Windows)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
# Clone the repository
git clone https://github.com/your-username/mcp-server-demo.git
# Navigate to the project directory
cd mcp-server-demo
# Inspect server
uv run mcp dev stock_price_server.py
# Install server in claude desktop
uv run mcp install stock_price_server.py --name "Stock Price Server" --with yfinance
测试结果
下面是显示在MCP服务器上运行测试结果的屏幕截图。