Star Wars API (SWAPI) as a remote MCP server: films, people, planets, species, starships, vehicles.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A free, open-source Star Wars API serving data about People, Films, Planets, Species, Starships, and Vehicles. Built with Quarkus and GraalVM for instant startup, minimal memory footprint, and out-of-the-box performance.
Inspired by the original SWAPI (created by Paul Hallett, maintained by Juriy Bura), this project was born out of the need for a Star Wars API that never goes offline. If you've ever had a live demo break because a third-party API went down, you know why this exists.
Prerequisites: Java 25 and Maven (or use the included Maven Wrapper).
The API and frontend will be available at http://localhost:5432.
Base path: /api
| Resource | List All | By ID | Random | Search |
|---|---|---|---|---|
| People | GET /api/people | GET /api/people/:id | GET /api/people/random | GET /api/people?search=name |
| Films | GET /api/films | GET /api/films/:id | GET /api/films/random | GET /api/films?search=title |
| Planets | GET /api/planets | GET /api/planets/:id | GET /api/planets/random | GET /api/planets?search=name |
| Species | GET /api/species | GET /api/species/:id | GET /api/species/random | GET /api/species?search=name |
| Starships | GET /api/starships | GET /api/starships/:id | GET /api/starships/random | GET /api/starships?search=name |
| Vehicles | GET /api/vehicles | GET /api/vehicles/:id | GET /api/vehicles/random | GET /api/vehicles?search=name |
Ids are the record ids from each entity's url field (for films, 1 = A New Hope).
Successful responses return 200; unknown or non-numeric ids return 404.
All responses are JSON. Example:
The full API contract is served at /openapi.json
(OpenAPI 3.x, generated from the code β always in sync). The
documentation page renders from it, including a
"try it" for every endpoint. Generate a client with, e.g.:
swapi.build is also a remote MCP server over
Streamable HTTP. Any Streamable HTTP client works: the stateless 2026-07-28
revision sends self-contained requests, and earlier revisions negotiate a session
through initialize β both are served on the same endpoint. The legacy HTTP+SSE
transport (2024-11-05) is not supported. First-party, read-only, no authentication:
Full setup guides: swapi.build/docs/mcp
| Tool | Arguments | Returns |
|---|---|---|
sw_list | resource | All entities of a resource |
sw_get | resource, id | One entity by id |
sw_random | resource | A random entity |
sw_search | resource, query | Name/title substring match |
resource is one of PEOPLE, FILMS, PLANETS, SPECIES, STARSHIPS, VEHICLES.
Ids are the record ids from each entity's url field (for FILMS, 1 = A New Hope).
Caching: Quarkiverse MCP Server 2.0.0 emits the required ttlMs: 0 and
cacheScope: "public" fields on stateless discovery and tool-list responses.
Zero TTL means immediately stale; no positive freshness period is configured.
Its cache hints
apply to discovery, list methods and resources/read, not tools/call.
The Star Wars data here is exposed through tools, so tool-result caching is not
enabled, including for sw_random. REST/edge caching is a separate mechanism.
Or share via .mcp.json at the repo root:
Verify: claude mcp list β swapi-build β Connected.
Settings β Connectors β Add custom connector β name swapi-build, URL
https://swapi.build/mcp. No authentication needed. Verify in any chat via the + menu β Connectors.
Or in ~/.codex/config.toml (shared by CLI, IDE extension and ChatGPT desktop):
Verify: codex mcp list.
.vscode/mcp.json (top-level key is servers):
Or Command Palette β MCP: Add Server. Verify via the Configure Tools button in Copilot Chat. On Business/Enterprise, the "MCP servers in Copilot" org policy must be enabled.
~/.bob/settings/mcp_settings.json (global) or .bob/mcp.json (project):
Or Bob panel β MCP tab β Edit Global MCP. Bob detects the tools automatically.
The server scales to zero when idle β if the very first connection attempt fails, retry once (the native binary starts in tens of milliseconds; the platform may take a bit longer to provision the container; subsequent calls are fast, whether your client is stateless or session-based).
The website exposes sw_list, sw_get, sw_search and sw_random through
WebMCP. Names and arguments match the remote MCP tools, including uppercase
resource names. Each browser tool updates the visible explorer and returns
complete records in a JSON result with ok, data, resource and path.
The browser result envelope differs from the remote MCP transport.
Use a compatible browser with WebMCP enabled and the document.modelContext
API. The setup and demonstration guide
explains the inspector, example calls and cancellation behavior. When the API
is unavailable, the site works normally. No model API key or AI runtime is
embedded in the site. The JavaScript is bundled by Quinoa and runs in the
browser, including when served by the Quarkus native executable.
examples/java/langchain4j-mcp-client β ask
questions in natural language; the tools come from the MCP server above, so the example
defines none.examples/java/quarkus-rest-client β call the REST
API from Java with a typed client.Each backend domain (film, people, planet, etc.) follows the same pattern:
Film.java): POJO with @RegisterForReflection for native image supportFilmService.java): loads data from JSON at startup, caches in memoryFilmResource.java): Jakarta REST controller with @RunOnVirtualThreadThe frontend is automatically built and bundled by Quinoa during the Maven build. No separate npm step is needed.
The app runs on Vercel as a native (GraalVM/Mandrel) container image, built from swapi-app/Dockerfile.vercel. DNS is managed on Cloudflare (DNS-only records pointing to Vercel). Deploys are done with npx vercel deploy --prod from the swapi-app/ directory.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/star-wars-mcp)<a href="https://allmcps.com/mcp/star-wars-mcp"><img src="https://allmcps.com/api/badge/star-wars-mcp?style=directory" alt="Star Wars MCP on AllMCPs" /></a>