nasa-images MCP Server
MCP server with UI for NASA images
nasa-images scores 50 (Fair), licensed MIT and written in TypeScript. It installs as a local process. It declares 2 tools. Filed under Uncategorized. GitHub shows 2 stars. Package registries report about 62 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
50 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
61/100 for listing completeness. Lost points: 2 of 2 tools barely described, short summary, no docs link.
How quality is graded
Where the 50 comes from
22 + 5 + 2 + 10 + 4 + 7 = 50. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 5 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "kaitoy-nasa-images-mcp-server": { "command": "npx", "args": [ "-y", "@kaitoy/nasa-images-mcp-server@1.1.3" ], "env": { "NASA_API_KEY": "YOUR_NASA_API_KEY" } } }}
Environment variables
| Name | Required | Notes |
|---|---|---|
NASA_API_KEYSecret | Required | Your API key for the NASA Images API |
Tools2Tool docs quality grade F
All capabilitiesget_next_imagetool2.
1.
About
NASA Images MCP Server
A project to search NASA's image library using an MCP server and display images in an interactive UI.
š Features:
- Dual Transport Support: Supports both stdio and Streamable HTTP transport
- Image Search: Search by keywords using NASA's Images API
- Interactive UI: Beautiful image viewer using MCP Apps Pattern
- Image Navigation: Display search results sequentially
- Session Management: Stateful session management

