Skip to main content

Get Planetary Data from the Planetary Data System (PDS)

Project description

Peppi

Access planetary datasets from the Planetary Data System (PDS)

Prerequisites

  • Python 3.12 or newer

User Quickstart

See https://nasa-pds.github.io/peppi/

Use as an MCP server with an LLM

Claude Desktop

Model Context Protocol (MCP) servers enable natural languageโ€“based tools (such as Claude Desktop) to interact with the PDS Registry through Peppi.

Two commands enable the connection of AI apps with Peppi using the Model Context Protocol (MCP) using the MCP stdio transport:

  • pds-peppi-qb-mcp โ€” a comprehensive MCP server that supports a wide range of query types for accessing PDS data using the Peppi "Query Builder" (QB)
  • pds-peppi-mcp-server โ€” a proof-of-concept MCP server that provides access to a limited subset of Peppi features (such as searches for instrument hosts and targets). It reuses the docstrings from Peppi methods, which reduces the integration overhead for each method.

Select one command and connect it to your LLM (such as Claude Desktop), for example, as described in these instructions; for example to connect pds-peppi-qb-mcp to Claude Desktop, use a configuration similar to the following:

    {
      "mcpServers": {
        "pds_peppi": {
          "command": "{whereever the package is installed}/bin/pds-peppi-qb-mcp",
          "args": []
         }
      }
    }

Once you've started Claude Desktop, you can enter requests like

  • "Find Mars data"
  • "Find calibrated Mars data"
  • "Find Mercury data from the year 2020 only"
  • Etc.

๐Ÿ‘‰ Note: On macOS, "sandboxing" may interfere with Claude's ability to run either MCP server described above. If Claude's MCP log shows "Operation not permitted", try moving the peppi folder or the Python virtual environment to the $HOME directory or other location not in Documents, Downloads, or Desktop.

Claude code

To use the peppi MCP service with Claude code, you first need to start the MCP server as an HTTP API:

pds-peppi-qb-mcp --transport http

Then connect it to you claude code configuration, for example for a server started on localhost port 8000, runn the following command:

claude mcp add --transport http peppi http://127.0.0.1:8000/mcp

Then start your claude session:

claude

Whenever the PEPPI MCP tool is used, you will get prompted, something like:

โฏ What PDS dataset target the planet Mars ?

 โบ I'll search the Planetary Data System (PDS) for datasets related to Mars.

 โบ peppi - querypdsdata (MCP)(query: "has_target(\"Mars\").as_dataframe(50)")

โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
 Tool use

   peppi - querypdsdata(query: "has_target(\"Mars\").as_dataframe(50)") (MCP)
   Query PDS data using natural language.

   This tool allows you to query the Planetary Data System (PDS) using natural language.โ€ฆ

 Do you want to proceed?
 โฏ 1. Yes
   2. Yes, and don't ask again for peppi - querypdsdata commands in /Users/loubrieu/PycharmProjects/updart
   3. No

` You can say yes to proceed and get the results.

Code of Conduct

All users and developers of the NASA-PDS software are expected to abide by our Code of Conduct. Please read this to ensure you understand the expectations of our community.

Development

To develop this project, use your favorite text editor, or an integrated development environment with Python support, such as PyCharm.

Contributing

For information on how to contribute to NASA-PDS codebases please take a look at our Contributing guidelines.

Installation

Install in editable mode and with extra developer dependencies into your virtual environment of choice:

pip install git+https://github.com/NASA-AMMOS/slim-detect-secrets.git@exp
pip install --editable '.[dev]'

Then, configure the pre-commit hooks:

pre-commit install
pre-commit install -t pre-push
pre-commit install -t prepare-commit-msg
pre-commit install -t commit-msg

These hooks then will check for any future commits that might contain secrets. They also check code formatting, PEP8 compliance, type hints, etc.

๐Ÿ‘‰ Note: A one time setup is required both to support detect-secerts and in your global Git configuration. See the wiki entry on Secrets to learn how.

Tests

This section describes testing for your package.

A complete "build" including test execution, linting (mypy, black, flake8, etc.), and documentation build is executed via:

tox

Build

pip install build
python3 -m build .

Publication

NASA PDS packages can publish automatically using the Roundup Action, which leverages GitHub Actions to perform automated continuous integration and continuous delivery. A default workflow that includes the Roundup is provided in the .github/workflows/unstable-cicd.yaml file. (Unstable here means an interim release.)

Manual Publication

Create the package:

python3 -m build .

Publish it as a Github release.

Publish on PyPI (you need a PyPI account and configure $HOME/.pypirc):

pip install twine
twine upload dist/*

Or publish on the Test PyPI (you need a Test PyPI account and configure $HOME/.pypirc):

pip install twine
twine upload --repository testpypi dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pds_peppi-0.8.1-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file pds_peppi-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: pds_peppi-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pds_peppi-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84d31b5f3047ac362012da70971e47fe572ba064780b95d35804338c0ced11a7
MD5 ef7d483206a451316248631a40789d9b
BLAKE2b-256 d43c12b653e051f570bad0c5c347f663feb48370d1ad3f39e547e5053ee0fa2a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page