Tvmaze Mcp Server

io.github.cyanheads由 GitHub 帳號 cyanheads 發布v0.3.0更新於 Oct 24, 2026

TVmaze shows, people, next episodes in your timezone, episode guides, schedules, and credits.

已驗證Streamable HTTP可網頁執行網頁搜尋與抓取媒體與設計

概覽

AI 產生的概覽

TVmaze MCP 伺服器,讓助理搜尋電視節目與人物、依指定時區查詢下一集播出時間,並瀏覽集數清單、每日節目表與演職員資料。

可以做什麼
  • 依標題模糊搜尋節目,或以 IMDb、TheTVDB、TVRage 編號反查節目
  • 取得節目完整資料、每週播出時段、季別清單以及上一集與下一集
  • 依編號或標題查詢下一集播出時間,並換算成觀眾所在時區
  • 依季別、依播出日期或整部節目列出集數
  • 依日期列出當天播出的集數,涵蓋無線、有線與串流,可依國家與頻道篩選
  • 列出節目主演與劇組,或單集客串演員,並搜尋人物查看其作品
適用情境
適合需要查詢某部節目資料、了解下一集在自己時區的播出時間、查看某晚播出了什麼,或追溯某位演員作品時使用。它只做唯讀的電視資料查詢,不是追劇紀錄或行事曆工具。
執行需求
可使用公開託管的 Streamable HTTP 端點,或在本地透過 npx/bunx 或 Docker 執行;本地執行需 Node.js v24+ 或 Bun v1.4.0+。不需 TVmaze 帳號或 API 金鑰。可選變數用於設定預設值:TVMAZE_DEFAULT_TIMEZONE(UTC)與 TVMAZE_DEFAULT_COUNTRY(US);HTTP 託管涉及 MCP_HTTP_PORT 與 MCP_AUTH_MODE。需要能連線至 TVmaze API 的網路。
安裝前請注意
所有工具皆為唯讀查詢,不會寫入資料或代使用者送出內容。資料來自 TVmaze,採 CC BY-SA 授權,須保留署名與 url 欄位,改作須以相同授權分享。上游快取 60 分鐘,節目表異動可能延遲。自行以 HTTP 託管時 MCP_AUTH_MODE 預設為 none,對外開放前應設為 jwt 或 oauth。LOG_TOOL_FAILURE_PAYLOADS 可能記錄失敗呼叫的參數。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tvmaze Mcp Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.cyanheads%2Ftvmaze-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "tvmaze": {
      "type": "http",
      "url": "https://tvmaze.caseyjhand.com/mcp"
    }
  }
}

README

@cyanheads/tvmaze-mcp-server

Search TVmaze shows and people, next episodes in your timezone, episode guides, daily schedules, and credits via MCP. STDIO or Streamable HTTP.

8 Tools

Public Hosted Server: https://tvmaze.caseyjhand.com/mcp


Overview

TV data from TVmaze: shows, episode guides, cast, and air times. Find a show by title or IMDb/TheTVDB id, see when the next episode airs in your timezone, or check what aired and streamed on any date. No API key required.

Tools

ToolDescription
tvmaze_search_showsFuzzy title search returning up to 10 shows with channel, status, genres, rating, and external catalog ids
tvmaze_get_showFull profile for one TVmaze id — weekly slot, season list, and the previous and next episode
tvmaze_lookup_showResolve a show from its IMDb, TheTVDB, or TVRage id into the matching TVmaze profile
tvmaze_get_next_episodeWhen a show's next episode airs, by TVmaze id or title, converted to a viewer timezone
tvmaze_get_episodesEpisode guide for one season, one air date, or the whole run, with air times, runtimes, and synopses
tvmaze_get_scheduleEpisodes airing on a date — broadcast and cable networks in one country, streaming services, or both
tvmaze_get_castA show's credited cast and the characters they play, optionally crew; or one episode's guest cast, optionally with its director and writers
tvmaze_get_personSearch person names for candidates, or page one person's cast, guest, or crew credits

Capability reference

tvmaze_search_shows tool

  • Fuzzy-matches query against every show title, so minor misspellings still resolve; blank titles are rejected
  • Returns at most 10 shows with no pagination; output reports shown / cap and points a full or empty result to a narrower title or tvmaze_lookup_show
  • Rows carry the shared show summary plus match_score, comparable only within one result set

