Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 56 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,31 @@
# Planet MCP

planet-mcp is a local [mcp](https://modelcontextprotocol.io/introduction) server powered by the [Planet SDK](https://github.com/planetlabs/planet-client-python). It allows an AI agent/chat to interact with the Planet API using
the Planet CLI.
planet-mcp is a local [MCP](https://modelcontextprotocol.io/introduction) server powered by the [Planet SDK](https://github.com/planetlabs/planet-client-python). It allows an AI agent/chat to interact with the Planet API.

To get started with your preferred AI agent, find it in the Usage section below.

[TOC]

## Beta warning

**This is experimental software.** This MCP service will invoke the Planet SDK/CLI on your behalf. It can create and modify orders, subscriptions, and more. Do not disable tool approvals. Always carefully review tool prompts before approving them. Use at your own risk.
**This is experimental software.** This MCP service will invoke the Planet SDK/CLI on your behalf. It can create and modify orders, subscriptions, and more. Do not disable tool approvals and always carefully review tool prompts before approving them. Use at your own risk.

Tools may be added, removed or altered based on testing/feedback.

It will consume AI tokens.

Reminder: MCP servers and tools will increase the number of tokens used during interactions with your LLM provider.

## Usage (stdio)
## Usage

#### Prerequisites
### Prerequisites

1. Python
2. Planet SDK

To install the Planet SDK and `planet-mcp` from the Planet internal PyPI run the following commands:
To install the Planet SDK and MCP server, use `pip` or your preferred package manager:

```
pip install planet
pip install --index-url https://pypi.prod.planet-labs.com/simple/ planet-mcp
pip install planet planet-mcp
```

#### Authentication
### Authentication

You must authenticate your Planet account before using the local MCP server. You can do this by running:

Expand All @@ -45,69 +40,71 @@ if you have PL_API_KEY set globaly, you should run `unset PL_API_KEY` and then `

---

#### Gemini CLI

1. Install [Gemini](https://github.com/google-gemini/gemini-cli)
2. Set up authentication:

```bash
GOOGLE_CLOUD_PROJECT=your-project-id
GOOGLE_CLOUD_LOCATION=us-central1
```
3. Set up gemini by running `gemini` and following the instructions.
4. Quit and add the following to your `~/.gemini/settings.json` file:

```json
"mcpServers": {
"planet": {
"command": "planet-mcp",
"description": "Planet MCP Server",
"timeout": 30000,
"trust": false
}
}
```

#### GitHub Copilot

To allow GitHub Copilot to read these MCP tools, you need to configure the `mcp.json` file. Here's how:

1. **Locate or create the `mcp.json` file:**

This file is typically located in here: `/Library/Application Support/Code/User/profiles/-1ccb06ef` If it doesn't exist, you can create it, or create a `.vscode/mcp.json` in your repo.
### Supported AI assistants

2. **Add the following configuration:**

```json
{
"servers": {
"planet": {
"command": "planet-mcp",
}
},
"inputs": []
}
```
The following AI agents have been tested with the Planet local MCP. For other agents, refer to their documentation for adding a custom MCP server (the Planet local MCP uses `stdio` transport).

#### Claude Code

To use this MCP server with [Claude Code](https://claude.ai/code), run the following command:
To connect with [Claude Code](https://claude.ai/code), run the following command:

```bash
claude mcp add planet planet-mcp
```

This will add the planet-mcp server to your Claude Code configuration, allowing you to interact with Planet's API through Claude Code's terminal interface.
#### Gemini CLI

Add the following to your `~/.gemini/settings.json` file:

```json
"mcpServers": {
"planet": {
"command": "planet-mcp",
"description": "Planet MCP Server",
"timeout": 30000,
"trust": false
}
}
```

#### GitHub Copilot

To connect using GitHub Copilot, configure the `mcp.json` file (see [VSCode docs](https://code.visualstudio.com/docs/copilot/customization/mcp-servers#_add-an-mcp-server)) with the following configuration:

```json
{
"servers": {
"planet": {
"command": "planet-mcp"
}
},
"inputs": []
}
```

### Example queries
## Example queries

- Does Planet have any recent imagery over Puget Sound?
- List my subscriptions
- Get my June 2025 subscriptions and cancel the ones with name Netherlands
- Create a PlanetScope subscription with the first item in my Netherlands Feature Collection.

## Troubleshooting

### Unable to launch planet-mcp (ENOENT, No such file or directory, etc.):

This is likely due to the `planet-mcp` package being installed to a different Python environment than the one your AI agent is using. The easiest way to resolve this is to run `which planet-mcp` after installing the package, and then copy the full path to your AI agent's MCP configuration. For example, if `which planet-mcp` returns `/home/user/.local/share/virtualenvs/test/bin/planet-mcp`, your config file would look like:

```json
{
"servers": {
"planet": {
"command": "/home/user/.local/share/virtualenvs/test/bin/planet-mcp"
}
}
}
```


## Local dev

Expand Down Expand Up @@ -147,4 +144,4 @@ This will add the planet-mcp server to your Claude Code configuration, allowing
Optional run the inspector with
```bash
uv run fastmcp dev src/planet_mcp/main.py
```
```