---
title: "Security"
description: "What nasa-mcp accepts, which hosts it contacts, what it stores and logs, and how the api.nasa.gov key is kept out of results."
type: Reference
tags:
  - security
  - api-key
  - redaction
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"
  - id: neon-mcp
    resource: "https://github.com/idss-mesa/neon-mcp"
    title: "idss-mesa/neon-mcp (reference conventions)"
    author: "team:idss-mesa"
status: stable
---

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

# Security

* **Inputs:** every tool input is a pydantic model with `extra="forbid"` and explicit bounds
  (date patterns, enums for categories, collections, bodies and projections, id patterns, list
  and window limits). The Exoplanet ADQL tool accepts a single `SELECT` and caps its rows.
  Upstreams that ignore bad filters are protected by validation on our side.
* **Outbound requests:** one `httpx.AsyncClient`, automatic redirects off; each redirect hop is
  checked against the calling service's host allow-list (the `hosts` of
  [its catalogue entry](../providers/index.md)) and must be HTTPS. GET only. Generic User-Agent
  `nasa-mcp/<version> (+https://github.com/idss-mesa/nasa-mcp)`: no owner name, e-mail or local
  path.
* **XML:** WMTS capabilities (GIBS, Trek) are parsed with `defusedxml`.
* **The key:** only the api.nasa.gov key exists, read only from the environment, sent only to
  `api.nasa.gov` as a query parameter, dropped on redirects to other hosts, redacted from URLs,
  logs (including tracebacks), error details, `source.endpoints`, cache keys and fixtures;
  `--print-config` shows `***`. Over HTTP it is used only with `nasa.allow_key_in_http_mode`. The
  server never reads credential files. See [the api.nasa.gov key](../getting-started/api-key.md).
* **Storage:** in-memory TTL caches; an optional disk cache (`cache.disk_dir`). No user data is
  stored. Media are never downloaded.
* **Logs:** structlog to stderr (console for stdio, JSON with request ids for HTTP); httpx and
  httpcore loggers at WARNING because they print full URLs.
* **Supply chain:** `uv.lock` pins every dependency with sha256 hashes, including the build
  backend (`build` group); Docker and CI install with `uv sync --frozen --no-build-isolation`;
  base images and CI actions are pinned by digest or commit SHA.
* **Timeouts:** per-tool wall clock 90 s (`limits.tool_timeout_s`), connect 10 s, read 60 s.
