更推荐使用
uv来运行基于python的MCP服务。
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# 或使用 Homebrew (macOS)
brew install uv
# Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"在 Claude Desktop 设置中添加:
{
"mcpServers": {
"weknora": {
"args": [
"--directory",
"/path/WeKnora/mcp-server",
"run",
"run_server.py"
],
"command": "uv",
"env": {
"WEKNORA_API_KEY": "your_api_key_here",
"WEKNORA_BASE_URL": "http://localhost:8080/api/v1"
}
}
}
}在 Cursor 中,编辑 MCP 配置文件 (通常在 ~/.cursor/mcp-config.json):
{
"mcpServers": {
"weknora": {
"command": "uv",
"args": [
"--directory",
"/path/WeKnora/mcp-server",
"run",
"run_server.py"
],
"env": {
"WEKNORA_API_KEY": "your_api_key_here",
"WEKNORA_BASE_URL": "http://localhost:8080/api/v1"
}
}
}
}对于 KiloCode 或其他支持 MCP 的编辑器,配置如下:
{
"mcpServers": {
"weknora": {
"command": "uv",
"args": [
"--directory",
"/path/WeKnora/mcp-server",
"run",
"run_server.py"
],
"env": {
"WEKNORA_API_KEY": "your_api_key_here",
"WEKNORA_BASE_URL": "http://localhost:8080/api/v1"
}
}
}
}对于一般 MCP 客户端配置:
{
"mcpServers": {
"weknora": {
"command": "uv",
"args": [
"--directory",
"/path/WeKnora/mcp-server",
"run",
"run_server.py"
],
"env": {
"WEKNORA_API_KEY": "your_api_key_here",
"WEKNORA_BASE_URL": "http://localhost:8080/api/v1"
}
}
}
}