Requirements
- Node.js 18 or higher
- npm or yarn
- NASA API Key (get free at nasa.gov/api)
Installation
- Clone the repository:
cd nasa-images-mcp-server
- Install dependencies:
npm install
- Set up environment variables:
cp .env.example .env
Edit the .env file to configure your NASA API key:
NASA_API_KEY=your_api_key_here
PORT=3000
- Build:
npm run build
Getting a NASA API Key
- Visit https://api.nasa.gov/
- Enter your name and email address in the form
- The API key will be sent to your email immediately
- Add it to your
.envfile
Rate Limits:
- DEMO_KEY: 30 requests/hour, 50 requests/day
- Registered key: 1000 requests/hour
Usage
stdio Mode (Recommended for MCP Clients like Claude Desktop)
In stdio mode, the server communicates via stdin/stdout ā no HTTP server is started. Logs are written to stderr.
Run with npx (no installation required)
npx @kaitoy/nasa-images-mcp-server --stdio
Run from local build
Pass the --stdio flag to use stdio transport:
node build/index.js --stdio
Claude Desktop Configuration
Using npx (recommended):
{
"mcpServers": {
"nasa-images": {
"command": "npx",
"args": ["-y", "@kaitoy/nasa-images-mcp-server", "--stdio"],
"env": {
"NASA_API_KEY": "your_api_key_here"
}
}
}
}
Using local build:
{
"mcpServers": {
"nasa-images": {
"command": "node",
"args": ["/path/to/nasa-images-mcp-server/build/index.js", "--stdio"],
"env": {
"NASA_API_KEY": "your_api_key_here"
}
}
}
}
HTTP Server Mode
npm start
The server will start at http://localhost:3000.
Start on a Different Port
PORT=3001 npm start
About Transports
stdio Transport
Suitable for local MCP clients (e.g., Claude Desktop) that launch the server as a subprocess.
- Communicates via stdin/stdout
- Single session per process
- No network configuration required
Streamable HTTP Transport
The latest MCP HTTP transport protocol, suitable for remote or multi-client scenarios.
Key Features:
- ā Stateful Sessions: Issues a unique session ID for each client
- ā SSE Support: Supports push notifications from the server via Server-Sent Events
- ā JSON-RPC over HTTP: Communication via standard HTTP request/response
- ā Session Management: Automatic session lifecycle management
Integration with MCP Clients
Connecting with MCP Inspector (HTTP mode)
You can test the server using MCP Inspector:
npx @modelcontextprotocol/inspector http://localhost:3000/mcp
Connecting with MCP Inspector (stdio mode)
npx @modelcontextprotocol/inspector node /path/to/nasa-images-mcp-server/build/index.js --stdio
Using with Custom MCP Clients
Steps to connect from a custom client:
- Initialize Request (POST /mcp):
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {},
"clientInfo": {
"name": "my-client",
"version": "1.0.0"
}
}
}'
The response headers will include mcp-session-id.
- Subsequent Requests:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "mcp-session-id: <your-session-id>" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/list"
}'
- SSE Stream (GET /mcp):
curl -X GET "http://localhost:3000/mcp" \
-H "mcp-session-id: <your-session-id>" \
-H "Accept: text/event-stream"
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/ | GET | Server information and endpoint list |
/health | GET | Health check (includes active session count) |
/mcp | POST | JSON-RPC requests (initialization, tool calls, etc.) |
/mcp | GET | SSE stream (for server notifications) |
/mcp | DELETE | Close session |
Available Tools
1. search_nasa_images
Search NASA's image library.
Parameters:
query(string, required): Search query (e.g., "apollo 11", "mars rover")
Usage Example (JSON-RPC):
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "search_nasa_images",
"arguments": {
"query": "apollo 11 moon landing"
}
}
}
2. get_next_image
Display the next image from the current search results.
Parameters: None
Usage Example (JSON-RPC):
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "get_next_image",
"arguments": {}
}
}
Available Resources
nasa-image://current
Get the URL of the currently displayed image.
MIME Type: text/uri-list
ui://nasa-images/viewer
HTML UI resource for the image viewer.
MIME Type: text/html;profile=mcp-app
Architecture
stdio Mode
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Client (Claude Desktop, etc.) ā
ā ā stdin/stdout ā
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā NASA Images MCP Server ā
ā āāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāāāā ā
ā ā StdioServerTransport ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā McpServer (MCP Apps Pattern) ā ā
ā ā - registerAppTool(search_nasa...) ā ā
ā ā - registerAppTool(get_next_image) ā ā
ā ā - registerAppResource(viewer UI) ā ā
ā ā - registerResource(image URL) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Session Manager ā ā
ā ā - Manage search state per user ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā NASA API Client ā ā
ā ā - Image search ā ā
ā ā - Image URL retrieval ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā HTTPS
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā NASA Images API ā
ā https://images-api.nasa.gov/search ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
HTTP Mode
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā MCP Client (Inspector, Custom App) ā
ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā HTTP Client ā ā
ā ā - POST /mcp (JSON-RPC requests) ā ā
ā ā - GET /mcp (SSE stream) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā ā
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā HTTP/SSE
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā NASA Images MCP Server (Express) ā
ā āāāāāāāāāāāāāāāāāā“āāāāāāāāāāāāāāāāāāāāāāā ā
ā ā StreamableHTTPServerTransport ā ā
ā ā - Session management ā ā
ā ā - JSON-RPC over HTTP ā ā
ā ā - SSE for notifications ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā McpServer (MCP Apps Pattern) ā ā
ā ā - registerAppTool(search_nasa...) ā ā
ā ā - registerAppTool(get_next_image) ā ā
ā ā - registerAppResource(viewer UI) ā ā
ā ā - registerResource(image URL) ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā Session Manager ā ā
ā ā - Manage search state per user ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
ā ā NASA API Client ā ā
ā ā - Image search ā ā
ā ā - Image URL retrieval ā ā
ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā HTTPS
āāāāāāāāāāāāāāāāāāāāā¼āāāāāāāāāāāāāāāāāāāāāāāāāā
ā NASA Images API ā
ā https://images-api.nasa.gov/search ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
Main Components
- src/index.ts: Express server and transport management
- src/mcp-server.ts: MCP server logic (tool and resource registration)
- src/session-manager.ts: Session management (search state persistence)
- src/nasa-api.ts: NASA API client
- src/types.ts: TypeScript type definitions
Development
Watch Mode
npm run watch
Automatically rebuilds when files change.
Development Mode
npm run dev
Builds and immediately starts the server.
Troubleshooting
Port Already in Use
Error: listen EADDRINUSE: address already in use
Solution: Specify a different port:
PORT=3001 npm start
"Cannot find module" Error
Run:
npm run build
to compile TypeScript.
API Rate Limit Error
- If using
DEMO_KEY, obtain your own API key from api.nasa.gov - Limited to 30 requests per hour
"Not Acceptable" Error
The client must accept both MIME types:
application/jsontext/event-stream
curl -H "Accept: application/json, text/event-stream" ...
Session Not Found
Save the mcp-session-id header returned after the initialization request and send it as the mcp-session-id header in subsequent requests.
Security Notes
- This server has CORS enabled (for development)
- In production, implement proper CORS settings and rate limiting
- Manage NASA API keys via environment variables; do not hardcode them
License
MIT
References
- Model Context Protocol Specification
- MCP TypeScript SDK
- MCP Apps Extension
- Streamable HTTP Transport
- NASA Images API
- NASA Open APIs
Contributing
Pull requests are welcome! Bug reports and feature requests are accepted via Issues.
Support
If you encounter issues, please create an Issue or refer to the NASA API support page.
Frequently asked questions
What is nasa-images MCP Server?
MCP server with UI for NASA images
How do I install nasa-images MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. nasa-images MCP Server runs locally from the npm package @kaitoy/nasa-images-mcp-server with the command npx -y @kaitoy/nasa-images-mcp-server@1.1.3.
Is nasa-images MCP Server free and open source?
Yes. nasa-images MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does nasa-images MCP Server support remote (HTTP) connections?
No remote endpoint is listed for nasa-images MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does nasa-images MCP Server provide?
nasa-images MCP Server provides 2 tools: get_next_image and search_nasa_images. See the full tool list for descriptions and parameters.
How is nasa-images MCP Server's trust score calculated?
nasa-images MCP Server scores 50 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yetāBe the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.