tvmaze_get_show tool

  • show_id from tvmaze_search_shows, tvmaze_lookup_show, or a schedule row; optional IANA timezone for episode times
  • Returns the full profile (schedule_days / schedule_time, optional schedule_timezone, official_site, externals) with every season plus next_episode / previous_episode. A Running show with nothing announced comes back with a notice pointing at previous_episode
  • An unknown show_id fails as show_not_found

tvmaze_lookup_show tool

  • source is imdb (a tt id), thetvdb, or tvrage (defunct, present only in older records), paired with external_id
  • IMDb ids also accept bare digits, uppercase TT, and imdb.com title URLs
  • A show absent from TVmaze is a result, not an error: found: false plus guidance routing to tvmaze_search_shows. A hit echoes source and external_id and returns the same show summary as search

tvmaze_get_next_episode tool

  • by: "id" takes a TVmaze id; by: "title" resolves a non-blank title through a stricter single-match search than tvmaze_search_shows
  • Air times render in the requested IANA timezone; time_known: false means no clock time was announced, so only the date is reliable
  • Misses carry a typed miss_reason: show_not_found (title) or no_scheduled_episode (between seasons, with previous_episode). A show_id that resolves to nothing throws show_not_found_by_id

tvmaze_get_episodes tool

  • season lists one season; air_date (YYYY-MM-DD) lists one day's episodes; omit both for the whole run. They cannot be combined. An empty day returns an empty list with a notice, an impossible date fails as invalid_date, and season_not_found names the seasons that exist
  • air_date matches the source's airdate, which can differ by a day from an episode's local_date on late-night slots
  • include_specials defaults to false, and each listing reports how many specials it filtered out. limit (default 50, max 250) sets page size; next_cursor / has_more continue the listing and totalCount counts before paging

tvmaze_get_schedule tool

  • scope picks the feed: linear is one country's broadcast and cable networks plus its own streaming services, streaming is global services when country is omitted and that country's local ones when given, all merges both
  • date defaults to today in the requested timezone; country is ISO 3166-1 alpha-2 (the United Kingdom is GB) and falls back to the configured default for linear and all; optional channel filters by exact, case-insensitive channel name; limit defaults to 50 (max 250)
  • Entries carry feed (linear / streaming) and a compact show reference (tvmaze_get_show returns the full profile). applied_feeds names the feeds that answered, e.g. ["linear:GB","web:GB","web:global"]; one failing feed degrades to a notice instead of failing the call

tvmaze_get_cast tool

  • scope: "show" returns the main cast with character names; scope: "episode" returns that episode's guest cast. include_crew adds the show's crew, or the episode's guest crew (director, writers)
  • Optional name filters by substring of performer, character, or crew role (crew only with include_crew: true). Paged with limit (default 50, max 250) and cursor; cast_total / crew_total count all matching credits
  • Cast credits carry as_self and voice_only; crew credits carry credit_type and no character. A show's cast list does not separate recurring from guest performers, so check an episode's guest cast. Missing credits arrive as a notice, not an error

tvmaze_get_person tool

  • Supply exactly one of query (name search) or person_id (from cast credits or a candidate). Search returns compact candidates with source scores and never picks one for you; ten candidates may mean the source cap, so narrow the name
  • A person_id returns the person and one credit_kind: cast (default), guest, or crew; limit (default 50, max 250) and cursor apply only here. Guest episode_id chains to tvmaze_get_cast; show_id chains to tvmaze_get_show or tvmaze_get_episodes
  • No candidates or credits is an empty success; a missing id is person_not_found

Features

Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.

TVmaze-specific:

  • Keyless — no account, no API key, and every tool works on a fresh install with nothing configured
  • Requests are paced under TVmaze's per-IP limit, back off on 429 (honoring Retry-After), and are cached in-process
  • Air times are computed from airstamp alone, since airdate / airtime can be a full day off on overnight slots
  • Community-authored HTML summaries are stripped to plain text

Agent-friendly output:

  • No fabricated clock times: a record with no announced time reports time_known: false and a date only, and absent fields render as Not available rather than 0 or ""
  • Typed errors on every tool, each with a reason and a recovery hint
  • Resolution misses are results: tvmaze_lookup_show and the title arm of tvmaze_get_next_episode return found: false with guidance for the next call
  • Output states what a call covered: the echoed query, applied_feeds, pre-page totals, and truncation against the source's caps

Data and licensing

Data comes from TVmaze and is licensed CC BY-SA. Credit TVmaze as the source and keep the url field that every show, episode, and person record carries — linking back is what satisfies attribution. Under ShareAlike, an adaptation of this data must be shared under the same licence.

