Swapi MCP
MCP server that exposes Star Wars API (SWAPI) data as tools for AI clients
- Pricing
- Open source
- Platforms
- CLI, self-hosted
- Runs
- Locally
- Version
- 1.0.4
- Listing updated
- today
Similar MCP servers
About Swapi MCP
Swapi MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
The README describes this as a TypeScript Model Context Protocol server that wraps the Star Wars API and makes selected franchise data available to MCP-compatible clients over stdio. Instead of a client querying SWAPI directly, it gets named tools it can call to list the information categories SWAPI covers, such as people, planets, films, species, vehicles and starships.
The project is built on Node.js 20 or newer with the Model Context Protocol SDK, Zod for tool schema validation, and Vitest for tests. The README says it can be started with npm and configured in a client's MCP settings, with an optional working-directory setting for clients that need an absolute path.
It suits developers who want to experiment with MCP tooling or who need a small, self-run example of an MCP server that pulls data from a public REST API.
Install
Run in a terminal
claude mcp add swapi-mcp -- npx -y @abhishekjkrsna/swapi-mcpAdd to claude_desktop_config.json
{
"mcpServers": {
"swapi-mcp": {
"command": "npx",
"args": [
"-y",
"@abhishekjkrsna/swapi-mcp"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"swapi-mcp": {
"command": "npx",
"args": [
"-y",
"@abhishekjkrsna/swapi-mcp"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"swapi-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@abhishekjkrsna/swapi-mcp"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"swapi-mcp": {
"command": "npx",
"args": [
"-y",
"@abhishekjkrsna/swapi-mcp"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"swapi-mcp": {
"command": "npx",
"args": [
"-y",
"@abhishekjkrsna/swapi-mcp"
]
}
}
}Using several servers? Build one config file with the MCP config generator.
Tools this server provides (2)
Taken from the project documentation; the running server may differ.
- get-list-of-star-wars-information
- Returns a comma-separated list of available Star Wars information categories from SWAPI.
- get-information-of-star-wars-characters
- Returns Star Wars character information exposed by the project's character tool.
What it does
- Stdio MCP transport
- Runs as a local process that MCP clients launch and talk to over standard input and output.
- Star Wars category listing
- A tool returns a comma-separated list of the SWAPI information categories available.
- Character information tool
- A dedicated tool returns character details through the project's character handler.
- Zod schema validation
- Tool inputs are checked against schemas defined with Zod.
- TypeScript codebase
- Source is written in TypeScript and compiled with the TypeScript compiler.
- Vitest test setup
- Includes a Vitest configuration with mock data and coverage reporting.
Good for
- Testing how an AI client calls MCP tools against a simple public API
- Learning how to structure a TypeScript MCP server with the MCP SDK
- Giving a chat assistant access to Star Wars reference data for demos or trivia
Pricing
Open source
Free and open source; no paid plan mentioned.
Swapi MCP FAQ
How do I run the server?
The README says to clone the repository, run npm install, and then start it with npm run start, which runs the server from TypeScript using tsx.
Which transport does it use?
It uses stdio transport, so MCP-compatible clients launch it as a local process.
What Node.js version is required?
The README states Node.js 20 or newer, with npm.
Is Swapi MCP free?
Yes. Swapi MCP is open source, so you can use and self-host it for free.
How do I add Swapi MCP to Claude Code?
Run this command in your terminal: claude mcp add swapi-mcp -- npx -y @abhishekjkrsna/swapi-mcp
What are the best alternatives to Swapi MCP?
The closest alternatives to Swapi MCP are Star Wars API & MCP server (swapi.build), Api Test MCP, Makefile MCP, python-sdk and Skybridge Capitals Example.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.
