WE

wybert/earth-agent-chrome-ext

开发工具
104 stars 0 forks 质量 90 趋势 90

is a Cursor-like AI agent for Google Earth Engine. It can be used right in your browser as a Chrome extension or through MCP server support.

概览

is a Cursor-like AI agent for Google Earth Engine. It can be used right in your browser as a Chrome extension or through MCP server support.

README

Earth Agent Chrome Extension

Earth Agent is a Cursor-like AI agent for Google Earth Engine. It can be used right in your browser as a Chrome extension or through MCP server support. It helps you do anything related to Google Earth Engine automatically through chatting (write code, run analysis, debug errors, explain maps, and manage your environment). Hatched from sundai.club.

[!TIP] Quick Start: Install from Chrome Web Store, set up your API key (OpenAI/Anthropic/Google) or MCP server with Claude Code/Cursor/Zed/OpenCode, and say “Help me map NDVI for California”.

Features

  • Chat interface for Earth Engine assistance
  • Knows Earth Engine Data Catalog as well as community dataset
  • Knows Earth Engine APIs
  • Help you write code, and run the code
  • Help debug the code
  • Help you explain the map
  • Planning and reasoning
  • Environment management tools (reset map/console, clear code)
  • Comprehensive agent testing framework with automated testing capabilities
  • Custom Instructions: Tailor the AI’s behavior and responses to your specific needs. Work like AGENTS.MD.
  • Agent Profiles: Create and switch between different agent configurations for different tasks
  • MCP Server Support: Use Earth Agent tools directly from Claude Code, Cursor, or Zed via the Model Context Protocol.

Installation

Best for: Standard users who want to use OpenAI, Anthropic, or Google Gemini.

  1. Visit the Earth Agent page on the Chrome Web Store.
  2. Click “Add to Chrome”.
  3. The extension will be added to your browser and will appear in your Chrome toolbar.

[!NOTE] The Web Store version does not support local connections (MCP Server or Ollama) due to store policies. For those features, use Option 2.

Configuration

[!TIP] You do not have to do this if you only want to use Earth Agent as MCP server. If you want to use it directly in your browser without external agents tools, you need to do this.

API Keys

  1. Click the Earth Agent extension icon in Chrome
  2. Go to Settings
  3. Configure your AI providers keys. we support OpenAI, Anthropic, Google, Z.AI, and Custom OpenAI-Compatible Providers. You need input at least one of them to use Earth Agent.
  4. Go back to the chat page, select your preferred model
  5. Start chatting with Earth Engine!

How to Use the Extension

You can use this extension in two ways: through the MCP Server or inside the Earth Agent side panel. MCP servers expose the same tools as the Earth Agent assistant. Check MCP Server Support for details on using it as an MCP server. The following section will show you how to use it inside the Earth Agent side panel.

Getting Started

After configuration:

  1. Open Google Earth Engine Code Editor in a Chrome tab: https://code.earthengine.google.com/
  2. Click the Earth Agent extension icon in your Chrome toolbar
  3. Start chatting! The agent can see your Earth Engine environment and help with any GEE-related tasks

[!NOTE] The agent can only see the code in temp/new scripts in the Google Earth Engine Code Editor for now. You should save it once you think the script is ready.

Developer & Advanced Usage

🚀 MCP Server Support (Developer Version Only)

Earth Agent can work as a local Model Context Protocol (MCP) server, allowing you to control Google Earth Engine directly from Claude Code, Cursor, Zed, or other AI editors.

[!WARNING] Availability Note: The Chrome Web Store version of Earth Agent supports Cloud AI only (OpenAI, Anthropic, Google) due to browser security restrictions on localhost connections.

To use the MCP Server (or local Ollama models), you must install the Developer Version from GitHub.