TVmaze rate-limits to at least 20 calls every 10 seconds per IP address and answers a burst past that with HTTP 429; the server paces itself under that budget and backs off when one arrives. Upstream caches its output for 60 minutes, so a schedule change or a newly announced episode can take up to an hour to appear; the local response cache (TVMAZE_CACHE_TTL_S, default 300 s) sits well inside that window.

Getting started

Public Hosted Instance

A public instance is available at https://tvmaze.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:

json
{  "mcpServers": {    "tvmaze-mcp-server": {      "type": "streamable-http",      "url": "https://tvmaze.caseyjhand.com/mcp"    }  }}

Self-Hosted / Local

Add the following to your MCP client configuration file. No API key is required.

json
{  "mcpServers": {    "tvmaze-mcp-server": {      "type": "stdio",      "command": "bunx",      "args": ["@cyanheads/tvmaze-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with npx (no Bun required):

json
{  "mcpServers": {    "tvmaze-mcp-server": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@cyanheads/tvmaze-mcp-server@latest"],      "env": {        "MCP_TRANSPORT_TYPE": "stdio",        "MCP_LOG_LEVEL": "info"      }    }  }}

Or with Docker:

json
{  "mcpServers": {    "tvmaze-mcp-server": {      "type": "stdio",      "command": "docker",      "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/tvmaze-mcp-server:latest"]    }  }}

For Streamable HTTP, set the transport and start the server:

sh
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http# Server listens at http://localhost:3010/mcp

Prerequisites

  • Bun v1.4.0 or higher (or Node.js v24+).
  • No TVmaze account or API key. Set TVMAZE_DEFAULT_TIMEZONE and TVMAZE_DEFAULT_COUNTRY once if the calls should default to somewhere other than UTC and the US.

Installation

  1. Clone the repository:
sh
git clone https://github.com/cyanheads/tvmaze-mcp-server.git
  1. Navigate into the directory:
sh
cd tvmaze-mcp-server
  1. Install dependencies:
sh
bun install
  1. Configure environment (optional):
sh
cp .env.example .env# every variable is optional — edit only what you want to override

Configuration

VariableDescriptionDefault
TVMAZE_BASE_URLTVmaze API base URL. Override to point at an enterprise endpoint.https://api.tvmaze.com
TVMAZE_USER_AGENTUser-Agent sent on every upstream request; TVmaze asks that clients identify themselves.server name, version, and repository URL
TVMAZE_DEFAULT_TIMEZONEIANA timezone used when a tool call omits timezone.UTC
TVMAZE_DEFAULT_COUNTRYISO 3166-1 alpha-2 country used for tvmaze_get_schedule scopes linear and all when country is omitted.US
TVMAZE_CACHE_TTL_SSeconds to hold an upstream response in the in-process cache. 0 disables caching.300
TVMAZE_MAX_CONCURRENCYConcurrent upstream requests (1–16).4
TVMAZE_REQUEST_TIMEOUT_MSPer-request timeout in milliseconds (1000–120000).10000
MCP_TRANSPORT_TYPETransport: stdio or http.stdio
MCP_HTTP_PORTPort for the HTTP server.3010
MCP_HTTP_ENDPOINT_PATHPath the MCP server is mounted at./mcp
MCP_SESSION_MODEHTTP session mode; this server is always stateless.stateless
MCP_AUTH_MODEAuth mode: none, jwt, or oauth.none
MCP_LOG_LEVELLog level (RFC 5424).info
LOGS_DIRDirectory for log files (Node.js only).<project-root>/logs
LOG_TOOL_FAILURE_PAYLOADSLog a failed tool call's arguments and result (key-name redaction only).false
STORAGE_PROVIDER_TYPEStorage backend.in-memory
OTEL_ENABLEDEnable OpenTelemetry instrumentation (spans, metrics, completion logs).false

See .env.example for the full list of optional overrides.

Running the server

Local development

  • Build and run:

    sh
    # One-time buildbun run rebuild
    # Run the built serverbun run start:stdio# orbun run start:http
  • Run checks and tests:

    sh
    bun run devcheck   # Lint, format, typecheck, securitybun run test       # Vitest test suitebun run lint:mcp   # Validate MCP definitions against spec

Docker

sh
docker build -t tvmaze-mcp-server .docker run --rm -p 3010:3010 tvmaze-mcp-server

The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/tvmaze-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.

Project structure

DirectoryPurpose
src/index.tscreateApp() entry point — registers the eight tools, server instructions, and the service lifecycle.
src/configServer-specific environment variable parsing and validation with Zod.
src/mcp-server/toolsTool definitions (*.tool.ts) and the output schemas they share.
src/services/tvmazeTVmaze REST client — pacing, retries, response cache, and normalization into the domain types.
tests/Unit and integration tests mirroring src/.
docs/Design document and the generated project tree.

Development guide

See CLAUDE.md/AGENTS.md for development guidelines and architectural rules. The short version:

  • Handlers throw, framework catches — no try/catch in tool logic
  • Use ctx.log for request-scoped logging; every upstream call goes through TvmazeService, never fetch from a handler
  • Register new tools in the createApp() arrays in src/index.ts
  • Keep the upstream boundary in the service: validate raw → normalize to the domain type → return the output schema, and never fabricate a missing field — an absent air time stays absent

Contributing

Issues are welcome. Run checks and tests before submitting:

sh
bun run devcheckbun run test

License

Apache-2.0 — see LICENSE for details.

來源:README.md,提交 9aeb5ce

工具

8

tvmaze_search_shows

Tvmaze Search Shows

Search television shows by title and return up to 10 matches, each with its network or streaming service, production status, genres, rating, and ids in other catalogs. Matching is fuzzy, so small typos still resolve. The result set is hard-capped at 10 by the source and cannot be paged — narrow the title to reach an eleventh match. To go the other way, from an IMDb or TheTVDB id to a show, use tvmaze_lookup_show.

輸入參數query必填

tvmaze_get_show

Tvmaze Get Show

Fetch a television show by its TVmaze id: full profile, weekly broadcast slot, season list, and the previous and next episode when the source has them. This is the entry point for an id returned by tvmaze_search_shows or tvmaze_lookup_show. For the episode list itself use tvmaze_get_episodes, and for credits use tvmaze_get_cast.

輸入參數show_id必填timezone

tvmaze_lookup_show

Tvmaze Lookup Show

Resolve a television show from its id in another catalog — IMDb, TheTVDB, or TVRage — and return the matching TVmaze profile. Use this to cross a show id from another source into TVmaze. A show absent from TVmaze is reported as a miss with guidance, not an error.

無需輸入參數。

tvmaze_get_next_episode

Tvmaze Get Next Episode

Report when a show’s next episode airs, converted to a viewer timezone. Accepts a TVmaze id or a show title — a title is resolved with a stricter single-match search than tvmaze_search_shows uses. A show with no scheduled next episode is reported as a miss carrying its most recent episode, which is the normal state for a series between seasons.

無需輸入參數。

tvmaze_get_episodes

Tvmaze Get Episodes

List a show’s episodes with air times, runtimes, and synopses. Pass a season number to list one season, which is the cheaper path and the usual one; pass air_date to list the episodes dated to one day, the direct path to a single night of a daily show; omit both to walk the whole run, which is paged because a long-running series returns hundreds of episodes. Specials are excluded unless include_specials is set, and the number left out is reported.

輸入參數limitcursorseasonshow_id必填air_datetimezoneinclude_specials

tvmaze_get_schedule

Tvmaze Get Schedule

List television episodes airing on a given date. Scope "linear" covers broadcast and cable networks in one country; "streaming" covers streaming services — global services such as Netflix and Prime Video when no country is given, or that country’s local streaming services when one is. Scope "all" merges both. The source caches schedule data for up to an hour, so a same-day listing can lag a late change.

輸入參數datelimitscopecursorchannelcountrytimezone

tvmaze_get_cast

Tvmaze Get Cast

List the credited cast of a show with the characters they play, optionally with crew; or list the guest cast of one episode, optionally with its guest crew such as the director and writers. Results are paged: cast rows come first, then crew rows, and each page splits them back into cast and crew. The source records no recurring-versus-guest distinction on a show’s cast list, so a name’s absence from it does not mean the performer never appeared — check an episode’s guest cast for that.

無需輸入參數。

tvmaze_get_person

Get person

Search people by name to return candidates, then select a person_id to list their cast, guest, or crew credits. Name searches never select a person automatically. Credits preserve source order and page at 50 rows by default, up to 250 per call; show_id chains to tvmaze_get_show or tvmaze_get_episodes, and guest episode_id chains to tvmaze_get_cast with scope "episode".

輸入參數limitquerycursorperson_idcredit_kind

版本歷史

5
  1. v0.3.0最新Oct 16, 2026
  2. v0.2.1Oct 9, 2026
  3. v0.2.0Sep 23, 2026
  4. v0.1.2Sep 20, 2026
  5. v0.1.1Sep 20, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分