Skip to main content
Glama
AmeliaMiddleton

moviefinder-mcp

moviefinder-mcp

一个封装了 The Movie Database (TMDB) API 的 MCP 服务器。使用 @modelcontextprotocol/sdk 和 stdio 传输构建。

工具

工具

描述

search_movies

按标题搜索电影,可选 year 过滤器。

search_tv

按标题搜索电视节目。

get_movie_details

获取完整的电影详情,包括主要演员、导演和预告片。

get_recommendations

获取 TMDB 推荐的电影。

get_similar

获取与给定电影相似的电影。

get_trending

获取 dayweek 的热门 movie / tv / all 内容。

where_to_stream

获取电影的流媒体/租赁/购买提供商(默认国家为 US)。

discover_movies

按流派名称、最低评分、年份和排序方式发现电影。

所有工具均返回摘要后的 JSON(ID、标题、年份、概述、评分、海报 URL 等)——已剔除冗余的原始 TMDB 字段。

设置

1. 获取 TMDB API 令牌

  1. https://www.themoviedb.org/ 注册一个免费账户。

  2. 访问 https://www.themoviedb.org/settings/api 并复制 API Read Access Token (v4)。这是一个很长的 JWT —— 不是 v3 API 密钥。

2. 安装与构建

npm install
npm run build

3. 配置环境变量

.env.example 复制为 .env 并粘贴您的令牌:

cp .env.example .env
TMDB_API_KEY=eyJhbGciOi...your_v4_read_access_token...

4. 运行服务器

npm start

该服务器通过 stdio 进行 MCP 通信,旨在由 MCP 客户端(如 Claude Desktop)启动,而非交互式运行。

在 Claude Desktop 中注册

claude_desktop_config.json 中添加条目:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "moviefinder": {
      "command": "node",
      "args": ["/absolute/path/to/moviefinder-mcp/dist/index.js"],
      "env": {
        "TMDB_API_KEY": "eyJhbGciOi...your_v4_read_access_token..."
      }
    }
  }
}

编辑配置后重启 Claude Desktop。之后 moviefinder 工具将出现在任何对话中。

脚本

脚本

功能

npm run build

将 TypeScript 编译到 dist/

npm start

运行编译后的服务器 (node dist/index.js)。

npm run dev

TypeScript 监视模式。

错误处理

服务器针对常见的 TMDB 故障返回有用的消息:

  • 401 — 令牌缺失或密钥类型错误(必须是 v4 读取访问令牌)。

  • 404 — 请求的电影/资源不存在。

  • 429 — 速率限制;如果存在,将包含 Retry-After 值。

注意事项

  • 流派列表从 /genre/movie/list 获取一次并缓存在内存中。

  • 海报 URL 使用 https://image.tmdb.org/t/p/w500

  • 无数据库,无日志框架 —— 这是设计使然。

Install Server
F
license - not found
A
quality
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/AmeliaMiddleton/Php1mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server