MCP-Server

nawani-rohit/MCP-Server

3.1

If you are the rightful owner of MCP-Server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The SpaceX MCP Server is a lightweight Model Context Protocol server designed to fetch and analyze public SpaceX launch data.

🚀 SpaceX MCP Server

A lightweight Model Context Protocol (MCP) server that fetches public SpaceX launch data and exposes three analytics endpoints.

analysisType valueWhat it returns
countByYearLaunch counts for every year from the first SpaceX flight to the most recent.
successVsFailureTotal number of successful vs. failed launches.
mostFrequentSiteLaunch site used most often and its count.

📂 Project Structure

spacex-mcp-server/
├── analysis.py
├── launch_data.py
├── main.py
├── requirements.txt
└── README.md

⚡ Quick Start

git clone https://github.com/nawani-rohit/MCP-Server.git
cd spacex-mcp-server

pip install -r requirements.txt
uvicorn main:app --reload --port 3000

🎯 API Endpoints

MethodPathQuery ParameterDescription
GET/mcp/launches/analysisanalysisType=countByYearLaunch counts per year
analysisType=successVsFailureSuccess vs failure totals
analysisType=mostFrequentSiteMost-used launch site

🧪 Requests & Responses

Replace 3000 if you run on a different port.

1️⃣ Launch Count by Year

curl "http://localhost:3000/mcp/launches/analysis?analysisType=countByYear"
{
  "2006": 1,
  "2007": 1,
  "2008": 2,
  "2009": 1,
  "2010": 2,
  "2011": 0,
  "2012": 2,
  "2013": 3,
  "2014": 6,
  "2015": 7,
  "2016": 9,
  "2017": 18,
  "2018": 21,
  "2019": 13,
  "2020": 25
}

2️⃣ Successful vs Failed Launches

curl "http://localhost:3000/mcp/launches/analysis?analysisType=successVsFailure"
{
  "successful_launches": 191,
  "failed_launches": 9
}

3️⃣ Most Frequent Launch Site

curl "http://localhost:3000/mcp/launches/analysis?analysisType=mostFrequentSite"
{
  "site": "CCAFS SLC 40",
  "launch_count": 52
}