Back to MCP directory
publicPublicdnsLocal runtime

Marvel MCP

一个基于Marvel开发者API的MCP服务器项目,提供角色与漫画数据交互功能。

article

README

🚀 《Marvel MCP Server 配置指南》 中文版

本指南将详细介绍如何安装、配置和使用 Marvel MCP Server,帮助你轻松接入 Marvel API 进行相关开发。

🚀 快速开始

📦 安装与运行 Marvel MCP Server

使用 npm 运行

在终端中执行以下命令进行安装和构建:

npm install
npm run build

完成后,启动服务:

npx @modelcontextprotocol/inspector node build/index.js

打开浏览器访问控制台显示的 MCP 检查工具链接。

直接运行构建文件(可选)

如果你已经完成了构建步骤,可以直接运行:

npm run build

✨ 主要特性

本项目提供了便捷的方式来配置和使用 Marvel MCP Server,支持在不同的开发环境(如 Claude Desktop、VS Code)中进行配置,并且可以在 GitHub Copilot 中使用相关工具来查询 Marvel 角色和漫画信息。

📦 安装指南

配置 MCP 服务器

在 Claude Desktop 中配置

claude_desktop_config.json 文件中添加以下内容:

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

在 VS Code 中配置(针对 GitHub Copilot)

.vscode/mcp.json 文件中添加以下内容:

{
  "inputs": [],
  "servers": {
    "marvel-mcp": {
      "command": "npx",
      "args": [
        "-y", 
        "@codewithdan/marvel-mcp"
      ],
      "env": {
        "MARVEL_PUBLIC_KEY": "YOUR_PUBLIC_KEY",
        "MARVEL_PRIVATE_KEY": "YOUR_PRIVATE_KEY",
        "MARVEL_API_BASE": "https://gateway.marvel.com/v1/public"
      }
    }
  }
}

或者在用户设置中添加:

"mcp": {
  "servers": {
    "marvel-mcp": {
      "command": "npx",
      "args": [
        "-y", 
        "@codewithdan/marvel-mcp"
      ],
      "env": {
        "MARVEL_PUBLIC_KEY": "YOUR_PUBLIC_KEY", 
        "MARVEL_PRIVATE_KEY": "YOUR_PRIVATE_KEY",
        "MARVEL_API_BASE": "https://gateway.marvel.com/v1/public"
      }
    },
  }
}

安装工具(可选)

使用 Smithery CLI 安装:

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

💻 使用示例

在 GitHub Copilot 中使用

  1. 打开 VS Code 的 Insider 版本。
  2. 启用 Agent 模式(而非 Ask 或 Edits)。
  3. 点击输入框右侧的刷新按钮更新可用工具列表。
  4. 输入问题,例如:
列出 10 个 Marvel 角色。

Wolverine 出现在哪些漫画中?

给我一些反派角色的信息。

哪些角色出现在复仇者联盟漫画里?

Hedge Knight II: Sworn Sword (2007) 这本漫画有哪些人物?

列出蚁人漫画中的 10 个角色。

注意事项

⚠️ 重要提示

如果出现 "响应被 Responsible AI Service 过滤" 的提示,请重新提问或调整措辞。

🔧 技术细节

环境变量配置

请将以下信息替换为你的 Marvel API 密钥:

  • MARVEL_PUBLIC_KEY:公开访问密钥。
  • MARVEL_PRIVATE_KEY:私有访问密钥。 这些密钥可从 Marvel API 官网 获取。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client