Logo vun Marvel MCP 服务器

Marvel MCP 服务器

Communautéit
DanWahlin

Features • Tools • Setup • Configuring an MCP Host

EditeurDanWahlin
Repositorymarvel-mcp
SproochTypeScript
Forks
12
Stären
14
Disponibel Tools
0
Transporttypstdio
Kategorien
LizenzMIT
Linken
  • Tools mat KI-Workflows verbannen

    Marvel MCP 服务器 stellt MCP-Funktioune bereit, déi vu kompatibele KI-Clienten a KI-Agente kënne benotzt ginn.

  • 0 disponibel Tools

    Kuckt Iech déi opruffbar Aktiounen hei drënner un, mat Nimm a Beschreiwungen, wa se vum Server geliwwert ginn.

  • Konfiguratioun fir ze kopéieren

    Benotzt d'Installatiounsbeispiller, fir dëse Server an Ärem bevorzugte MCP-Client ze konfiguréieren.

  • Indicateure fir Open Source

    14 Stären an 12 Forks aus dem verlinkte Repository.

Marvel MCP Server

Open project in GitHub Codespaces Node version smithery badge License

Features • Tools • Setup • Configuring an MCP Host

NOTE: Marvel recently retired their API so it is no longer available unfortunately. I'm leaving this repo up for historical purposes since the approach is still relevant for MCP servers. If you'd like to see a similar example, check out my DC Comics MCP server.

MCP Server for the Marvel Developer API, enabling interaction with characters and comics data. The main goal of the project is to show how an MCP server can be used to interact with APIs.

Note: All data used by this MCP server is fetched from the official Marvel API and owned by Marvel. This project is not affiliated with Marvel in any way.

🔧 Features

  • List Marvel Characters: Supports filters like nameStartsWith, limit, comics, series, etc.
  • Fetch a Marvel Character by ID: Get detailed info on any character using their characterId.
  • Fetch Comics for a Character: Get a list of comics featuring a specific character, with various filters like format, dateRange, etc.
  • Rich Content Display: When you ask about characters or comics, the server will:
    • Display detailed information about characters and comics including images, names, descriptions, and more.
    • Create an HTML page (marvel-content.html) with all the content in it.
    • Attempt to open the newly created HTML page in your default browser for an enhanced viewing experience.
  • Tool-based MCP integration: Register this server with Model Context Protocol (MCP) tools (VS Code, Claude, etc.).
  • Environment Configuration: Use .env file to manage environment variables like MARVEL_PUBLIC_KEY, MARVEL_PRIVATE_KEY and MARVEL_API_BASE.

🧰 Tools

1. get_characters 🔍🦸‍♂️

  • Description: Fetch Marvel characters with optional filters.
  • Inputs:
    • name (optional string): Full character name.
    • nameStartsWith (optional string): Characters whose names start with the specified string.
    • modifiedSince (optional string): ISO 8601 date string to filter characters modified since this date.
    • comics, series, events, stories (optional string): Comma-separated list of IDs to filter by related entities.
    • orderBy (optional string): Fields to order the results by, such as name or -modified.
    • limit (optional number): Maximum number of results to return (1–100).
    • offset (optional number): Number of results to skip for pagination.
  • Returns: JSON response with matching characters. See CharacterDataWrapperSchema in src/schemas.ts for details.

2. get_character_by_id 🆔🧑‍🎤

  • Description: Fetch a Marvel character by their unique ID.
  • Input:
    • characterId (number): The unique ID of the character.
  • Returns: JSON response with the character's details. See CharacterDataWrapperSchema in src/schemas.ts for details.

3. get_comics_for_character 📚🎭

  • Description: Fetch comics featuring a specific character, with optional filters.
  • Inputs:
    • characterId (number): The unique ID of the character.
    • Optional filters:
      • format, formatType (string): Filter by comic format (e.g., comic, hardcover).
      • noVariants, hasDigitalIssue (boolean): Flags to exclude variants or include only digital issues.
      • dateDescriptor (string): Predefined date ranges like thisWeek, nextWeek.
      • dateRange (string): Custom date range in the format YYYY-MM-DD,YYYY-MM-DD.
      • title, titleStartsWith (string): Filter by title or title prefix.
      • startYear, issueNumber, digitalId (number): Numeric filters.
      • diamondCode, upc, isbn, ean, issn (string): Identifier filters.
      • creators, series, events, stories, sharedAppearances, collaborators (string): Comma-separated list of related entity IDs.
      • orderBy (string): Fields to order the results by, such as title or -modified.
      • limit, offset (number): Pagination options.
  • Returns: JSON response with comics featuring the specified character. See ComicDataWrapperSchema in src/schemas.ts for details.

4. get_comics 📖🕵️‍♂️

  • Description: Fetch lists of Marvel comics with optional filters.
  • Inputs:
    • format (optional string): Filter by the issue format (e.g., comic, digital comic, hardcover).
    • formatType (optional string): Filter by the issue format type (comic or collection).
    • noVariants (optional boolean): Exclude variants (alternate covers, secondary printings, director's cuts, etc.) from the result set.
    • dateDescriptor (optional string): Return comics within a predefined date range (lastWeek, thisWeek, nextWeek, thisMonth).
    • dateRange (optional string): Return comics within a custom date range. Dates must be specified as YYYY-MM-DD,YYYY-MM-DD.
    • title (optional string): Return only issues in series whose title matches the input.
    • titleStartsWith (optional string): Return only issues in series whose title starts with the input.
    • startYear (optional number): Return only issues in series whose start year matches the input.
    • issueNumber (optional number): Return only issues in series whose issue number matches the input.
    • diamondCode, digitalId, upc, isbn, ean, issn (optional string): Filter by various identifiers.
    • hasDigitalIssue (optional boolean): Include only results which are available digitally.
    • modifiedSince (optional string): Return only comics which have been modified since the specified date (ISO 8601 format).
    • creators, characters, series, events, stories, sharedAppearances, collaborators (optional string): Comma-separated list of IDs to filter by related entities.
    • orderBy (optional string): Order the result set by a field or fields. Add a "-" to the value to sort in descending order (e.g., title, -modified).
    • limit (optional number): Limit the result set to the specified number of resources (default: 20, max: 100).
    • offset (optional number): Skip the specified number of resources in the result set.
  • Returns: JSON response with matching comics. See ComicDataWrapperSchema in src/schemas.ts for details.

5. get_comic_by_id 🆔📘

  • Description: Fetch a single Marvel comic by its unique ID.
  • Input:
    • comicId (number): The unique ID of the comic.
  • Returns: JSON response with the comic details. See ComicDataWrapperSchema in src/schemas.ts for details.

6. get_characters_for_comic 🦸‍♀️📖

  • Description: Fetch Marvel characters appearing in a specific comic.
  • Inputs:
    • comicId (number): The unique ID of the comic.
    • Optional filters:
      • name (optional string): Filter characters by full name.
      • nameStartsWith (optional string): Filter characters whose names start with the specified string.
      • modifiedSince (optional string): ISO 8601 date string to filter characters modified since this date.
      • series, events, stories (optional string): Comma-separated list of related entity IDs to filter by.
      • orderBy (optional string): Fields to order the results by, such as name or -modified.
      • limit (optional number): Maximum number of results to return (1–100).
      • offset (optional number): Number of results to skip for pagination.
  • Returns: JSON response with characters appearing in the specified comic. See CharacterDataWrapperSchema in src/schemas.ts for details.

🛠️ Setup

Sign up for a Marvel Developer API account and get your public and private API keys.

If you want to run it directly in an MCP host, jump to the Use with Claude Desktop or Use with GitHub Copilot sections.

Run the Server Locally with MCP Inspector

If you'd like to run MCP Inspector locally to test the server, follow these steps:

  1. Clone this repository:

    bash
    git clone https://github.com/DanWahlin/marvel-mcp
  2. Rename .env.template to .env.

  3. Add your Marvel API public and private keys to the .env file.

    bash
    MARVEL_PUBLIC_KEY=YOUR_PUBLIC_KEY
    MARVEL_PRIVATE_KEY=YOUR_PRIVATE_KEY
    MARVEL_API_BASE=https://gateway.marvel.com/v1/public
  4. Install the required dependencies and build the project.

    bash
    npm install
    npm run build
  5. (Optional) To try out the server using MCP Inspector run the following command:

    bash
    # Start the MCP Inspector
    npx @modelcontextprotocol/inspector node dist/index.js

    Visit the MCP Inspector URL shown in the console in your browser. Change Arguments to dist/index.js and select Connect. Select List Tools to see the available tools.

Configuring an MCP Host

Use with Claude Desktop

Add the following to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "marvel-mcp": {
      "type": "stdio",
      "command": "npx",
      // "command": "node",
      "args": [
        "-y",
        "@codewithdan/marvel-mcp"
        // "/PATH/TO/marvel-mcp/dist/index.js"
      ],
      "env": {
        "MARVEL_PUBLIC_KEY": "YOUR_PUBLIC_KEY",
        "MARVEL_PRIVATE_KEY": "YOUR_PRIVATE_KEY",
        "MARVEL_API_BASE": "https://gateway.marvel.com/v1/public"
      }
    }
  }
}

