Sponsored by Deepsite.site

Cantonese.ai MCP Server

Created By
hhy-joseph6 months ago
Content

Cantonese.ai MCP Server

License: MIT

An MCP (Model Context Protocol) server that provides tools for text-to-speech and speech-to-text conversion using the cantonese.ai API. This server is designed to be run with mcp dev.


✨ Features

  • Text-to-Speech Tool: Convert Cantonese or English text into high-quality audio.
  • Speech-to-Text Tool: Transcribe an audio file into text.
  • Modern Tooling: Set up with uv for fast package management.
  • Easy Integration: Connects with any MCP-compatible client (e.g., an LLM agent).
  • Secure: Your cantonese.ai API key is handled securely as an environment variable.

🚀 Getting Started

Prerequisites

  • Python 3.8+
  • uv: We recommend using uv for Python package management.

Installation

  1. Clone the repository:
    git clone 
    cd cantonese-ai-mcp-server
    
  2. Create and activate a virtual environment:
    uv venv
    source .venv/bin/activate
    
  3. Install the dependencies: This project uses uv to sync dependencies from pyproject.toml.
    uv sync
    
  4. Set up your API Key: You'll need an API key from cantonese.ai. Export your API key as an environment variable. You can add this to your .bashrc or .zshrc file for persistence.
    export CANTONESE_AI_API_KEY="your-api-key-here"
    

Running the Server

Start the MCP development server using the following command. It will watch for changes in server.py and automatically reload.

uv run mcp dev server.py

You should see an output indicating that the server has started and is available, typically at http://127.0.0.1:6274.

OR

Running the Server and use in Claude Desktop

uv run server.py

Please view For Server Developers on how to set up connection with Cladue Desktop.

🛠️ Using the Tools

Once the server is running, it will expose two tools.

Tool: text_to_speech

Converts a string of text into an audio file.

Arguments:

-text (string, required): The text to be converted to speech. -voice (string, optional, default: "default"): The voice to use for the speech synthesis. -language (string, optional, default: "cantonese"): The language of the text. Can be "cantonese" or "english". -output_filename (string, required): The name of the file to save the audio to (e.g., output.mp3).

Example Invocation:

{
  "tool": "text_to_speech",
  "arguments": {
    "text": "你好世界",
    "output_filename": "hello_world.mp3"
  }
}

Successful Response:

{
  "success": true,
  "message": "Audio file saved as hello_world.mp3"
}

Tool: speech_to_text

Transcribes an audio file into text.

Arguments:

input_filename (string, required): The path to the local audio file to be transcribed (e.g., audio.wav).

Example Invocation:

{
  "tool": "speech_to_text",
  "arguments": {
    "input_filename": "audio.wav"
  }
}

Successful Response:

The tool will return a JSON object with the transcription details from the API.

{
  "success": true,
  "result": {
    "text": "你好世界",
    "confidence": 0.95,
    "language": "cantonese",
    "duration": 2.3,
    "timestamp": "2025-06-02T11:22:00Z"
  }
}

📜 License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Amap Maps高德地图官方 MCP Server
CursorThe AI Code Editor
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
ChatWiseThe second fastest AI chatbot™
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
DeepChatYour AI Partner on Desktop
WindsurfThe new purpose-built IDE to harness magic
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Playwright McpPlaywright MCP server