get_asteroids
Pack: nasa · Endpoint: https://gateway.pipeworx.io/nasa/mcp
Get near-Earth asteroids approaching within a date range (max 7 days). Returns size, velocity, and miss distance. Example: get_asteroids({ start_date: “2024-01-01”, end_date: “2024-01-07”, _apiKey: “DEMO_KEY” })
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
start_date | string | yes | Start date in YYYY-MM-DD format |
end_date | string | yes | End date in YYYY-MM-DD format (max 7 days after start) |
_apiKey | string | no | NASA API key (optional, defaults to DEMO_KEY) |
Example call
Arguments
{
"start_date": "2024-01-01",
"end_date": "2024-01-07",
"_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_asteroids","arguments":{"start_date":"2024-01-01","end_date":"2024-01-07","_apiKey":"your-nasa-api-key"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('get_asteroids', {
"start_date": "2024-01-01",
"end_date": "2024-01-07",
"_apiKey": "your-nasa-api-key"
});
More examples
{
"start_date": "2024-02-10",
"end_date": "2024-02-15",
"_apiKey": "your-nasa-api-key"
}
Response shape
Always returns: total_count, asteroids
| Field | Type | Description |
|---|---|---|
total_count | number | Total count of near-Earth objects in the date range |
asteroids | array | List of near-Earth asteroids (up to 30) |
Full JSON Schema
{
"type": "object",
"properties": {
"total_count": {
"type": "number",
"description": "Total count of near-Earth objects in the date range"
},
"asteroids": {
"type": "array",
"description": "List of near-Earth asteroids (up to 30)",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "NASA JPL unique asteroid identifier"
},
"name": {
"type": "string",
"description": "Asteroid name or designation"
},
"date": {
"type": "string",
"description": "Date of close approach in YYYY-MM-DD format"
},
"hazardous": {
"type": "boolean",
"description": "Whether asteroid is potentially hazardous"
},
"diameter_min_m": {
"type": "number",
"description": "Minimum estimated diameter in meters"
},
"diameter_max_m": {
"type": "number",
"description": "Maximum estimated diameter in meters"
},
"velocity_km_h": {
"type": [
"number",
"null"
],
"description": "Relative velocity in kilometers per hour"
},
"miss_distance_km": {
"type": [
"number",
"null"
],
"description": "Miss distance from Earth in kilometers"
},
"jpl_url": {
"type": "string",
"description": "NASA JPL URL for detailed asteroid information"
}
},
"required": [
"id",
"name",
"date",
"hazardous",
"diameter_min_m",
"diameter_max_m",
"jpl_url"
]
}
}
},
"required": [
"total_count",
"asteroids"
]
}
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.