---
title: "Adding a service"
description: "What a new nasa-mcp service needs: a catalogue entry, a tool module, recorded fixtures, hermetic and live tests, and docs."
type: Guide
tags:
  - services
  - extending
generated:
  by: "claude/opus-5.5"
  at: "2026-11-27T00:00:00Z"
sources:
  - id: design
    resource: "DESIGN.md"
    title: "nasa-mcp design"
    author: "team:nasa-mcp"
  - id: research
    resource: "RESEARCH.md"
    title: "nasa-mcp research notes (upstream services, 2026-11-27)"
    author: "team:nasa-mcp"
status: stable
---

<!--
SPDX-FileCopyrightText: 2026 Tyson Lee Swetnam
SPDX-License-Identifier: CC-BY-4.0
-->

# Adding a service

1. **Probe it first.** Record what the live service actually does (parameters, error shapes,
   empty results, what it does with bad input, sizes) in `RESEARCH.md` with `[seen]`/`[doc]`
   labels. Several NASA services ignore bad filters or answer errors with HTTP 200.
2. **Catalogue entry.** Add a `Service` to `providers/catalog.py` and its id to
   `providers/base.PROVIDER_IDS`: `hosts` (the HTTP allow-list; include asset hosts that
   redirects reach), `key_hosts` only if it must go through api.nasa.gov, `docs_url`, the
   `citation` text the service asks for, `result_notes` for caveats every result must carry, a
   politeness policy (`rps`, `concurrency`) and a tiny `ping_url`. Prefer the service's own host
   over the api.nasa.gov gateway when it works without a key.
3. **Tool module.** Create `tools/<service>.py` with a docstring that names the upstream and its
   quirks (pointing to `RESEARCH.md`), pydantic input models with `extra="forbid"`, enums for
   anything the upstream would silently ignore, and output models that subclass
   `ToolResultBase`. Name tools `nasa_<service>_<action>`; descriptions at most 600 characters
   ending with `Next:`. Choose a cache class (`default`, `static`, `archive` or none). Return URLs,
   never media bytes. Import the module in `tools/__init__.py`.
4. **Tests.** Add the tool to `tests/helpers.EVERY_TOOL_CALL`, record fixtures with
   `scripts/record_fixtures.py record` (they must pass `check`), write a hermetic test in
   `tests/tools/` covering the quirk paths, and a live test in `tests/live/test_live.py` (marker
   `network`, plus `apikey` if it spends api.nasa.gov quota).
5. **Docs.** Add `docs/providers/<service>.md` (endpoint, key use, tools, quirks, citation) with
   frontmatter and `stale_after`, link it from `docs/providers/index.md` and the `zensical.toml`
   nav, update `src/nasa_mcp/resources_static/overview.md`, the server instructions and the
   README table, add a `docs/log.md` entry, then regenerate the tool reference and llms files.

Candidate for a later version: NASA CMR / Earthdata search (DESIGN.md O3).
