徒步路线搜索服务器

一个基于MCP(模块化命令处理器)的服务器,允许用户通过地理和文本查询在Wikiloc上搜索徒步路线。

  • by Adriapt
  • Python
  • 本地部署
  • 4 星标
  • 更新于
在 GitHub 查看 Adriapt/hiking-mcp

使用说明

🏔️ 徒步MCP服务器

这是一个MCP(模块化命令处理器)服务器,允许您在 维基解密,使用地理和文本查询。


🖥️ 系统要求

  • Python 3.10或更高版本
  • uv 安装
  • Python MCP SDK 1.2.0或更高版本(随附 mcp[cli])
  • Claude桌面版(仅限Windows或macOS)

⚙️ 设置您的环境

1.安装 uv

在…上 Windows PowerShell:

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

安装后, 重新启动终端 所以 uv 命令被识别。


2.克隆并配置项目

# Clone the GitHub repository
git clone https://github.com/Adriapt/hiking-mcp.git
cd hiking-mcp

# Set up and activate a virtual environment
uv venv
.venv\Scripts\activate   # On macOS/Linux: source .venv/bin/activate

# Install required dependencies
uv add mcp[cli] httpx beautifulsoup4

▶️ 运行服务器

要启动服务器,请运行:

uv run mcp-server.py

这将启动MCP服务器,准备通过以下方式接受命令 stdio.


💻 连接到Claude for Desktop

要将MCP服务器与Claude for Desktop一起使用,请执行以下操作:

1.确保已安装Claude for Desktop

你可以 在此处下载克劳德桌面版.

2.打开或创建配置文件

  • 在…上 macOS:
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
  • 在…上 视窗 (PowerShell):
code "$env:APPDATA/Claude/claude_desktop_config.json"

3.添加您的MCP服务器配置

{
  "mcpServers": {
    "hiking": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/hiking-mcp",
        "run",
        "mcp-server.py"
      ]
    }
  }
}

替换 /ABSOLUTE/PATH/TO/hiking-mcp 带有项目目录的实际完整路径。

使用 where uv 在Windows或 which uv 在macOS/Linux上查找 uv 如果需要的话。