Token导航 LogoToken导航TokenDH.com
MCP Podcast Generator logo
音视频未说明官方级别未说明来源级核验

MCP Podcast Generator

MCP Server

一个基于MCP协议的服务器,通过脚本生成播客音频,支持单人和双人对话格式,并提供音频处理和导出功能。

工具数

1

提示词数

0

GitHub Stars

0

资源数

0
语音音频DockerClaude音频处理Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ivo-toby

提供方

ivo-toby

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

mcp播客生成器

从脚本生成播客音频的MCP(模型上下文协议)服务器。它在Docker中运行,公开一个HTTP端点,并提供 generate_podcast 该工具:

  • 使用将脚本转换为语音 谷歌双子座TTS (gemini-2.5-flash-preview-tts)
  • 支持 单一主机 独白和 双主机 对话格式
  • 可选择添加 介绍/旁白音乐 从任何HTTPS URL(Cloudflare R2、S3等)获取
  • 适用于 EBU R128响度归一化 通过FFmpeg
  • 输出最终结果 MP3文件 到映射的卷 /output 文件夹

入门指南

先决条件

  • 码头工人Docker Compose 已安装()
  • A. Google AI Studio API密钥 可以访问Gemini模型(在这里买一个)
  • (可选)托管在任何HTTPS URL(Cloudflare R2、S3等)上的介绍/扩展MP3

1.克隆和配置

git clone https://github.com/ivo-toby/mcp-podcast-generator.git
cd mcp-podcast-generator

cp .env.example .env

打开 .env 并设置您的API密钥:

GOOGLE_API_KEY=your_api_key_here

2.创建输出目录

MP3文件被写入 ./output 在主机上(映射到 /output 容器内):

mkdir -p output

3.启动服务器

docker compose up

第一次运行构建Docker镜像(几分钟)。成功后,你会看到:

mcp-podcast-generator  | MCP Podcast Generator listening on port 3000

要在后台运行(分离):

docker compose up -d

4.验证它是否正在运行

curl http://localhost:3000/health
# → {"status":"ok"}

常见Docker操作

# View logs (follow mode)
docker compose logs -f

# Stop the server
docker compose down

# Rebuild the image after code changes
docker compose up --build

# Remove containers and volumes (full reset)
docker compose down -v

5.生成你的第一个播客

curl -s -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "generate_podcast",
      "arguments": {
        "type": "single",
        "hosts": [{ "name": "Host", "voice": "Kore" }],
        "segments": [
          { "text": "Welcome to my first AI-generated podcast episode." },
          { "text": "Today we explore how easy it is to turn a script into audio." },
          { "text": "Thanks for listening. See you next time!" }
        ],
        "outputFilename": "first-episode.mp3"
      }
    }
  }' | jq .

成功后,您将返回输出路径和持续时间:

{
  "success": true,
  "outputPath": "/output/first-episode.mp3",
  "durationSeconds": 18.4,
  "downloadUrl": "http://localhost:3000/output/first-episode.mp3"
}

您的MP3可在 http://localhost:3000/output/first-episode.mp3 在磁盘上 ./output/first-episode.mp3.

6.安装在克劳德桌面(可选)

在容器运行的情况下,将服务器添加到Claude Desktop的MCP配置中。

查找您的配置文件:

操作系统路径
macOS~/Library/Application Support/Claude/claude_desktop_config.json
窗户%APPDATA%\Claude\claude_desktop_config.json
Linux~/.config/Claude/claude_desktop_config.json

添加服务器:

{
  "mcpServers": {
    "podcast-generator": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:3000/mcp"]
    }
  }
}

Claude Desktop不直接支持流式HTTP-- mcp-remote 桥接连接。 npx 将在首次运行时自动下载。

如果您已经配置了其他MCP服务器,请添加 podcast-generator 在现有的 mcpServers 对象。

重新启动克劳德桌面。generate_podcast 工具将出现在工具面板中。现在,您可以要求Claude直接生成播客:

*“使用Alex(Charon)和Sam(Aoede)制作一个关于开源未来的5分钟双主持人播客,并配有来自https://podcast.briefcast.online/assets/music/intro.mp3,并将其另存为开源ep1.mp3“*

Claude将调用该工具,并在完成后返回输出路径。

环境变量

变量必填默认描述
GOOGLE_API_KEYGoogle AI Studio API密钥(在这里买一个)
OUTPUT_DIR/output写入MP3文件的目录
TEMP_DIR/tmp/podcast-gen临时处理目录
PORT3000HTTP服务器端口
PUBLIC_URLhttp://localhost:3000用于构建工具返回的下载链接的基本URL。在反向代理或远程服务器上运行时,将其设置为公共主机名。

