DSSAT MCP服务器集成

通过Claude Desktop连接DSSAT MCP服务器,实现输入下载、实验运行和输出收集的一站式农业模拟服务。

  • by SCiO-systems
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 scio-systems/dssat-mcp

使用说明

DSSAT MCP服务器——克劳德桌面集成

将Claude Desktop连接到DSSAT MCP服务器,直接从聊天中下载输入、运行实验和收集输出。

快速开始

1) 安装克劳德桌面

  • 窗户: 下载 安装官方Windows应用程序,然后登录。

  • Ubuntu/Debian(社区构建): 使用 社区回购 aaddrick/claude-desktop-debian 安装a .deb/.AppImage,或从源代码构建:

    git clone https://github.com/aaddrick/claude-desktop-debian.git
    cd claude-desktop-debian
    ./build.sh
    sudo dpkg -i ./claude-desktop_*.deb
    
    # If you encounter dependency issues:
    sudo apt --fix-broken install
    

配置路径:

  • 窗户: %APPDATA%\Claude\claude_desktop_config.json

  • Linux: ~/.config/Claude/claude_desktop_config.json

    提示:您还可以从以下位置打开配置 设置→ 开发者→ 编辑配置 在克劳德桌面。

2) 添加MCP配置

将下面的JSON粘贴到您的配置文件中。 仅替换令牌值保持其他一切不变。代币将根据要求提供。

{
  "mcpServers": {
    "dssat": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://dev.mcp.crops.qvantum.scio.services/mcp",
        "--allow-http",
        "--header",
        "Authorization: Bearer ${ACCESS_TOKEN}}"
      ],
      "env": {
        "ACCESS_TOKEN": "<REPLACE_WITH_YOUR_ACCESS_TOKEN>"
      }
    }
  }
}

如果您的配置调用 npx,确保安装了Node.js和npm。

3) 使用Claude Desktop

  • 重新启动Claude Desktop(或重新加载开发人员配置)。
  • 打开新聊天。Claude Desktop将自动发现MCP服务器并列出可用工具。
  • 使用下面的示例提示运行典型的DSSAT工作流。

工具(高级描述)

  • 下载files_from_s3 --将DSSAT输入文件(例如SOIL.SOL、*.WTH、*.MZX)从S3下载到本地工作文件夹中,并验证是否存在。
  • run_dssat_实验 --使用工作文件夹中的指定实验文件(FileX)运行DSSAT,并捕获日志/摘要。
  • 上传和收集输出文件 --将工作文件夹存档,上传到S3,返回输出的预签名URL,并执行清理。

示例提示(粘贴到Claude Desktop中)

I want to run a DSSAT experiment. Check the list of tools to find the correct tool input format. First download and save to folder CUSTOM_EXPERIMENT the following files from S3: SOIL.SOL, UFGA8201.WTH, UFGA8201.MZX. Next execute the experiment with the experiment file UFGA8201.MZX. Then, upload the file to S3 in order to collect the output files.