Star Wars API & MCP server (swapi.build)
Free Star Wars data over MCP: people, films, planets, species, starships and vehicles
Answered our latest tool-list check 22 hours ago with 4 tools. It will be marked verified after 3 successful checks in 7 days.
- Pricing
- Open source
- Platforms
- API, self-hosted
- Runs
- Remotely
- Version
- 2.16.0
- Listing updated
- 3 days ago
About Star Wars API & MCP server (swapi.build)
Star Wars API & MCP server (swapi.build) is an open-source MCP server for developer tools. It runs as a hosted remote server, so there is nothing to install locally.
Built for demos that must not break, this project exists because the author wanted a Star Wars API that stays up when an audience is watching. It is a fresh take on the classic SWAPI, inspired by the original by Paul Hallett and maintained by Juriy Bura, written with Quarkus and compiled with GraalVM for fast startup and low memory use.
The MCP side exposes four generic tools that take a resource name: sw_list returns all entities of a resource, sw_get returns one by id with optional expansion, sw_random returns a random entity, and sw_search searches by query. Resources cover Episodes I to VI. The same data is also served as REST JSON endpoints under /api, with search and random options per resource.
No API key is needed, and the code is open source. Running it yourself needs Java 25 and Maven.
Install
Run in a terminal
claude mcp add --transport http star-wars https://swapi.build/mcpAdd to Settings → Connectors → Add custom connector
https://swapi.build/mcpAdd to ~/.cursor/mcp.json
{
"mcpServers": {
"star-wars": {
"url": "https://swapi.build/mcp"
}
}
}Add to .vscode/mcp.json
{
"servers": {
"star-wars": {
"type": "http",
"url": "https://swapi.build/mcp"
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"star-wars": {
"serverUrl": "https://swapi.build/mcp"
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"star-wars": {
"type": "http",
"url": "https://swapi.build/mcp"
}
}
}Tools this server provides (4)
Read directly from the server.
- sw_get
- Gets one Star Wars entity by numeric record id and returns it as a JSON object. Take the id from the end of an entity's url field (from sw_search, sw_list or a relation URL). Ids are record ids, not episode numbers: FILMS id 1 is A New Hope (Episode IV). An unknown id returns a tool error, e.g. 'No films found with id 99'. Pass expand to get related records in the same call, e.g. ["homeworld", "sp
- sw_list
- Lists every entity of one Star Wars resource type as a JSON array (Episodes I-VI data). Responses are large (all 82 PEOPLE, about 38 KB); to find a single entity, prefer sw_search, then sw_get; for a compact index pass fields, e.g. ["name"] (about 5 KB).
- sw_random
- Returns one random Star Wars entity of the given resource type as a JSON object. Each call can return a different entity, so it is not idempotent. Useful for demos and quizzes; to fetch a specific entity use sw_search or sw_get.
- sw_search
- Start here. Finds Star Wars entities by name (title for FILMS) with a case-insensitive substring match: 'sky' finds Luke, Anakin and Shmi Skywalker. Returns a JSON array of full entities; an empty array [] means no match; pass fields to shorten each entity. The id to pass to sw_get is the last segment of each entity's url field. Data covers Episodes I-VI only.
What it does
- Four generic tools
- List, get, random and search over any resource.
- Six resources
- People, films, planets, species, starships and vehicles.
- REST and MCP
- Same data over /api endpoints and a remote MCP server.
- No API key
- Open and free to call.
- Self-hostable
- Quarkus and GraalVM app you can run locally.
Good for
- Give an agent safe sample data for a live demo
- Test MCP client behaviour against a stable public server
- Teach API or MCP basics with familiar data
Pricing
Open source
Free and open source.
Prices change. Check swapi.build before you buy.
Star Wars API & MCP server (swapi.build) FAQ
What do I need to run it myself?
Java 25 and Maven, or the included Maven Wrapper.
Which films are covered?
The site says Episodes I to VI.
Is Star Wars API & MCP server (swapi.build) free?
Yes. Star Wars API & MCP server (swapi.build) is open source, so you can use and self-host it for free.
How do I add Star Wars API & MCP server (swapi.build) to Claude Code?
Run this command in your terminal: claude mcp add --transport http star-wars https://swapi.build/mcp
What are the best alternatives to Star Wars API & MCP server (swapi.build)?
The closest alternatives to Star Wars API & MCP server (swapi.build) are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.
Alternatives to Star Wars API & MCP server (swapi.build)

REA
MCP serverCLI and MCP server that lets coding agents reverse engineer apps and binaries
Runs locally- Open source
- 464K GitHub stars
- Developer tools

Codebase Memory
MCP serverLocal MCP server that builds a code knowledge graph for AI coding agents
Runs locally- Open source
- 48.7K GitHub stars
- Knowledge and memory

GitHub
MCP serverOfficial MCP server connecting AI assistants to GitHub repos, issues and workflows
Not checked yet- Remote
- Open source
- 34.5K GitHub stars
- Developer tools

Serena MCP: the IDE for your agent
MCP serverMCP toolkit giving coding agents symbol-level code retrieval and editing
Runs locally- Open source
- 31.5K GitHub stars
- Developer tools

XERJ
MCP serverLocal search engine for AI agents with cited answers over your code and docs
Runs locally- Open source
- 19.2K GitHub stars
- Knowledge and memory

Ouroboros
MCP serverSpec-first layer that pins requirements and verifies results of AI coding agent work
Runs locally- Open source
- 6.4K GitHub stars
- Developer tools