Loading languages...
FD

fdmocho/mcp_server_nasa

@fdmocho1

MCP demo server

nasa
neo
api
python

MCP Server for NASA API integration.

NASA NEO API request by date

  • Near Earth Object information retrieval by date

Clone repo and run:

uv install

Add you mcp server config to your LLM

Example Claude config file (claude_desktop_config.json)

{
    "mcpServers": {
        "nasa": {
            "command": "uv",
                "args": [
                    "--directory",
                    "<PATH TO YOUR PY>",
                    "run",
                    "main.py"
                ]
        }
    }
}

Tools:

getNeo()

  • add your own api key in apiconfig.py (eg: apiconfig.example.py)
{
  "method": "tools/call",
  "params": {
    "name": "getNeo",
    "arguments": {
      "start_date": "<START_DATE>",
      "end_date": "<END_DATE>"
    },
    "_meta": {
      "progressToken": 0
    }
  }
}

Other instructions (uv examples)

Create environment

uv init mcp-server-demo

cd mcp-server-demo

uv add "mcp[cli]"

uv run mcp

Usage: mcp [OPTIONS] COMMAND [ARGS]

MCP development tools

  • Options

--help

Commands

version > Show the MCP version

dev > Run a MCP server with the MCP Inspector

run > Run a MCP Server

install > Install a MCP server in the Claude desktop app

Example (open MCP dev Inspector):

uv run mcp dev <MYPYTHONFILE>

# Example output:
Starting MCP inspector...
⚙️ Proxy server listening on port <PORT>
🔍 MCP Inspector is up and running at http://127.0.0.1:<PORT> 🚀

# mcpServer Config

{
  "mcpServers": {
    "nasa": {
      "command": "uv",
      "args": [
        "--directory",
        "<PATH TO YOUR PY>",
        "run",
        "main.py"
      ]
    }
  }
}

# stdio

uv --directory <PATH TO YOUR PY> run main.py
Transport:
stdio
Language:
Python
Created: 4/8/2025
Updated: 4/8/2025