
Swapi Mcp
io.github.abhishekjkrsna由 GitHub 账号 abhishekjkrsna 发布v1.0.4更新于 Oct 24, 2026
MCP server for SWAPI API
概览
一个本地 MCP 服务器,暴露星球大战 API(SWAPI)数据,让助手列出数据类别并查询角色信息。
- 可以做什么
- 以逗号分隔列表的形式列出 SWAPI 中可用的星球大战信息类别,例如人物、星球、电影、物种、载具和星舰。通过项目的角色工具获取星球大战角色信息。数据经 stdio 传输从公开的星球大战 API 获取。
- 适用场景
- 适合让助手回答星球大战角色相关问题,或了解 SWAPI 有哪些数据类别,用于演示、测试或日常探索,而非生产级数据工作。
- 运行要求
- 以 npm 包形式通过 stdio 在本地运行。需要 Node.js 20 或更高版本及 npm;README 中的客户端配置通过项目目录下的 npm start 启动。需要能访问星球大战 API 的网络。未声明认证、环境变量或请求头。
安装
在 SourceWeft 中
- 打开 控制台中的 Swapi Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
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
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:
If your client requires an absolute working directory, configure it like this:
来源:README.md,提交 57eae25
工具
0版本历史
1- v1.0.4最新Sep 16, 2026
评分
已满足适用检查项的 40%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分
请在仓库或注册中心条目中声明许可证。
其他 Swapi 集成
Star Wars API & MCP server (swapi.build)
build.swapi官方发布者
免费的只读远程 MCP 服务器,提供星战 I–VI 部电影数据:可按名称搜索、列出、按 id 获取,或随机取人物、电影、星球、物种、星舰、载具。

Swapi Mcp
由 GitHub 账号 mrfentmen 发布
本地 MCP 服务器,让助手检索和读取 SWAPI 的星球大战资料:角色、星球、电影、星舰、载具和物种。

Swapi
由 GitHub 账号 pipeworx-io 发布
Pipeworx 的 SWAPI 连接器:让助手查询星球大战角色、星球、飞船和电影,并可通过网关路由其他数据问题。