Fish Audio MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Fish Audio MCP Serversay 'こんにちは' in Japanese with Carol's voice"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Fish Audio MCP Server
An MCP (Model Context Protocol) server that provides seamless integration between Fish Audio's Text-to-Speech API and LLMs like Claude, enabling natural language-driven speech synthesis.
What is Fish Audio?
Fish Audio is a cutting-edge Text-to-Speech platform that offers:
🌊 State-of-the-art voice synthesis with natural-sounding output
🎯 Voice cloning capabilities to create custom voice models
🌍 Multilingual support including English, Japanese, Chinese, and more
⚡ Low-latency streaming for real-time applications
🎨 Fine-grained control over speech prosody and emotions
This MCP server brings Fish Audio's powerful capabilities directly to your LLM workflows.
Related MCP server: ElevenLabs MCP Server
Features
🎙️ High-Quality TTS: Leverage Fish Audio's state-of-the-art TTS models
🌊 Streaming Support: Real-time audio streaming for low-latency applications
🎨 Multiple Voices: Support for custom voice models via reference IDs
🎯 Smart Voice Selection: Select voices by ID, name, or tags
📚 Voice Library Management: Configure and manage multiple voice references
🔧 Flexible Configuration: Environment variable-based configuration
📦 Multiple Audio Formats: Support for MP3, WAV, PCM, and Opus
🚀 Easy Integration: Simple setup with any MCP-compatible client
Quick Start
Installation
You can run this MCP server directly using npx:
npx @zhoujinandrew/fish-audio-mcp-serverOr install it globally:
npm install -g @zhoujinandrew/fish-audio-mcp-serverConfiguration
Get your Fish Audio API key from Fish Audio
Set up environment variables:
export FISH_API_KEY=your_fish_audio_api_key_hereAdd to your MCP settings configuration:
Single Voice Mode (Simple)
{
"mcpServers": {
"fish-audio": {
"command": "npx",
"args": ["-y", "@zhoujinandrew/fish-audio-mcp-server"],
"env": {
"FISH_API_KEY": "your_fish_audio_api_key_here",
"FISH_MODEL_ID": "s2-pro",
"FISH_REFERENCE_ID": "your_voice_reference_id_here",
"FISH_OUTPUT_FORMAT": "mp3",
"FISH_STREAMING": "false",
"FISH_LATENCY": "balanced",
"FISH_MP3_BITRATE": "128",
"FISH_AUTO_PLAY": "false",
"AUDIO_OUTPUT_DIR": "~/.fish-audio-mcp/audio_output"
}
}
}
}Multiple Voice Mode (Advanced)
{
"mcpServers": {
"fish-audio": {
"command": "npx",
"args": ["-y", "@zhoujinandrew/fish-audio-mcp-server"],
"env": {
"FISH_API_KEY": "your_fish_audio_api_key_here",
"FISH_MODEL_ID": "s2-pro",
"FISH_REFERENCES": "[{'reference_id':'id1','name':'Alice','tags':['female','english']},{'reference_id':'id2','name':'Bob','tags':['male','japanese']},{'reference_id':'id3','name':'Carol','tags':['female','japanese','anime']}]",
"FISH_DEFAULT_REFERENCE": "id1",
"FISH_OUTPUT_FORMAT": "mp3",
"FISH_STREAMING": "false",
"FISH_LATENCY": "balanced",
"FISH_MP3_BITRATE": "128",
"FISH_AUTO_PLAY": "false",
"AUDIO_OUTPUT_DIR": "~/.fish-audio-mcp/audio_output"
}
}
}
}Environment Variables
Variable | Description | Default | Required |
| Your Fish Audio API key | - | Yes |
| TTS model to use ( |
| Optional |
| Default voice reference ID (single reference mode) | - | Optional |
| Multiple voice references (see below) | - | Optional |
| Default reference ID when using multiple references | - | Optional |
| Default audio format (mp3, wav, pcm, opus) |
| Optional |
| Enable streaming mode (HTTP/WebSocket) |
| Optional |
| Latency mode ( |
| Optional |
| MP3 bitrate (64, 128, 192) |
| Optional |
| Auto-play audio and enable real-time playback |
| Optional |
| Directory for audio file output |
| Optional |
Configuring Multiple Voice References
You can configure multiple voice references in two ways:
JSON Array Format (Recommended)
Use the FISH_REFERENCES environment variable with a JSON array:
FISH_REFERENCES='[
{"reference_id":"id1","name":"Alice","tags":["female","english"]},
{"reference_id":"id2","name":"Bob","tags":["male","japanese"]},
{"reference_id":"id3","name":"Carol","tags":["female","japanese","anime"]}
]'
FISH_DEFAULT_REFERENCE="id1"Individual Format (Backward Compatibility)
Use numbered environment variables:
FISH_REFERENCE_1_ID=id1
FISH_REFERENCE_1_NAME=Alice
FISH_REFERENCE_1_TAGS=female,english
FISH_REFERENCE_2_ID=id2
FISH_REFERENCE_2_NAME=Bob
FISH_REFERENCE_2_TAGS=male,japaneseUsage
Once configured, the Fish Audio MCP server provides two tools to LLMs.
Tool 1: fish_audio_tts
Generates speech from text using Fish Audio's TTS API.
Parameters
text(required): Text to convert to speech (max 10,000 characters)reference_id(optional): Voice model reference IDreference_name(optional): Select voice by namereference_tag(optional): Select voice by tagspeakers(optional, s2-pro only): Ordered list of speaker identifiers for multi-speaker dialogue. Each entry is resolved againstFISH_REFERENCESby id → name → tag (or used as a raw reference_id when no references are configured). The index maps to<|speaker:N|>tags intext. See the multi-speaker example below.streaming(optional): Enable streaming modeformat(optional): Output format (mp3, wav, pcm, opus)mp3_bitrate(optional): MP3 bitrate (64, 128, 192)opus_bitrate(optional): Opus bitrate in bps (-1000for auto,24000,32000,48000,64000)sample_rate(optional): Audio sample rate in Hz (defaults to format-native rate)normalize(optional): Enable text normalization (default: true)latency(optional): Latency mode (low,balanced,normal)output_path(optional): Custom output file pathauto_play(optional): Automatically play the generated audiowebsocket_streaming(optional): Use WebSocket streaming instead of HTTPrealtime_play(optional): Play audio in real-time during WebSocket streamingspeed(optional): Speaking rate multiplier (0.5=half speed, 1.0=normal, 2.0=double speed)volume(optional): Volume adjustment in dB (0=no change, positive=louder, negative=quieter)normalize_loudness(optional): Normalize perceived loudness (s2-pro only, default: true)temperature(optional): Expressiveness/emotion control (0=consistent, 1=emotional, default: 0.7)top_p(optional): Nucleus sampling diversity (0..1, default: 0.7)chunk_length(optional): Target text segment size (100-300, default: 300)max_new_tokens(optional): Max audio tokens per text chunk (default: 1024)repetition_penalty(optional): Penalty for repeating audio patterns (default: 1.2)min_chunk_length(optional): Min characters before splitting a chunk (0-100, default: 50)condition_on_previous_chunks(optional): Use prior audio as context for voice consistency (default: true)early_stop_threshold(optional): Early-stop threshold for batch processing (0..1, default: 1)
Voice Selection Priority: reference_id > reference_name > reference_tag > default
Tool 2: fish_audio_list_references
Lists all configured voice references.
Parameters
No parameters required.
Returns
List of configured voice references with their IDs, names, and tags
Default reference ID
Examples
Basic Text-to-Speech
User: "Generate speech saying 'Hello, world! Welcome to Fish Audio TTS.'"
Claude: I'll generate speech for that text using Fish Audio TTS.
[Uses fish_audio_tts tool with text parameter]
Result: Audio file saved to ./audio_output/tts_2025-01-03T10-30-00.mp3Using Custom Voice by ID
User: "Generate speech with voice model xyz123 saying 'This is a custom voice test'"
Claude: I'll generate speech using the specified voice model.
[Uses fish_audio_tts tool with text and reference_id parameters]
Result: Audio generated with custom voice model xyz123Using Voice by Name
User: "Use Alice's voice to say 'Hello from Alice'"
Claude: I'll generate speech using Alice's voice.
[Uses fish_audio_tts tool with reference_name: "Alice"]
Result: Audio generated with Alice's voiceUsing Voice by Tag
User: "Generate Japanese speech saying 'こんにちは' with an anime voice"
Claude: I'll generate Japanese speech with an anime-style voice.
[Uses fish_audio_tts tool with reference_tag: "anime"]
Result: Audio generated with anime voice styleMulti-Speaker Dialogue (s2-pro only)
Multi-speaker synthesis lets a single TTS call produce a dialogue between two or more configured voices. Two requirements:
FISH_MODEL_ID=s2-pro(the default since 0.8.0).Configure the voices you want to use through
FISH_REFERENCES, for example:FISH_REFERENCES='[ {"reference_id":"id1","name":"Alice","tags":["female","english"]}, {"reference_id":"id2","name":"Bob","tags":["male","japanese"]}, {"reference_id":"id3","name":"Carol","tags":["female","japanese","anime"]} ]' FISH_DEFAULT_REFERENCE="id1"
Then call the tool with the speakers array and embed <|speaker:N|> tags in
your text. The N index lines up with the position in speakers:
User: "Have Alice and Bob greet each other."
Claude: I'll synthesize a two-speaker dialogue using s2-pro.
[Uses fish_audio_tts with:
text: "<|speaker:0|>Good morning, Bob!<|speaker:1|>Morning, Alice — how are you?<|speaker:0|>Doing great, thanks!",
speakers: ["Alice", "Bob"]
]
Result: Single audio file alternating between Alice's and Bob's voices.Notes:
Each entry in
speakersis resolved by id → name → tag againstFISH_REFERENCES. You can also pass raw reference IDs directly (speakers: ["id1", "id2"]).If you only pass one identifier, it behaves like
reference_id— no multi-speaker mode engaged.Using
speakerson a non-s2-promodel returns an error; switch the model viaFISH_MODEL_ID=s2-pro.
List Available Voices
User: "What voices are available?"
Claude: I'll list all configured voice references.
[Uses fish_audio_list_references tool]
Result:
- Alice (id: id1) - Tags: female, english [Default]
- Bob (id: id2) - Tags: male, japanese
- Carol (id: id3) - Tags: female, japanese, animeHTTP Streaming Mode
User: "Generate a long speech in streaming mode about the benefits of AI"
Claude: I'll generate the speech in streaming mode for faster response.
[Uses fish_audio_tts tool with streaming: true]
Result: Streaming audio saved to ./audio_output/tts_2025-01-03T10-35-00.mp3WebSocket Real-time Streaming
User: "Stream and play in real-time: 'Welcome to the future of AI'"
Claude: I'll stream the speech via WebSocket and play it in real-time.
[Uses fish_audio_tts tool with websocket_streaming: true, realtime_play: true]
Result: Audio streamed and played in real-time via WebSocketAdjusting Speed, Volume, and Expressiveness
User: "Generate speech saying 'Breaking news!' at 1.5x speed with high emotion"
Claude: I'll generate expressive, fast-paced speech.
[Uses fish_audio_tts tool with text, speed: 1.5, temperature: 0.9]
Result: Audio generated with increased speed and expressivenessDevelopment
Local Development
Clone the repository:
git clone https://github.com/da-okazaki/mcp-fish-audio-server.git
cd mcp-fish-audio-serverInstall dependencies:
npm installCreate
.envfile:
cp .env.example .env
# Edit .env with your API keyBuild the project:
npm run buildRun in development mode:
npm run devTesting
Run the test suite:
npm testProject Structure
mcp-fish-audio-server/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── tools/
│ │ └── tts.ts # TTS tool implementation
│ ├── services/
│ │ └── fishAudio.ts # Fish Audio API client
│ ├── types/
│ │ └── index.ts # TypeScript definitions
│ └── utils/
│ └── config.ts # Configuration management
├── tests/ # Test files
├── audio_output/ # Default audio output directory
├── package.json
├── tsconfig.json
└── README.mdAPI Documentation
Fish Audio Service
The service provides two main methods:
generateSpeech: Standard TTS generation
Returns audio buffer
Suitable for short texts
Lower memory usage
generateSpeechStream: Streaming TTS generation
Returns audio stream
Suitable for long texts
Real-time processing
Error Handling
The server handles various error scenarios:
INVALID_API_KEY: Invalid or missing API key
NETWORK_ERROR: Connection issues with Fish Audio API
INVALID_PARAMS: Invalid request parameters
QUOTA_EXCEEDED: API rate limit exceeded
SERVER_ERROR: Fish Audio server errors
Troubleshooting
Common Issues
"FISH_API_KEY environment variable is required"
Ensure you've set the
FISH_API_KEYenvironment variableCheck that the API key is valid
"Network error: Unable to reach Fish Audio API"
Check your internet connection
Verify Fish Audio API is accessible
Check for proxy/firewall issues
"Text length exceeds maximum limit"
Split long texts into smaller chunks
Maximum supported length is 10,000 characters
Audio files not appearing
Check the
AUDIO_OUTPUT_DIRpath existsEnsure write permissions for the directory
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Fork the repository
Create your feature branch (
git checkout -b feature/AmazingFeature)Commit your changes (
git commit -m 'Add some AmazingFeature')Push to the branch (
git push origin feature/AmazingFeature)Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Fish Audio for providing the excellent TTS API
Anthropic for creating the Model Context Protocol
The MCP community for inspiration and examples
Support
For issues, questions, or contributions, please visit the GitHub repository.
Changelog
See CHANGELOG.md for a detailed list of changes.
Available Tools
2 toolsfish_audio_list_referencesA
List all configured voice references
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description is minimal and does not disclose any behavioral traits beyond the basic operation. Since no annotations are provided, the description carries full burden, but it omits details like whether this is read-only, authentication requirements, or what 'configured' entails.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no extra words. It is front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple list tool with no parameters, the description is sufficient to convey the purpose. However, it lacks details about the output format (e.g., array of references) which would improve completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and schema coverage is 100%. Description does not add parameter-level meaning but is not required to. Per guidelines, baseline is 4 for no parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'List all configured voice references' with a specific verb 'list' and resource 'voice references'. It effectively distinguishes from sibling tool fish_audio_tts, which implies text-to-speech synthesis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool versus fish_audio_tts. The context is implied by the resource 'voice references', but no alternatives or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
fish_audio_ttsB
Generate speech from text using Fish Audio TTS API
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to convert to speech | |
| reference_id | No | Voice model reference ID (optional) | |
| reference_name | No | Voice model name to search for (optional) | |
| reference_tag | No | Voice model tag to search for (optional) | |
| streaming | No | Enable HTTP streaming mode (optional) | |
| websocket_streaming | No | Enable WebSocket streaming mode (optional) | |
| realtime_play | No | Enable real-time audio playback during streaming (optional) | |
| format | No | Output audio format (optional) | mp3 |
| mp3_bitrate | No | MP3 bitrate in kbps (optional) | |
| opus_bitrate | No | Opus bitrate in bps; -1000 = auto. Only applies when format=opus. | |
| sample_rate | No | Audio sample rate in Hz. Defaults to format-native rate when omitted. | |
| normalize | No | Enable text normalization (optional) | |
| latency | No | Latency mode: low=lowest latency, balanced=reduced latency, normal=best quality | balanced |
| output_path | No | Custom output file path (optional) | |
| auto_play | No | Automatically play the generated audio (optional) | |
| speed | No | Speaking rate multiplier (0.5=half speed, 1.0=normal, 2.0=double speed) | |
| volume | No | Volume adjustment in dB (0=no change, positive=louder, negative=quieter) | |
| normalize_loudness | No | Normalize output loudness for consistent perceived volume (s2-pro only) | |
| temperature | No | Expressiveness/emotion control (0=consistent and calm, 1=varied and emotional) | |
| top_p | No | Nucleus sampling diversity (0..1) | |
| chunk_length | No | Target text segment size for processing (100-300) | |
| max_new_tokens | No | Maximum audio tokens to generate per text chunk | |
| repetition_penalty | No | Penalty for repeating audio patterns; values >1.0 reduce repetition | |
| min_chunk_length | No | Minimum characters before splitting into a new chunk (0-100) | |
| condition_on_previous_chunks | No | Use previous audio as context for voice consistency across chunks | |
| early_stop_threshold | No | Early stopping threshold for batch processing (0..1) | |
| speakers | No | Multi-speaker mode (s2-pro only). Ordered list of speaker identifiers — each entry is resolved against FISH_REFERENCES by id, then name, then tag (or treated as a raw reference_id if no references are configured). The order maps to speaker tags `<|speaker:0|>`, `<|speaker:1|>`, ... in `text`. Provide at least 2 entries to engage multi-speaker; a single entry is equivalent to `reference_id`. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must convey behavioral traits. It only says 'generate speech', omitting key aspects like streaming behavior, output format handling, or whether it is safe/idempotent. The minimal description fails to compensate for absent annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, which is concise but lacks structure. It would benefit from additional details without being verbose. It is adequate but not optimal.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (27 parameters, no output schema), the description is insufficient. It does not explain return values, rate limits, or how to handle outputs. For a sophisticated TTS API, more context is needed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds no extra parameter meaning; it merely restates the tool's purpose. It does not exceed the schema's own descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'generate speech' and resource 'text using Fish Audio TTS API', making the primary purpose evident. It also inherently distinguishes from the sibling tool 'fish_audio_list_references' which lists voice models.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives, no prerequisites, and no conditions for optimal usage. The sibling tool exists but no differentiation or context is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
2 tool updates
v0.8.0- First observed
fish_audio_list_references - First observed
fish_audio_tts
TDQS
The two tools have completely distinct purposes: one manages references, the other generates speech. No overlap or ambiguity.
Both tools follow the consistent 'fish_audio_verb_noun' pattern with snake_case, making them predictable and easy to understand.
With only 2 tools, the server feels thin for a TTS service, but it may be appropriate for a minimal integration. The count is borderline but not extreme.
The server lacks essential operations like creating/deleting references, listing voices, or setting voice parameters. Users cannot fully manage the TTS workflow, leading to significant gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server exposing the AceDataCloud Fish Audio API (text-to-speech with voice conditioning)
Hosted pay-per-use TTS: 54 neural voices, 9 languages incl. Brazilian Portuguese. $10 free credits.
AI voice generation: text-to-speech and voice cloning from any MCP client.
ElevenLabs in natural language: generate speech in any language, create and manage voices, compose m
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to generate and play high-quality text-to-speech audio using the Kokoro model, with support for multiple voices, adjustable speaking speed, and audio caching.-
- AlicenseAqualityFmaintenanceEnables text-to-speech conversion using ElevenLabs API with voice management, streaming support, and multiple models.51MIT
- AlicenseNot gradedqualityCmaintenanceEnables text-to-speech generation using the Groq API, supporting multiple audio formats and optional local playback.261MIT
- FlicenseNot gradedqualityDmaintenanceProvides text-to-speech conversion through a unified MCP interface, supporting both local Kokoro and cloud OpenAI TTS engines with streaming audio, voice selection, and customization via natural language instructions.7-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/zjandrew/mcp-fish-audio-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server