MCP server for SWAPI API
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent โ or use 1-click editor setup below.
๐ก Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
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:
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/swapi-mcp)<a href="https://allmcps.com/mcp/swapi-mcp"><img src="https://allmcps.com/api/badge/swapi-mcp?style=directory" alt="Swapi Mcp on AllMCPs" /></a>