We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/keosu/mcpdemo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
# MCP FastAPI Demo - 虚拟环境设置
Write-Host "================================" -ForegroundColor Green
Write-Host "MCP FastAPI Demo - 虚拟环境设置" -ForegroundColor Green
Write-Host "================================" -ForegroundColor Green
Write-Host ""
Write-Host "检查是否存在虚拟环境..." -ForegroundColor Yellow
if (-not (Test-Path "venv")) {
Write-Host "创建虚拟环境..." -ForegroundColor Yellow
try {
python -m venv venv
Write-Host "虚拟环境创建成功!" -ForegroundColor Green
} catch {
Write-Host "创建虚拟环境失败,尝试使用 python3..." -ForegroundColor Yellow
try {
python3 -m venv venv
Write-Host "虚拟环境创建成功!" -ForegroundColor Green
} catch {
Write-Host "错误:无法创建虚拟环境,请确保 Python 已正确安装" -ForegroundColor Red
Read-Host "按回车键退出"
exit 1
}
}
} else {
Write-Host "虚拟环境已存在" -ForegroundColor Green
}
Write-Host ""
Write-Host "激活虚拟环境..." -ForegroundColor Yellow
& ".\venv\Scripts\Activate.ps1"
Write-Host ""
Write-Host "安装/更新依赖包..." -ForegroundColor Yellow
pip install -r requirements.txt
Write-Host ""
Write-Host "================================" -ForegroundColor Green
Write-Host "启动 MCP FastAPI 服务器" -ForegroundColor Green
Write-Host "================================" -ForegroundColor Green
Write-Host "服务器将在 http://localhost:8000 运行" -ForegroundColor Cyan
Write-Host "API 文档地址: http://localhost:8000/docs" -ForegroundColor Cyan
Write-Host ""
Write-Host "按 Ctrl+C 停止服务器" -ForegroundColor Magenta
Write-Host "停止后运行 'deactivate' 退出虚拟环境" -ForegroundColor Magenta
Write-Host ""
uvicorn main:app --reload --host 0.0.0.0 --port 8000