此存储库已存档-使用https://github.com/datalayer/earthdata-mcp-server相反。


🌎 ✨ Jupyter Earth MCP服务器
](https://github.com/datalayer/jupyter-earth-mcp-server/actions/workflows/build.yml) ](https://pypi.org/project/jupyter-earth-mcp-server)
🌍 Jupyter Earth MCP服务器是一个 模型上下文协议 (MCP)服务器实现,为🗺️ 地理空间分析📓 Jupyter笔记本。
Analyzing Sea Level Rise with AI-Powered Geospatial Tools and Jupyter - Watch Video
启动JupyterLab
确保安装了以下内容。需要协作包,因为可以看到笔记本上的修改,这要归功于 Jupyter实时协作.
pip install jupyterlab==4.4.1 jupyter-collaboration==4.0.2 ipykernel
pip uninstall -y pycrdt datalayer_pycrdt
pip install datalayer_pycrdt==0.12.17然后,使用以下命令启动JupyterLab。
jupyter lab --port 8888 --IdentityProvider.token MY_TOKEN --ip 0.0.0.0你也可以跑步 make jupyterlab.
\[!注意\] 这--ip设置为0.0.0.0允许在Docker容器中运行的MCP服务器访问您本地的JupyterLab。
与Claude Desktop一起使用
克劳德桌面可以下载 从这个页面 适用于macOS和Windows。
对于Linux,我们成功地使用了这个 基于nix的非官方构建脚本
# ⚠️ UNOFFICIAL
# You can also run `make claude-linux`
NIXPKGS_ALLOW_UNFREE=1 nix run github:k3d3/claude-desktop-linux-flake \
--impure \
--extra-experimental-features flakes \
--extra-experimental-features nix-command要在Claude Desktop中使用此功能,请将以下内容添加到您的 claude_desktop_config.json (阅读更多关于 MCP文档网站).
\[!重要\] 确保端口SERVER_URL和TOKEN匹配那些在jupyter lab命令。 这NOTEBOOK_PATH应该相对于JupyterLab启动的目录。
macOS和Windows上的Claude配置
{
"mcpServers": {
"jupyter-earth": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SERVER_URL",
"-e",
"TOKEN",
"-e",
"NOTEBOOK_PATH",
"datalayer/jupyter-earth-mcp-server:latest"
],
"env": {
"SERVER_URL": "http://host.docker.internal:8888",
"TOKEN": "MY_TOKEN",
"NOTEBOOK_PATH": "notebook.ipynb"
}
}
}
}Linux上的Claude配置
CLAUDE_CONFIG=${HOME}/.config/Claude/claude_desktop_config.json
cat $CLAUDE_CONFIG
{
"mcpServers": {
"jupyter-earth": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"SERVER_URL",
"-e",
"TOKEN",
"-e",
"NOTEBOOK_PATH",
"--network=host",
"datalayer/jupyter-earth-mcp-server:latest"
],
"env": {
"SERVER_URL": "http://localhost:8888",
"TOKEN": "MY_TOKEN",
"NOTEBOOK_PATH": "notebook.ipynb"
}
}
}
}
EOF
cat $CLAUDE_CONFIG组件
工具
服务器目前提供1个工具:
download_earth_data_granules
- 在Jupyter笔记本中添加一个代码单元格,从NASA地球数据下载地球数据颗粒。
- 输入:
- folder_name(string):保存数据的本地文件夹名称。 - short_name(string):要下载的地球数据集的简称。 - count(int):要下载的数据颗粒数。 - temporal (tuple):(可选)时间范围,格式为(date_from,date_to)。 - bounding_box (tuple):(可选)格式为(lower_lift_lon、lower_light_lat、upper_right_lon、upper_right_lat)的边界框。
- 返回:单元格输出。
提示
download_analyze_global_sea_level
- 请求在Jupyter中下载和分析全球海平面数据。 - 返回:提示格式正确。
建筑
你可以从源代码构建Docker镜像。
make build-docker