# 微软Edge文本转语音MCP服务器
## 基本信息
- Slug: `yuiseki-edge_tts_mcp_server`
- Source: modelscope
- Publisher: @yuiseki/edge_tts_mcp_server
- Categories: text-to-speech / multimedia-processing
- Hosted: No
- License: Unknown
- Source URL: https://www.modelscope.cn/mcp/servers/@yuiseki/edge_tts_mcp_server
## 简介
一个模型上下文协议服务器，为使用微软Edge文本转语音技术的AI代理提供文本转语音功能，支持多种声音、语言和语音定制。
## 安装提示

```bash
pip install "edge_tts_mcp_server"
```

## MCP Server 详情

# Edge-TTS MCP Server

Model Context Protocol (MCP) 服务器，利用 Microsoft Edge 的文本朗读功能提供 AI 代理的语音合成服务。

## 概要

此 MCP 服务器使用 [edge-tts](https://github.com/rany2/edge-tts) 库提供了从文本到语音的转换功能。它被设计为一个工具，使 AI 代理能够以自然的声音作出响应。

## 功能

- 文本转语音
- 支持多种声音和语言
- 调整语音速度和音调
- 语音数据流传输

## 安装

```bash
pip install "edge_tts_mcp_server"
```


或者在开发模式下安装：

```bash
git clone https://github.com/yuiseki/edge_tts_mcp_server.git
cd edge_tts_mcp_server
pip install -e .
```


## 使用方法

### VS Code 中的配置示例

在 VS Code 的 settings.json 文件中进行设置的例子：

```json
"mcp": {
  "servers": {
    "edge-tts": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\Users\\__username__\\src\\edge_tts_mcp_server\\src\\edge_tts_mcp_server",
        "run",
        "server.py"
      ]
    }
  }
}
```


### 在 MCP Inspector 中使用

作为标准的 MCP 服务器运行：

```bash
mcp dev server.py
```


### 使用 uvx（uvicorn）运行

当作为 FastAPI 基础的服务器通过 uv 运行时：

```bash
uv --directory path/to/edge_tts_mcp_server/src/edge_tts_mcp_server run server.py
```


命令行选项：

```bash
edge-tts-mcp --host 0.0.0.0 --port 8080 --reload
```


## API 端点

在 FastAPI 模式下运行时，可以使用以下端点：

- `/` - API 信息
- `/health` - 健康检查
- `/voices` - 可用声音列表（可选地通过 `?locale=ja-JP` 等参数过滤）
- `/mcp` - MCP API 端点

## 许可证

MIT

