The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the Swapi MCP listing page.
A TypeScript-based Model Context Protocol (MCP) server that exposes Star Wars API data as MCP tools.
This project connects to the Star Wars API (SWAPI) and makes selected Star Wars information available through MCP-compatible clients using stdio transport.
text swapi-mcp/ ├── src/ # Source code ├── tests/ # Test files and mock data │ ├── api/ │ └── mock_data/ ├── package.json ├── package-lock.json ├── tsconfig.json └── vitest.config.js
Some MCP-related dependencies require Node.js 20+, so using the latest LTS version is recommended.
npm install
Clone the repository and install dependencies:
npm run start
Runs the MCP server directly from TypeScript using tsx.
npm run build
Compiles TypeScript into JavaScript using the TypeScript compiler.
npm run test
When started, the server connects using stdio and can be used by MCP-compatible clients.
get-list-of-star-wars-informationReturns a comma-separated list of available Star Wars information categories from SWAPI, such as:
get-information-of-star-wars-charactersReturns Star Wars character information exposed by the project’s character tool.
You can configure an MCP-compatible client to run this server with npm:
If your client requires an absolute working directory, configure it like this: