Marvel MCP Server

by danwahlin

Not rated
GitHub

About

Interact with the Marvel Developer API to access data on characters and comics.

Details

Author
danwahlin
Categories
Cloud Service, API, Other, Media

Setup

Install Marvel MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/danwahlin/marvel-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Interact with the Marvel Developer API to access data on characters and comics.

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 myDC Comics MCP server.

MCP Server for theMarvel 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 theofficial Marvel APIand owned by Marvel. This project is not affiliated with Marvel in any way.

- List Marvel Characters: Supports filters likenameStartsWith,limit,comics,series, etc.
- Fetch a Marvel Character by ID: Get detailed info on any character using theircharacterId.
- Fetch Comics for a Character: Get a list of comics featuring a specific character, with various filters likeformat,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.

- 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 asnameor-modified.
- limit(optional number): Maximum number of results to return (1–100).
- offset(optional number): Number of results to skip for pagination.

- Description: Fetch a Marvel character by their unique ID.
- Input:

- characterId(number): The unique ID of the 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 likethisWeek,nextWeek.
- dateRange(string): Custom date range in the formatYYYY-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 astitleor-modified.
- limit,offset(number): Pagination options.

- 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 (comicorcollection).
- 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 asYYYY-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.

- Description: Fetch a single Marvel comic by its unique ID.
- Input:

- comicId(number): The unique ID of the 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 asnameor-modified.
- limit(optional number): Maximum number of results to return (1–100).
- offset(optional number): Number of results to skip for pagination.

Sign up for aMarvel Developer APIaccount and get your public and private API keys.

If you want to run it directly in an MCP host, jump to theUse with Claude DesktoporUse with GitHub Copilotsections.

Run the Server Locally with MCP Inspector

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

git clone https://github.com/DanWahlin/marvel-mcp

Add your Marvel API public and private keys to the.envfile.

MARVEL_PUBLIC_KEY=YOUR_PUBLIC_KEY MARVEL_PRIVATE_KEY=YOUR_PRIVATE_KEY MARVEL_API_BASE=https://gateway.marvel.com/v1/public

Install the required dependencies and build the project.

(Optional) To try out the server using MCP Inspector run the following command:

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

Visit the MCP Inspector URL shown in the console in your browser. ChangeArgumentstodist/index.jsand selectConnect. SelectList Toolsto see the available tools.

Add the following to yourclaude_desktop_config.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" } } } }

To install Marvel MCP Server for Claude Desktop automatically viaSmithery:

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

Note: If you already have the MCP server enabled with Claude Desktop, addchat.mcp.discovery.enabled: truein 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.jsonfile if you only want it available in this repo (you can use MCP: Add Server from the command palette and select Global or Workspace):

"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" } } } }

-

Now that the mcp server is discoverable, open GitHub Copilot and select theAgentmode (notAskorEdits).

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

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

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.

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

Access real-time entertainment data and personal viewing history from the Trakt.tv API.

Search for movies and manage playlists on your Plex Media Server using the Plex API.

Integrates with The Movie Database (TMDB) API, allowing AI assistants to search for movies, retrieve details, and generate related content.

Interact with Cloudinary's media management platform using natural language.

Dacast MCP Live Stream Server connects your AI tools to Dacast’s live streaming and video hosting APIs, so you can create and manage live streams, playlists, thumbnails, and simulcasts using simple natural-language prompts.

Provides real-time medical and medication information using the openFDA API.

Provides healthcare tools for interacting with FHIR resources on Google Cloud Healthcare API and public medical research APIs like PubMed.

Interact with the Kaggle API to access datasets, notebooks, and competitions.

A server for performing secure, read-only operations on the Kaltura API.

Control Spotify playback and manage your liked songs using LLMs.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.