SWAPI MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SWAPI MCPWhat Star Wars categories can you show me?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SWAPI MCP
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.
Features
MCP server built with TypeScript
stdio-based MCP transport
Fetches Star Wars data from SWAPI
Tool schema validation with Zod
Includes Vitest test setup
Supports coverage reports
Related MCP server: SWAPI MCP Server
Tech Stack
TypeScript
Node.js
Model Context Protocol SDK
Zod
Vitest
tsx
Project Structure
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
Requirements
Node.js 20 or newer
npm
Some MCP-related dependencies require Node.js 20+, so using the latest LTS version is recommended.
Installation
npm install
Clone the repository and install dependencies:
Available Scripts
Start the development server
npm run start
Runs the MCP server directly from TypeScript using tsx.
Build the project
npm run build
Compiles TypeScript into JavaScript using the TypeScript compiler.
Run tests
npm run test
When started, the server connects using stdio and can be used by MCP-compatible clients.
Available Tools
get-list-of-star-wars-information
Returns a comma-separated list of available Star Wars information categories from SWAPI, such as:
people
planets
films
species
vehicles
starships
get-information-of-star-wars-characters
Returns Star Wars character information exposed by the project’s character tool.
Example MCP Client Configuration
You can configure an MCP-compatible client to run this server with npm:
{ "mcpServers": { "swapi-mcp": { "command": "npm", "args": ["start"] } } }If your client requires an absolute working directory, configure it like this:
{ "mcpServers": { "swapi-mcp": { "command": "npm", "args": ["start"], "cwd": "/absolute/path/to/swapi-mcp" } } }Available Tools
3 toolsget-information-of-star-wars-charactersGet information about Star Wars CharactersBRead-onlyIdempotent
Provides list of various of star Wars characters
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, which describe the safety profile. The description adds no behavioral context beyond a restatement of the title; it does not mention pagination, data scope, or any other constraints, so it fails to add value beyond the structured annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, which is concise in length, but it is vague and grammatically awkward ('various of star Wars characters'). It does not add much beyond the title but is not severely under-specified.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description should describe the return value; it does say it provides a list of characters. However, it does not clarify whether this is all characters, a paginated subset, or how many results are returned. Given the simplicity of a zero-parameter tool, this is minimally adequate but leaves open ambiguity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has no parameters, so the input schema is empty and schema coverage is trivially 100%. The description does not need to explain parameters, and the baseline for zero parameters is 4. No additional information is required.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states it provides a list of Star Wars characters, which is a clear verb+resource combination. It distinguishes from sibling tools by focusing specifically on characters rather than general information or searching for a specific character, though it could be more precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus the sibling tools 'get-list-of-star-wars-information' or 'search-star-wars-character'. The description lacks any context about intended use cases or exclusions, so agents have no basis for selecting this tool over alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get-list-of-star-wars-informationGet List Of Star Wars InformationBRead-onlyIdempotent
Provide list of different categories of star Wars Information
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only, idempotent, and non-destructive behavior, so the description does not need to repeat that. However, the description adds no extra behavioral context such as return format or pagination, which is a minor gap given the tool's simplicity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that is front-loaded and to the point. Every word contributes, and there is no unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no parameters, so the description must clarify what the list contains. Saying 'different categories' is vague and leaves the agent uncertain about the specific categories (e.g., characters, films, planets). More detail would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema coverage is 100% (empty schema). The description adds no parameter information because none are needed, which aligns with the baseline for no-param tools.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool provides a list of different categories of Star Wars information, which is a specific verb-resource combination. It does not explicitly distinguish itself from sibling tools, though the siblings are character-focused, implying a broader scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives. There is no mention of exclusions or prerequisites, leaving the agent to infer usage from the tool name and siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search-star-wars-characterSearch about Star Wars CharacterARead-onlyIdempotent
Searches for information about a specific Star Wars character.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the Star Wars character to get information about. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the agent knows this is a safe read operation. The description adds no extra behavioral context such as response format, error behavior, or rate limits. It does not contradict annotations, but also provides no additional transparency beyond them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no wasted words. It efficiently communicates the core purpose without redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter tool with annotations covering safety, the description is minimally adequate. However, it does not specify what 'information' is returned, and since there is no output schema, this gap is notable. An agent would not know if this returns a full bio, a summary, or just a reference to another resource.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema fully describes the 'name' parameter with 100% coverage, so the baseline is 3. The description mentions 'specific' character, which adds a slight nuance (singular vs plural) but does not meaningfully enhance understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it searches for information about a specific Star Wars character, using a specific verb and resource. However, it does not explicitly distinguish from sibling tools like get-information-of-star-wars-characters or get-list-of-star-wars-information, though 'specific' implies a single vs multiple distinction.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied by 'specific character'—it's for single-character queries. However, there is no explicit guidance on when to use this tool versus the siblings, no exclusions, and no mention of alternatives. The agent must infer the differentiation from the tool name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v1.0.4- First observed
get-information-of-star-wars-characters - First observed
get-list-of-star-wars-information - First observed
search-star-wars-character
TDQS
Scored across 3 tools
Each tool has a distinct purpose: listing characters, listing information categories, and searching for a specific character. Though two tools involve characters, one explicitly returns a list while the other handles specific searches, creating clear separation.
All names use a consistent lowercase-hyphenated style with action verbs, but the verbs vary (get, get, search) and the nouns are not uniform (characters, information, character). This is mostly consistent with minor deviations.
With only 3 tools, the set is on the lower end for a Star Wars API server, which typically covers many resources. The count is within an acceptable range but feels minimal for the apparent scope of the SWAPI domain.
The server lacks tools to retrieve specific non-character resources such as films, planets, or species, despite listing these categories. This significant gap prevents agents from acting on the category information, limiting the server's usefulness.
Maintenance
Related MCP Connectors
Star Wars API (SWAPI) as a remote MCP server: films, people, planets, species, starships, vehicles.
SWAPI MCP — wraps the Star Wars API (swapi.dev, free, no auth)
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Laravel-based MCP server that enables users to browse, search, and import Star Wars character data from the SWAPI external API into a local database. It facilitates seamless AI interaction with Star Wars lore through structured tools and the Model Context Protocol.-
- AlicenseNot gradedqualityCmaintenanceEnables LLMs and clients to search for Star Wars characters, planets, and films by exposing SWAPI as MCP tools.1MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for querying the Star Wars universe via the SWAPI API, providing access to characters, films, starships, vehicles, species, and planets.ISC
- FlicenseCqualityDmaintenanceA Model Context Protocol (MCP) server that provides access to NASA's Astronomy Picture of the Day (APOD) API.2-