Listed from the MCP registry; nobody on Odel publishes it.
Is this yours? Claim itFree Star Wars MCP server (SWAPI): people, films, planets, species, starships, vehicles. No API key.
One address for any MCP client. No sign-in needed on this server.
3 read1 other
Grouped by tool name. At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
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 built to stay up for live demos. 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).
cd swapi-app
./mvnw quarkus:dev
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.
GET /api/stats returns anonymous request counts per route (for example
/api/people/{id} or /mcp) and per group (REST API, MCP, pages, SEO, other)
for the last 24 hours (?period=24h, per hour), 7 days (default, per day;
&granularity=hour for hourly) or 30 days (?period=30d, per day), each with
the window before it for comparison (the last hour or day is still filling, and
lastBucketElapsed says how much of it has passed, so the window before can be
scaled to the same time), plus server response times per route and
per group under performance (requests, mean, min, max, standard deviation and
approximate p50/p95/p99 in milliseconds, network excluded). They are counted with
no IP address or client details. The /stats page
shows the same numbers with filters, a trend chart, a ranking and a Performance
section.
All responses are JSON. Example:
curl http://localhost:5432/api/people/1
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.:
npx @openapitools/openapi-generator-cli generate -i https://swapi.build/openapi.json -g typescript-fetch
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:
https://swapi.build/mcp
Full setup guides: swapi.build/docs/mcp
| Tool | Arguments | Returns |
|---|---|---|
sw_list | resource, optional fields | All entities of a resource |
sw_get | resource, id, optional expand | One entity by id |
sw_random | resource | A random entity |
sw_search | resource, query, optional fields | 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).
expand names relations to embed in the same call (["homeworld", "species"], or ["*"]);
fields projects each entity (["name"] gives a compact index; url always stays).
Since 2.13.0 the records are also MCP resources: swapi://people (an index) and
swapi://people/1 (the sw_get text), for the six types, plus the templates
swapi://<type>/{id}. The server prompt character_profile takes a character name.
Since 2.17.0 the server also publishes an Agent Skill, star-wars-research, through the
Skills over MCP extension
(skills/list, skills/get): how to chain the four tools, which relations expand and which
fields fields accept per type, and the film id trap. Its files are the resources
skill://star-wars-research/SKILL.md and skill://star-wars-research/references/relations.md.
In Claude Code (v2.1.331 or later, a beta feature there) it appears as
swapi-build:star-wars-research.
Caching: Quarkiverse MCP Server (2.0.0 and later) emits the required ttlMs: 0 and
cacheScope: "public" fields on stateless discovery and tool-list responses.
Zero TTL means immediately stale; the extension's methods configure no positive freshness
period. The skills methods are the exception: skills/list and skills/get answer
ttlMs: 300000 (five minutes) with cacheScope: "public", since the skill's files change only
with a release and a client checks the digest of every file it reads.
Its cache hints
apply to discovery, list methods and resources/read, not tools/call.
Tool-result caching is not enabled, including for sw_random. REST/edge caching is a separate mechanism.
claude mcp add --transport http swapi-build https://swapi.build/mcp
Or share via .mcp.json at the repo root:
{
"mcpServers": {
"swapi-build": { "type": "http", "url": "https://swapi.build/mcp" }
}
}
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.
codex mcp add swapi-build --url https://swapi.build/mcp
Or in ~/.codex/config.toml (shared by CLI, IDE extension and ChatGPT desktop):
[mcp_servers.swapi-build]
url = "https://swapi.build/mcp"
Verify: codex mcp list.
.vscode/mcp.json (top-level key is servers):
{
"servers": {
"swapi-build": { "type": "http", "url": "https://swapi.build/mcp" }
}
}
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):
{
"mcpServers": {
"swapi-build": {
"type": "streamable-http",
"url": "https://swapi.build/mcp",
"disabled": false
}
}
}
Or Bob panel → MCP tab → Edit Global MCP. Bob detects the tools automatically.
The website exposes sw_list, sw_get, sw_search and sw_random through
WebMCP. Names and required arguments match the remote MCP tools, including
uppercase resource names; the optional expand and fields arguments exist only
on the remote server. 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.swapi-app/
src/main/
java/com/eldermoraes/ # Backend (Quarkus + Jakarta REST)
film/ # Film model, service, resource
people/ # People model, service, resource
planet/ # Planet model, service, resource
specie/ # Specie model, service, resource
starship/ # Starship model, service, resource
vehicle/ # Vehicle model, service, resource
mcp/ # MCP server: tools (sw_list, sw_get, sw_random, sw_search), resources, prompt, skill
seo/ # Site pages: metadata, server-rendered <main> (Qute), Markdown copies, sitemap
stats/ # Anonymous usage counters and server times (/api/stats)
SWObject.java # Base model class (and the one helper that makes an address absolute)
RecordService.java # Base of the six services: load, list, by id, search, random
ApiResource.java # Root /api endpoint
ApplicationPath.java # Jakarta REST base path (/api)
resources/
data/ # Static JSON data files
seo/ # site.json (page metadata) and faq.json (FAQ text)
mcp/skills/ # The files of the MCP skill star-wars-research
templates/ # Qute templates of the server-rendered pages
application.properties # Quarkus configuration
webui/ # Frontend (TypeScript + Vite)
src/
api.ts # API client with request management
main.ts # SPA router
pages/ # Client code of the pages (home, resource, docs, mcp, webmcp, stats, privacy, terms)
json-highlight.ts # JSON syntax highlighting for result panels
style.css # Site styles
constants.ts # Shared resource metadata
utils.ts # Shared utilities (escapeHtml)
src/test/
java/com/eldermoraes/ # Regression suite (REST contracts, MCP tools, forwarded headers)
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 @RunOnVirtualThreadcd swapi-app
# Development mode (live reload)
./mvnw quarkus:dev
# Production JAR
./mvnw package
java -jar target/quarkus-app/quarkus-run.jar
# Native executable (requires GraalVM or container build)
./mvnw package -Dnative
./mvnw package -Dnative -Dquarkus.native.container-build=true
The frontend is automatically built and bundled by Quinoa during the Maven build. No separate npm step is needed.
The app runs as a native (GraalVM/Mandrel) executable on a self-hosted server on Oracle Cloud, managed by systemd behind Caddy (TLS via Let's Encrypt). DNS is managed on Cloudflare (DNS-only records pointing to the server). Publishing a GitHub Release runs .github/workflows/native-binary.yml: test suite, native build attached to the Release, a manual approval, then the install on the server over SSH and the production probes. The runbook is docs/DEPLOY.md.
Pull requests are always welcome. Whether it's fixing a bug, improving the docs, or adding new features, jump in and help make the best Star Wars API in the galaxy even better.
git checkout -b feature/my-change)cd swapi-app && ./mvnw test, then
cd src/main/webui && npm testRelease history lives in CHANGELOG.md. Tagged releases are on the
Releases page. The version
served in /openapi.json (info.version) is always the latest released version.
The release process itself is documented in docs/RELEASE.md.
Licensed under the Apache License 2.0. The website also publishes a Privacy Policy and Terms of Use.