Installing via Smithery

To install Marvel MCP Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @DanWahlin/marvel-mcp --client claude

Use with GitHub Copilot

Note: If you already have the MCP server enabled with Claude Desktop, add chat.mcp.discovery.enabled: true in your VS Code settings and it will discover existing MCP server lists.

Add the following to your user settings file or add it to the .vscode/mcp.json file if you only want it available in this repo (you can use MCP: Add Server from the command palette and select Global or Workspace):

json
"mcp": {
  "inputs": [
      {
          "type": "promptString",
          "id": "marvel-public-api-key",
          "description": "Marvel public API Key",
          "password": true
      },
      {
          "type": "promptString",
          "id": "marvel-private-api-key",
          "description": "Marvel private API Key",
          "password": true
      }
  ],
  "servers": {
    "marvel-mcp": {
        "command": "npx",
        // "command": "node",
        "args": [
            "-y",
            "@codewithdan/marvel-mcp"
            // "/PATH/TO/marvel-mcp/dist/index.js"
        ],
        "env": {
            "MARVEL_PUBLIC_KEY": "${input:marvel-public-api-key}",
            "MARVEL_PRIVATE_KEY": "${input:marvel-private-api-key}",
            "MARVEL_API_BASE": "https://gateway.marvel.com/v1/public"
        }
    }
  }
}

Using Tools in GitHub Copilot

  1. Now that the mcp server is discoverable, open GitHub Copilot and select the Agent mode (not Ask or Edits).

  2. Select the "refresh" button in the Copilot chat text field to refresh the server list.

  3. Select the "🛠️" button to see all the possible tools, including the ones from this repo.

  4. Put a question in the chat that would naturally invoke one of the tools, for example:

    List 10 marvel characters.
    
    What comics is Wolverine in?
    
    Give me details about villains in the Marvel universe.
    
    Which characters appear in the Avengers comics?
    
    What characters are in the Hedge Knight II: Sworn Sword (2007) comic?
    
    List 10 characters from Ant-Man comics.

    Note: If you see "Sorry, the response was filtered by the Responsible AI Service.", try running it again or rephrasing the prompt.

  5. Bonus: When you ask about characters or comics, the server will automatically create a marvel-content.html file in your project root with a beautifully styled page containing all the character/comic information and images, then open it in your browser!

MseeP.ai Security Assessment Badge

Installatioun

TypingMind
Viraussetzungen:

Node.js 18+

{
  "mcpServers": {
    "danwahlin-marvel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@codewithdan/marvel-mcp"
      ]
    }
  }
}

Marvel MCP 服务器 MCP mat verschiddene KI-Modeller benotzen

TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Soubal Marvel MCP 服务器 verbonnen ass, kënnt Dir et mat verschiddene KI-Modeller an TypingMind benotzen, amplaz et fir all Modell separat anzeriichten. Dës MCP-Integratioun leeft lokal iwwer den TypingMind-MCP-Connector op Ärem Apparat.

Ariichtungsuleedung fir de lokale Connector ze benotzen

Benotzt dës Optioun, wann den MCP-Server Zougrëff op lokal Fichieren, Appen oder privat Ressourcen op Ärem Computer brauch.

1

D'MCP-Astellungen opmaachen

Gitt an TypingMind op „Astellungen“, „Erweidert Astellungen“, dann op „Model Context Protocol“ a wielt „Connector ariichten“.

  1. Maacht TypingMind an Ärem Browser op.
  2. Klickt op d'Astellungssymbol.
  3. Gitt op „Erweidert Astellungen“.
  4. Maacht d'Sektioun „Model Context Protocol“ op.
  5. Klickt op „Connector ariichten“ a wielt „Dësen Apparat“.
Ariichtungsbildschierm vum TypingMind-MCP-Connector mat „Dësen Apparat“ ausgewielt
2

De Connector-Befeel ausféieren

Wielt „Dësen Apparat“, kopéiert de Befeel aus TypingMind a féiert en am Terminal aus. Loosst de Prozess lafen, wärend Dir MCP benotzt.

  1. Kopéiert den Ariichtungsbefeel, deen TypingMind uweist.
  2. Maacht Terminal op macOS oder Windows Terminal op Windows op.
  3. Pescht de Befeel an a féiert en aus.
  4. Bestätegt d'Installatioun vum Package, wann den Terminal Iech freet, ob Dir weiderfuere wëllt.
  5. Loosst den Terminal an de Prozess doranner lafen, wärend Dir MCP-Tools benotzt.
3

Marvel MCP 服务器 als Server derbäisetzen

