Skip to main content
Glama
uraoz

棒読みちゃんMCPサーバー (Node.js版)

by uraoz

read_text

Convert text to speech using Bouyomichan via MCP server, enabling adjustable voice types, volume, speed, and pitch for AI assistants.

Instructions

テキストを棒読みちゃんで読み上げます

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for read_text tool that invokes speakBouyomi and formats MCP response.
    async ({ text, voice = 0, volume = -1, speed = -1, tone = -1 }) => { const statusCode = await speakBouyomi(text, voice, volume, speed, tone); if (statusCode === 200) { return { content: [ { type: "text", text: `読み上げました` } ] }; } else { return { content: [ { type: "text", text: `読み上げに失敗しました。ステータスコード: ${statusCode}` } ], isError: true }; } }
  • Input schema for read_text tool using Zod validators.
    { text: z.string().describe("読み上げるテキスト"), voice: z.number().default(0).describe("音声の種類(0: 女性1、1: 男性1、2: 女性2、...)"), volume: z.number().default(-1).describe("音量(-1: デフォルト、0-100: 音量レベル)"), speed: z.number().default(-1).describe("速度(-1: デフォルト、50-200: 速度レベル)"), tone: z.number().default(-1).describe("音程(-1: デフォルト、50-200: 音程レベル)") },
  • src/index.ts:42-76 (registration)
    Registration of the read_text tool on the MCP server.
    server.tool( "read_text", "テキストを棒読みちゃんで読み上げます", { text: z.string().describe("読み上げるテキスト"), voice: z.number().default(0).describe("音声の種類(0: 女性1、1: 男性1、2: 女性2、...)"), volume: z.number().default(-1).describe("音量(-1: デフォルト、0-100: 音量レベル)"), speed: z.number().default(-1).describe("速度(-1: デフォルト、50-200: 速度レベル)"), tone: z.number().default(-1).describe("音程(-1: デフォルト、50-200: 音程レベル)") }, async ({ text, voice = 0, volume = -1, speed = -1, tone = -1 }) => { const statusCode = await speakBouyomi(text, voice, volume, speed, tone); if (statusCode === 200) { return { content: [ { type: "text", text: `読み上げました` } ] }; } else { return { content: [ { type: "text", text: `読み上げに失敗しました。ステータスコード: ${statusCode}` } ], isError: true }; } } );
  • Utility function to send text-to-speech request to localhost:50080/Talk via axios.
    async function speakBouyomi( text: string = 'ゆっくりしていってね', voice: number = 0, volume: number = -1, speed: number = -1, tone: number = -1 ): Promise<number> { try { const response = await axios.get('http://localhost:50080/Talk', { params: { text, voice, volume, speed, tone } }); return response.status; } catch (error) { console.error('棒読みちゃんへのリクエストに失敗しました:', error); return 500; } }

Other Tools

Related Tools

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/uraoz/bouyomichan-mcp-nodejs'

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