Skip to content

Commit 338a915

Browse files
Add per-client MCP setup instructions and an AI agent install prompt to the README
1 parent bcb5e3d commit 338a915

1 file changed

Lines changed: 149 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 149 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,153 @@ Ask your MCP client things like:
4646

4747
## Installation
4848

49-
### Running with npx
49+
You don't start an MCP server yourself. Your AI app (Claude, Cursor, VS Code, Codex and others) launches it in the background, so installing it means adding an entry to that app's MCP configuration. The only prerequisite is [Node.js](https://nodejs.org/) 22 or newer; `npx` downloads the server the first time the app starts it.
50+
51+
Most tools need no API key. `NASA_API_KEY` (free at <https://api.nasa.gov/>; `DEMO_KEY` works for light use) is only used by `nasa_neo`, `nasa_insight_weather` and `nasa_mars_rover`, and `FIRMS_MAP_KEY` only by `nasa_firms`. Leave out the `env` block if you don't need them.
52+
53+
**Using an AI coding agent (Claude Code, Codex, Cursor, VS Code agent mode)?** Paste this into it:
54+
55+
```text
56+
Install the NASA MCP server from https://github.com/ProgramComputer/NASA-MCP-server
57+
for the app you're running in. Follow that app's section under Installation in the
58+
README, add it for all projects, and don't add an API key. Tell me exactly what you
59+
changed and whether I need to restart.
60+
```
61+
62+
### Standard config
63+
64+
Most clients use this JSON shape:
65+
66+
```json
67+
{
68+
"mcpServers": {
69+
"nasa": {
70+
"command": "npx",
71+
"args": ["-y", "@programcomputer/nasa-mcp-server@latest"],
72+
"env": {
73+
"NASA_API_KEY": "YOUR_API_KEY"
74+
}
75+
}
76+
}
77+
}
78+
```
79+
80+
If the file already has an `mcpServers` object, add the `"nasa"` entry inside it instead of pasting a second `mcpServers`.
81+
82+
<details>
83+
<summary>Claude Desktop</summary>
84+
85+
Open **Settings → Developer → Edit Config**. This opens `claude_desktop_config.json`:
86+
87+
* macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
88+
* Windows: `%APPDATA%\Claude\claude_desktop_config.json`
89+
90+
Paste the standard config, save, then fully quit and reopen Claude Desktop.
91+
92+
</details>
93+
94+
<details>
95+
<summary>Claude Code</summary>
96+
97+
```bash
98+
claude mcp add --env NASA_API_KEY=YOUR_API_KEY --scope user nasa -- npx -y @programcomputer/nasa-mcp-server@latest
99+
```
100+
101+
`--scope user` makes the server available in every project; leave it out to add it to the current project only. On native Windows, replace `npx` with `cmd /c npx`.
102+
103+
</details>
104+
105+
<details>
106+
<summary>Cursor</summary>
107+
108+
[<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/install-mcp?name=nasa&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBwcm9ncmFtY29tcHV0ZXIvbmFzYS1tY3Atc2VydmVyQGxhdGVzdCJdfQ%3D%3D)
109+
110+
The button installs the server without an API key. To install by hand, or to add a key, paste the standard config into `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (one project).
111+
112+
</details>
113+
114+
<details>
115+
<summary>VS Code (GitHub Copilot)</summary>
116+
117+
[<img src="https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=flat-square" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522nasa%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540programcomputer%252Fnasa-mcp-server%2540latest%2522%255D%257D) [<img src="https://img.shields.io/badge/VS_Code_Insiders-Install_Server-24bfa5?style=flat-square" alt="Install in VS Code Insiders">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522nasa%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522-y%2522%252C%2522%2540programcomputer%252Fnasa-mcp-server%2540latest%2522%255D%257D)
118+
119+
The buttons install the server without an API key. VS Code uses a top-level `servers` key instead of `mcpServers`. To install by hand, add this to `.vscode/mcp.json` in your workspace, or run **MCP: Open User Configuration** from the Command Palette for all workspaces. VS Code asks for the key the first time the server starts and stores it securely; leave it blank to skip it.
120+
121+
```json
122+
{
123+
"inputs": [
124+
{
125+
"type": "promptString",
126+
"id": "nasa-api-key",
127+
"description": "NASA API key (optional)",
128+
"password": true
129+
}
130+
],
131+
"servers": {
132+
"nasa": {
133+
"type": "stdio",
134+
"command": "npx",
135+
"args": ["-y", "@programcomputer/nasa-mcp-server@latest"],
136+
"env": {
137+
"NASA_API_KEY": "${input:nasa-api-key}"
138+
}
139+
}
140+
}
141+
}
142+
```
143+
144+
</details>
145+
146+
<details>
147+
<summary>Codex</summary>
148+
149+
```bash
150+
codex mcp add nasa --env NASA_API_KEY=YOUR_API_KEY -- npx -y @programcomputer/nasa-mcp-server@latest
151+
```
152+
153+
This writes the following to `~/.codex/config.toml`, which the Codex CLI, IDE extension and desktop app share. You can also add it by hand:
154+
155+
```toml
156+
[mcp_servers.nasa]
157+
command = "npx"
158+
args = ["-y", "@programcomputer/nasa-mcp-server@latest"]
159+
160+
[mcp_servers.nasa.env]
161+
NASA_API_KEY = "YOUR_API_KEY"
162+
```
163+
164+
</details>
165+
166+
<details>
167+
<summary>Gemini CLI</summary>
168+
169+
Paste the standard config into `~/.gemini/settings.json` (all projects) or `.gemini/settings.json` (one project).
170+
171+
</details>
172+
173+
<details>
174+
<summary>Other clients</summary>
175+
176+
Most other MCP clients accept the standard config. If a client asks for the command and arguments separately, the command is `npx` and the arguments are `-y @programcomputer/nasa-mcp-server@latest`.
177+
178+
To run a local clone instead of the npm package (see [Manual Installation](#manual-installation)), use `"command": "node"` with `"args": ["/absolute/path/to/NASA-MCP-server/dist/index.js"]`.
179+
180+
</details>
181+
182+
### Checking that it works
183+
184+
Restart or reload your client and check that a server named `nasa` appears in its MCP or tools list. Then ask something like "What's today's Astronomy Picture of the Day?"
185+
186+
If the server doesn't appear:
187+
188+
* Run `node --version` and make sure it prints v22 or newer.
189+
* Check the config file for JSON mistakes such as a trailing comma or a second `mcpServers` object.
190+
* Run the server from a terminal (below) to see any errors. If it prints nothing and waits, it is working; press Ctrl+C to stop it.
191+
* On Windows, if the client reports that `npx` can't be found, use `"command": "cmd"` with `"args": ["/c", "npx", "-y", "@programcomputer/nasa-mcp-server@latest"]`.
192+
193+
### Running from a terminal
194+
195+
You only need this for testing; your MCP client starts the server for you.
50196

51197
```bash
52198
env NASA_API_KEY=YOUR_API_KEY npx -y @programcomputer/nasa-mcp-server@latest
@@ -75,6 +221,7 @@ npm run build
75221
NASA_API_KEY=YOUR_API_KEY npm start
76222
```
77223
Replace YOUR_API_KEY with your NASA API key from <https://api.nasa.gov/>. Requires Node.js 22 or newer.
224+
78225
## Environment Variables
79226

80227
The server can be configured with the following environment variables:
@@ -321,7 +468,7 @@ For detailed examples, see the [Inspector Test Examples](docs/inspector-test-exa
321468

322469
## MCP Client Usage
323470

324-
This server follows the official Model Context Protocol. For local clients, use the default stdio configuration shown above. For Streamable HTTP mode, start the server with `MCP_TRANSPORT=http`, then connect with the MCP SDK:
471+
This server follows the official Model Context Protocol. For local clients, use the stdio configuration in [Installation](#installation). For Streamable HTTP mode, start the server with `MCP_TRANSPORT=http`, then connect with the MCP SDK:
325472

326473
```typescript
327474
import { Client } from "@modelcontextprotocol/sdk/client/index.js";

0 commit comments

Comments
 (0)