Wann de Connector-Status „Prett“ ass, klickt op „Serveren änneren“ a pescht d'MCP-Serverkonfiguratioun an.

  1. Waart, bis de Connector-Status „Prett“ weist.
  2. Klickt op „Serveren änneren“.
  3. Pescht d'MCP-Serverkonfiguratioun vu Marvel MCP 服务器 an.
  4. Späichert d'Serverlëscht.
  5. Aktualiséiert, wann Dir kontrolléiere wëllt, ob de Connector nach ëmmer prett ass.
MCP-Astellunge vun TypingMind mat aktivem Server an dem Knäppchen „Serveren änneren“
{
  "mcpServers": {
    "danwahlin-marvel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@codewithdan/marvel-mcp"
      ]
    }
  }
}
4

D'Verbindung mat verschiddene Modeller benotzen

Späichert d'Serverlëscht, maacht „Plugins“ op an aktivéiert d'MCP-Tools vu Marvel MCP 服务器. Wielt dann e belibegen ënnerstëtzte KI-Modell an TypingMind a benotzt d'Tools am Chat oder weist se engem KI-Agent zou.

  1. Maacht d'Säit „Plugins“ an TypingMind op.
  2. Aktivéiert d'MCP-Tools vu Marvel MCP 服务器.
  3. Start e Chat a wielt de KI-Modell, deen Dir benotze wëllt.
  4. Benotzt d'MCP-Tools am Chat oder weist se engem KI-Agent zou.
  5. Wiesselt bei Bedarf op en anere KI-Modell, ouni MCP nei ze verbannen.
TypingMind-Chat mat aktivéierte MCP-Tools an engem ausgewielte KI-Modell
Hëlleft Dir mir bei dëser Aufgab mat Marvel MCP 服务器?
Marvel MCP 服务器
Jo. Ech hunn et gelies.
Dat hunn ech mat Marvel MCP 服务器 fonnt.

Heefeg gestallte Froen

Fir wat gëtt de MCP-Server Marvel MCP 服务器 benotzt?

Marvel MCP 服务器 ass e MCP-Server, deen et kompatibele KI-Clienten erlaabt, sech mat externen Tools a Kontext ze verbannen. An TypingMind kënnt Dir dëse MCP-Server eemol derbäisetzen a seng Tools an Ärem KI-Aarbechtsberäich zur Verfügung stellen.

Kann ech Marvel MCP 服务器 MCP mat méi KI-Modeller an TypingMind benotzen?

Jo. TypingMind verbënnt MCP-Tools um Niveau vum Aarbechtsberäich. Sou kënnt Dir Marvel MCP 服务器 mat verschiddene KI-Modeller wéi Claude, ChatGPT, Gemini oder anere Modeller benotzen, déi Dir an TypingMind konfiguréiert hutt, ouni de MCP-Server fir all Modell separat anzeriichten.

Firwat Marvel MCP 服务器 MCP mat TypingMind benotzen?

TypingMind ass eng vun de beschte Benotzeruewerfläche fir LLM-Chat, well et méi KI-Modeller, Prompts, Plugins, KI-Agenten, API-Schlësselen a MCP-Tools an engem Aarbechtsberäich zesummebréngt. Wann Marvel MCP 服务器 verbonnen ass, kënnt Dir seng MCP-Tools mat Äre bevorzugte Modeller benotzen a gläichzäiteg Är Chataarbecht an TypingMind organiséieren.

Wéi verbannen ech Marvel MCP 服务器 MCP mat TypingMind?

Marvel MCP 服务器 leeft iwwer de lokale MCP-Connector vun TypingMind. Dat eegent sech am beschten, wann de MCP-Server Zougrëff op lokal Fichieren, Desktop-Apps, Kommandozeilen-Tools oder privat Ressourcen op Ärem Computer brauch.

Wéi eng Tools stellt Marvel MCP 服务器 MCP an TypingMind zur Verfügung?

Marvel MCP 服务器 stellt MCP-Funktiounen zur Verfügung, déi Dir op der Plugins-Säit vun TypingMind aktivéiere kënnt, fir se am Chat ze benotzen oder KI-Agenten zouzeweisen.

Muss ech meng API-Schlëssele mat TypingMind deelen, fir Marvel MCP 服务器 MCP ze benotzen?

Nee. TypingMind setzt op lokal Veraarbechtung a léisst Iech d'Kontroll iwwer Är Modellubidder, API-Schlësselen, Prompts a MCP-Konfiguratioun. Wann Marvel MCP 服务器 eng Authentifizéierung verlaangt, setzt déi néideg Headeren, OAuth-Astellungen oder lokal Konfiguratioun fir dee MCP-Server derbäi, wann Dir d'Verbindung erstallt.

Änlech MCP-Serveren

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