Back to MCP directory
publicPublicdnsLocal runtime

tmdb-mcp-server

一个基于MCP协议的TMDB电影数据库查询服务

article

README

🚀 TMDB MCP 服务器

TMDB MCP 服务器是一个用于访问电影数据库(TMDB)API 的模型上下文协议(MCP)服务器。借助该服务器,AI 助手可通过 MCP 接口轻松搜索和检索电影信息,为电影信息的获取提供了便捷途径。

🚀 快速开始

TMDB MCP 服务器允许 AI 助手通过 MCP 接口与 TMDB API 进行交互,从而实现电影信息的搜索与检索。下面将为你详细介绍使用该服务器的具体步骤。

✨ 主要特性

  • 🔍 支持根据标题、年份和其他标准搜索电影,满足多样化的搜索需求。
  • 📋 能够获取详细的电影信息,为用户提供全面的电影数据。
  • 🤝 可与兼容的 AI 助手轻松集成,实现无缝对接。

📦 安装指南

先决条件

  • Node.js 版本需 >= 18。
  • 你需要从 TMDB 获取 TMDB API 密钥。

安装步骤

  1. 克隆仓库:
git clone https://github.com/rakeshgangwar/tmdb-mcp-server.git
cd tmdb-mcp-server
  1. 安装依赖项:
npm install
  1. 构建服务器:
npm run build

📚 详细文档

配置

你需要在 MCP 设置文件(通常为 cline_mcp_settings.json)中对 TMDB 服务器进行配置:

{
  "mcpServers": {
    "tmdb": {
      "command": "node",
      "args": ["/path/to/tmdb-mcp-server/dist/index.js"],
      "env": {
        "TMDB_API_KEY": "your-api-key-here"
      },
      "disabled": false,
      "autoApprove": []
    }
  }
}

请将 your-api-key-here 替换为你实际的 TMDB API 密钥,并将 /path/to/ 替换为你实际的路径。

可用工具

search_movies

此工具可使用 The Movie Database API 搜索电影。

  • 参数说明

    • query(必需):搜索查询字符串,用于指定搜索的关键词。
    • year(可选):筛选年份,可根据电影的上映年份进行筛选。
    • page(可选):页码,默认值为 1,用于分页显示搜索结果。
  • 示例

{
  "query": "Inception",
  "year": 2010,
  "page": 1
}

开发

如果你想对项目进行开发和修改,可按以下步骤操作:

  1. src 目录下进行代码更改。
  2. 构建项目:
npm run build
  1. 通过配置 MCP 服务器在你的设置中测试更改。

贡献

如果你想为该项目做出贡献,可按照以下步骤进行:

  1. 叉出仓库。
  2. 创建功能分支:
git checkout -b feature/amazing-feature
  1. 提交更改:
git commit -am 'Add some amazing feature'
  1. 推送到分支:
git push origin feature/amazing-feature
  1. 打开 Pull Request。

📄 许可证

该项目在 MIT 许可证下发布,你可以参阅 LICENSE 文件以获取详细信息。

致谢

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