How to Enable MCP Support

  1. Install the Developer Version:

    • Download earth-agent-extension.zip from GitHub Releases.
    • Unzip and install via chrome://extensions/ > “Load unpacked”.
  2. Enable in Settings:

    • Open Earth Agent settings.
    • Find “External Integrations” and enable “MCP Server”.
  3. Configure your Editor:

    • Add the following to your MCP configuration (e.g., ~/.claude/settings.json):
    {
      "mcpServers": {
        "earth-agent": {
          "command": "npx",
          "args": ["-y", "earth-agent-mcp"]
        }
      }
    }
    

👉 Full MCP Server Documentation

Usage Examples & Prompts

🌍 Getting Started

Help me create a simple map showing NDVI for California using Landsat data

🛰️ Satellite Data Analysis

Find and display the latest Sentinel-2 image over New York City with less than 10% cloud cover

📊 Data Processing (⚡ Requires Do Mode)

Calculate zonal statistics for land use categories within protected areas and export the results to Drive

🚀 Complex Workflow (⚡ Requires Do Mode)

I want to analyze deforestation in the Brazilian Amazon from 2000 to 2023.
Please create a complete workflow that:
1. Loads appropriate satellite imagery
2. Calculates forest loss over time
3. Creates visualizations showing the changes
4. Generates statistics by state/region
5. Exports the results for further analysis

🔧 Debugging

This code is running slowly, check my code for best practices and suggest improvements

Available Tools & Functions

Earth Agent provides a comprehensive set of tools available both in the Chrome Extension and via MCP.

Category Agent Tool Name MCP Tool Name Description
Code Editing readCode read_gee_code Read current code from editor
editCode edit_gee_code Edit code using search & replace
writeCode write_gee_code Overwrite entire editor content
undoEdit undo_gee_edit Revert last edit
insertAtLine N/A Insert text at specific line
Execution runCurrentCode run_gee_code Run the script in editor
wait wait Wait for execution/loading
Analysis getConsoleOutput gee_console Read console logs & errors
getMapScreenPosition gee_map_position Get map bounds & zoom
getInspectorOutput gee_inspector Read inspector panel data
screenshot gee_screenshot Take screenshot of interface
snapshot gee_snapshot Get accessibility DOM tree
Knowledge geeDocs gee_docs Search datasets & API docs
weather weather Get weather data
dateTime date_time Get current date/time
Control clearMapInspectorAndConsole clear_gee Reset workspace
clickByRefId click_element Click element by ID
clickAtScreenPosition click_position Click at coordinates

[!NOTE] Z.AI currently does not support multimodal inputs yet, so screenshot analysis features are unavailable when using Z.AI models. For the best Earth Engine integration experience with visual analysis capabilities, use OpenAI, Anthropic, or Google providers.

Usage Tips

For Maximum Productivity

  1. Use tool-compatible models when you need automated code execution
  2. Be specific in your requests for better results
  3. Ask for explanations to learn Earth Engine concepts
  4. Use workspace management tools to keep your environment clean
  5. Take screenshots to document your work and results

Common Workflows

  1. Exploratory Analysis: Ask questions → Get code → Run and iterate
  2. Data Processing: Define requirements → Generate pipeline → Execute and export
  3. Visualization: Create map → Style layers → Add legends → Capture results
  4. Debugging: Describe problem → Analyze code → Apply fixes → Test solution

Troubleshooting & Help

See Troubleshooting Guide for solutions to common issues (API keys, connectivity, tools, screenshots) and help resources.

Privacy and Security

We take your privacy seriously. Your API keys are stored securely in your browser using Chrome Sync and never share to our serever (even if we have one). Chat history and code remain local, it will sent to the LLM provider you choose. For full details on data handling and security practices, please read our Privacy Policy.

Roadmap

See roadmap.md for our planned features and future development.

Changelog

See CHANGELOG.md for a detailed history of changes.

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on how to set up your development environment, build the project, and submit pull requests.

License

MIT

Thanks

View this README on GitHub

安装

npx -y earth-agent-mcp

配置

{ "mcpServers": { "earth-agent": { "command": "npx", "args": ["-y", "earth-agent-mcp"] } } }