Get the FREE Ultimate OpenClaw Setup Guide →

google-earth-engine

MCP server for Google Earth Engine. Query Google Earth Engine with natural language. Fetch datasets, run tasks and visualize in chat.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cameronking4-google-earth-engine-mcp node server.js \
  --env REDIS_URL="URL to a Redis instance for SSE transport (optional)" \
  --env EE_ACCOUNT="Google Earth Engine service account email (required for authentication)" \
  --env EE_PRIVATE_KEY="Private key for the service account (required for authentication)"

How to use

This MCP server integrates Google Earth Engine (GEE) tools into the Model Context Protocol via the Vercel MCP Adapter. It exposes a set of Earth Engine utilities that an AI assistant can invoke through MCP routes to initialize authentication, visualize datasets, retrieve dataset information, compute region-based statistics, and search datasets. The tools are designed to be used from within an MCP-enabled client (for example, a Next.js app using the MCP adapter) and rely on a configured Earth Engine account and a service account key for authentication. To begin, ensure your app has the Vercel MCP Adapter installed and that the Earth Engine credentials are provided in the environment. The project includes a sample client at script/test-client.mjs to try out invocations against a deployed MCP route.

How to install

Prerequisites:

  • Node.js (LTS) and npm/yarn installed
  • Access to a Google Earth Engine account and a service account with Earth Engine access
  • A Redis instance if you plan to use the SSE transport

Installation steps:

  1. Clone or download the sample project from the repository
  2. Install dependencies npm install

    or using yarn

    yarn install
  3. Configure environment variables (see Environment Notes below)
  4. Run the development server locally (adjust as needed for your environment) npm run dev

    or if using a script: node server.js (or the appropriate start command for your setup)

  5. Open the local route for MCP (as defined by your Next.js app) and test Earth Engine tools via the provided sample client
  6. When deploying to production (e.g., Vercel), ensure the environment variables are set in the deployment settings and that the Redis and Fluid Compute options are configured according to the Notes section

Environment notes:

  • REDIS_URL is required for SSE transport in Vercel deployments if you enable SSE
  • EE_ACCOUNT and EE_PRIVATE_KEY must be supplied to authenticate with Google Earth Engine
  • Ensure your deployment has access to the Earth Engine API from the chosen runtime

Additional notes

Tips and common issues:

  • If using SSE transport, make sure Redis is attached to the project and REDIS_URL is correctly configured
  • For best performance on Vercel, enable Fluid compute and adjust maxDuration in app/route.ts to 60 or higher depending on your plan
  • Ensure Earth Engine authentication is valid; expired or invalid credentials will prevent dataset access
  • The sample client script at script/test-client.mjs can be used to quickly verify MCP route invocations against a deployed endpoint
  • When deploying, follow the Next.js MCP template guidance to ensure routes.ts and tool definitions align with the MCP TypeScript SDK expectations

Related MCP Servers

Sponsor this space

Reach thousands of developers