get_mars_photos

Pack: nasa · Endpoint: https://gateway.pipeworx.io/nasa/mcp

Get photos taken by Mars rovers (Curiosity, Opportunity, Spirit). Filter by Martian sol and camera. Example: get_mars_photos({ sol: 1000, camera: “FHAZ”, _apiKey: “DEMO_KEY” })

Parameters

NameTypeRequiredDescription
solnumbernoMartian sol (day) to retrieve photos from, e.g. 1000 (default: 1000)
camerastringnoCamera abbreviation: “FHAZ” (front hazard), “RHAZ” (rear hazard), “MAST” (mast), “CHEMCAM”, “MAHLI”, “MARDI”, “NAVCAM” (optional)
_apiKeystringnoNASA API key (optional, defaults to DEMO_KEY)

Example call

Arguments

{
  "sol": 1000,
  "camera": "FHAZ",
  "_apiKey": "your-nasa-api-key"
}

curl

curl -X POST https://gateway.pipeworx.io/nasa/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_mars_photos","arguments":{"sol":1000,"camera":"FHAZ","_apiKey":"your-nasa-api-key"}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('get_mars_photos', {
  "sol": 1000,
  "camera": "FHAZ",
  "_apiKey": "your-nasa-api-key"
});

More examples

{
  "sol": 3000,
  "_apiKey": "your-nasa-api-key"
}

Response shape

Always returns: count, photos

FieldTypeDescription
countnumberTotal number of photos retrieved
photosarrayList of Mars rover photos (up to 20)
Full JSON Schema
{
  "type": "object",
  "properties": {
    "count": {
      "type": "number",
      "description": "Total number of photos retrieved"
    },
    "photos": {
      "type": "array",
      "description": "List of Mars rover photos (up to 20)",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Unique photo identifier"
          },
          "sol": {
            "type": "number",
            "description": "Martian sol (day) when photo was taken"
          },
          "camera": {
            "type": "string",
            "description": "Camera abbreviation (FHAZ, RHAZ, MAST, etc.)"
          },
          "camera_full_name": {
            "type": "string",
            "description": "Full name of the camera"
          },
          "image_url": {
            "type": "string",
            "description": "URL to the photo image"
          },
          "earth_date": {
            "type": "string",
            "description": "Earth date when photo was taken in YYYY-MM-DD format"
          },
          "rover": {
            "type": "string",
            "description": "Name of the rover (Curiosity, Opportunity, Spirit)"
          },
          "rover_status": {
            "type": "string",
            "description": "Current status of the rover"
          }
        },
        "required": [
          "id",
          "sol",
          "camera",
          "camera_full_name",
          "image_url",
          "earth_date",
          "rover",
          "rover_status"
        ]
      }
    }
  },
  "required": [
    "count",
    "photos"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "nasa": {
      "url": "https://gateway.pipeworx.io/nasa/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026