IVOD MCP 服務設定指南

在 AI 助理中使用台灣立法院逐字稿搜尋服務

服務概述

MCP 服務端點

https://ivod.billy3321.tw/api/mcp

支援的功能

  • search_transcripts - 搜尋立法院逐字稿,支援立委姓名、委員會、關鍵字、日期範圍等條件
  • get_meeting_transcript - 根據 IVOD ID 取得完整會議逐字稿
  • 日誌記錄 - 支援客戶端日誌傳送與錯誤追蹤
  • 分頁查詢 - 大量結果自動分頁,支援游標式翻頁
C

Claude Desktop

1. 設定檔位置

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

2. 設定內容

{
  "mcpServers": {
    "ivod-transcript": {
      "command": "npx",
      "args": [
        "@modelcontextprotocol/server-fetch",
        "https://ivod.billy3321.tw/api/mcp"
      ]
    }
  }
}

3. 重啟 Claude Desktop

儲存設定檔後,重啟 Claude Desktop 應用程式即可使用 IVOD 搜尋功能。

G

ChatGPT (GPTs)

1. 創建自訂 GPT

在 ChatGPT 中創建新的 GPT,並使用以下設定:

{
  "name": "台灣立法院逐字稿搜尋",
  "description": "搜尋台灣立法院IVOD逐字稿資料的MCP服務",
  "schema_version": "v1",
  "capabilities": {
    "tools": true
  },
  "instructions": [
    "使用search_transcripts工具搜尋立法院逐字稿",
    "使用get_meeting_transcript工具取得完整會議內容",
    "優先使用ly_only參數獲得更精確的結果"
  ],
  "servers": [
    {
      "url": "https://ivod.billy3321.tw/api/mcp",
      "name": "ivod-mcp-server"
    }
  ]
}

2. Function Calling 設定

需要手動定義函數 schema,或使用 MCP Proxy 服務將 MCP 轉換為 OpenAI Function Calling 格式。

G

Google Gemini

1. MCP SDK 整合

使用 JavaScript/TypeScript 整合 MCP 客戶端:

import { MCPClient } from '@modelcontextprotocol/sdk';

const mcpClient = new MCPClient({
  serverUrl: "https://ivod.billy3321.tw/api/mcp",
  capabilities: ['tools']
});

// 初始化連接
await mcpClient.connect();

// 搜尋逐字稿
const searchResult = await mcpClient.callTool('search_transcripts', {
  speakers: ['沈伯洋'],
  query: '數位發展',
  transcription_source: 'ly_only'
});

2. Vertex AI Function Calling

也可以透過 Vertex AI 的 Function Calling 功能使用,需要轉換 MCP 格式為 Google Cloud Function 格式。

測試 MCP 連接

使用 cURL 測試

curl -X POST https://ivod.billy3321.tw/api/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list"
  }'

MCP Inspector 測試

使用官方 MCP Inspector 工具測試連接:

npx @modelcontextprotocol/inspector https://ivod.billy3321.tw/api/mcp

MCP 函數說明

search_transcripts

搜尋立法院逐字稿,支援多種搜尋條件組合使用

主要參數

  • query: 搜尋關鍵字(支援進階語法)
  • speakers: 立委姓名陣列
  • committees: 委員會名稱陣列
  • meeting_name: 會議名稱(模糊匹配)
  • date_from/date_to: 日期範圍
  • transcription_source: ly_only(推薦)或 all
  • max_results: 結果數量限制(1-50)

使用範例

搜尋立委發言:
speakers: ["沈伯洋"], query: "數位發展"
委員會會議:
committees: ["交通委員會"], query: "交通建設"
日期範圍:
date_from: "2024-01-01", date_to: "2024-12-31"

get_meeting_transcript

根據 IVOD ID 取得特定會議的完整逐字稿

參數

  • ivod_id: IVOD 會議 ID(必填)
  • transcript_type: 逐字稿類型
    • • auto - 自動選擇最佳版本
    • • ly_only - 僅立法院官方版本
    • • ai_only - 僅 AI 處理版本

使用範例

取得完整逐字稿:
ivod_id: 123456, transcript_type: "auto"
僅官方版本:
ivod_id: 123456, transcript_type: "ly_only"

注意事項與最佳實務

效能建議

  • • 使用 transcription_source: "ly_only" 獲得最精確的結果
  • • 搜尋立委發言時建議結合姓名和關鍵字條件
  • • 大量查詢時適當設定 max_results 限制
  • • 利用分頁功能處理大量結果集

資料特性

  • • 資料涵蓋台灣立法院各種會議類型
  • • 支援立委姓名、委員會、會議名稱的中文搜尋
  • • 提供搜尋片段和完整逐字稿兩種檢視模式
  • • 自動優先選擇立法院官方逐字稿版本

限制說明

  • • 單次搜尋結果上限為 50 筆
  • • 日期格式必須為 YYYY-MM-DD
  • • 部分較舊的會議可能只有 AI 處理版本
  • • 搜尋速度取決於條件複雜度和資料量

如有技術問題或建議,歡迎透過專案 GitHub 頁面回報問題

IVOD 逐字稿檢索系統

提供第11屆立法院會議逐字記錄搜尋服務

© 2025 IVOD 逐字稿檢索系統。本網站採用 MIT License 授權。
開發者: billy3321、Yutin