MCP端点

发布 /mcp --可流式HTTP传输(JSON-RPC 2.0)

获取 /health --健康检查,退货 { "status": "ok" }

工具: generate_podcast

输入模式

{
  // "single" = one host monologue, "dual" = two-host dialogue
  type: "single" | "dual";

  // Host configurations (1 for single, exactly 2 for dual)
  hosts: Array;

  // Script segments
  segments: Array;

  // Output filename (written to OUTPUT_DIR)
  outputFilename: string;  // e.g. "episode-2026-04-02.mp3"

  // Optional music (any HTTPS URL: R2, S3, etc.)
  introMusicUrl?: string;
  outroMusicUrl?: string;

  // Audio processing options
  fadeInDuration?: number;   // seconds, default 2
  fadeOutDuration?: number;  // seconds, default 3
  targetLufs?: number;       // LUFS target, default -16
}

输出

{
  "success": true,
  "outputPath": "/output/episode-2026-04-02.mp3",
  "durationSeconds": 245.3,
  "downloadUrl": "http://localhost:3000/output/episode-2026-04-02.mp3"
}

可用的双子座声音

声音角色
Aoede温暖,讲故事
Charon深度、权威
Fenrir大胆、充满活力
Kore清晰、专业
Puck明亮、健谈
Orbit光滑,测量
Perseus自信、直接
Tethys冷静、体贴
Vega动感、富有表现力
Zubenelgenubi与众不同,令人难忘

MCP呼叫示例

单主机

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_podcast",
    "arguments": {
      "type": "single",
      "hosts": [{ "name": "Alex", "voice": "Charon" }],
      "segments": [
        { "text": "Welcome to Tech Weekly, your daily dose of AI news." },
        { "text": "Today we're covering the latest developments in language models." },
        { "text": "That's all for today. Thanks for listening!" }
      ],
      "outputFilename": "episode-2026-04-02.mp3",
      "introMusicUrl": "https://your-bucket.r2.dev/intro.mp3",
      "outroMusicUrl": "https://your-bucket.r2.dev/outro.mp3"
    }
  }
}

双主机

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "generate_podcast",
    "arguments": {
      "type": "dual",
      "hosts": [
        { "name": "Alex", "voice": "Charon" },
        { "name": "Sam",  "voice": "Puck"   }
      ],
      "segments": [
        { "speaker": "Alex", "text": "Welcome back to the show! I'm Alex." },
        { "speaker": "Sam",  "text": "And I'm Sam. Today we're talking about MCP servers." },
        { "speaker": "Alex", "text": "It's a fascinating topic. Let's dive in." },
        { "speaker": "Sam",  "text": "Absolutely. Thanks everyone for listening!" }
      ],
      "outputFilename": "episode-dual-2026-04-02.mp3",
      "introMusicUrl": "https://your-bucket.r2.dev/intro.mp3",
      "outroMusicUrl": "https://your-bucket.r2.dev/outro.mp3",
      "fadeInDuration": 3,
      "fadeOutDuration": 4,
      "targetLufs": -16
    }
  }
}

curl示例

curl -X POST http://localhost:3000/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/call",
    "params": {
      "name": "generate_podcast",
      "arguments": {
        "type": "single",
        "hosts": [{ "name": "Host", "voice": "Kore" }],
        "segments": [{ "text": "Hello world, this is a test podcast episode." }],
        "outputFilename": "test.mp3"
      }
    }
  }'

音频管道

Input Script
     │
     ▼
Gemini TTS (gemini-2.5-flash-preview-tts)
     │  PCM 24kHz 16-bit mono (base64)
     ▼
FFmpeg: PCM → MP3 (192kbps libmp3lame)
     │
     ▼
EBU R128 Normalization (two-pass, target: -16 LUFS)
     │
     ├── [intro music URL] → download → fade-in
     │
     ├── TTS audio (normalized)
     │
     └── [outro music URL] → download → fade-out
          │
          ▼
     FFmpeg concat (re-encoded, avoids frame boundary issues)
          │
          ▼
     Final EBU R128 normalization pass
          │
          ▼
     /output/episode.mp3

与MCP客户端一起使用

添加到MCP客户端配置中:

{
  "mcpServers": {
    "podcast-generator": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:3000/mcp"]
    }
  }
}

发展

npm install
npm run dev   # runs tsx src/index.ts directly

需要 ffmpegffprobe 本地安装用于开发。

相关

  • 简报 --使用此服务器进行音频生成的完整播客管道

目录标签

目录标签

语音音频DockerClaude音频处理文本转语音TypeScript本地部署播客制作MCP协议Docker部署

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

1

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP