Swapi Mcp

io.github.abhishekjkrsna由 GitHub 帳號 abhishekjkrsna 發布v1.0.4更新於 Oct 24, 2026

MCP server for SWAPI API

發布方自己的服務:Star Wars API & MCP server (swapi.build)

概覽

AI 產生的概覽

一個本機 MCP 伺服器,提供星際大戰 API(SWAPI)資料,讓助理列出資料類別並查詢角色資訊。

可以做什麼
以逗號分隔清單列出 SWAPI 中可用的星際大戰資訊類別,例如人物、星球、電影、物種、載具和星艦。透過專案的角色工具取得星際大戰角色資訊。資料經由 stdio 傳輸從公開的星際大戰 API 取得。
適用情境
適合讓助理回答星際大戰角色相關問題,或了解 SWAPI 有哪些資料類別,用於示範、測試或日常探索,而非正式生產的資料工作。
執行需求
以 npm 套件形式透過 stdio 在本機執行。需要 Node.js 20 或更新版本及 npm;README 的用戶端設定透過專案目錄下的 npm start 啟動。需要能連線至星際大戰 API 的網路。未宣告驗證、環境變數或標頭。
安裝前請注意
僅記錄了兩個工具,角色工具的實際輸出未說明。資料來自第三方公開的星際大戰 API,可用性與正確性取決於該服務。README 的用戶端設定假設已在本機複製儲存庫並安裝相依套件。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Swapi Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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:

json
{ "mcpServers": { "swapi-mcp": { "command": "npm", "args": ["start"] } } }

If your client requires an absolute working directory, configure it like this:

json
{ "mcpServers": { "swapi-mcp": { "command": "npm", "args": ["start"], "cwd": "/absolute/path/to/swapi-mcp" } } }

來源:README.md,提交 57eae25

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.4最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Swapi 整合