Skip to main content
Glama
README.md
# Gemini TTS MCP — Local Setup

This repository contains the Gemini TTS MCP server used by Claude Desktop.

This guide explains how to set it up locally on macOS.

---

## 1. Requirements

You need:

- macOS
- Claude Desktop
- Node.js
- npm
- A Google Gemini API key

---

## 2. Clone the Repository

Open Terminal and clone the repository:

```bash
git clone YOUR_REPOSITORY_URL
```

Then enter the project:

```bash
cd YOUR_REPOSITORY_NAME
```

> Replace `YOUR_REPOSITORY_URL` and `YOUR_REPOSITORY_NAME` with the actual repository information.

---

## 3. Check Node.js

Check whether Node.js is already installed:

```bash
node --version
```

Also check npm:

```bash
npm --version
```

If both commands return a version number, you can continue.

If Node.js is not installed, install it before continuing.

---

## 4. Install Dependencies

Inside the repository folder, run:

```bash
npm install
```

This installs all dependencies required by the MCP server.

---

## 5. Create the `.env` File

The MCP server needs a Gemini API key.

Inside the project folder, create a `.env` file:

```bash
touch .env
```

Open it:

```bash
nano .env
```

Add:

```env
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
```

Replace `YOUR_GEMINI_API_KEY` with your actual Gemini API key.

Save the file:

```text
CTRL + O
ENTER
CTRL + X
```

### Getting a Gemini API Key

Create a Gemini API key through Google AI Studio:

[https://aistudio.google.com/apikey](https://aistudio.google.com/apikey)

Do **not** commit the `.env` file to Git.

The repository should already contain `.env` in `.gitignore`.

---

## 6. Test the MCP Server

From inside the project directory, run:

```bash
node src/server.js
```

If the server starts without an error about a missing `GEMINI_API_KEY`, the setup is working.

The server may not display a normal message and may simply keep running.

This is normal.

Stop it with:

```text
CTRL + C
```

---

# 7. Configure Claude Desktop

Claude Desktop needs to know where the MCP server is located.

The configuration file is:

```text
~/Library/Application Support/Claude/claude_desktop_config.json
```

You can open it with:

```bash
open ~/Library/Application\ Support/Claude/claude_desktop_config.json
```

If the file does not exist, create it.

---

## 8. Find Your Node.js Path

Run:

```bash
which node
```

You will get something similar to:

```text
/Users/YOUR_USERNAME/.nvm/versions/node/v24.15.0/bin/node
```

Copy the path returned by your Mac.

---

## 9. Find the MCP Project Path

Inside the repository folder, run:

```bash
pwd
```

For example:

```text
/Users/YOUR_USERNAME/mcp-servers/gemini-tts-mcp
```

Your MCP server file will therefore be:

```text
/Users/YOUR_USERNAME/mcp-servers/gemini-tts-mcp/src/server.js
```

---

## 10. Add the MCP Server to Claude Desktop

Add the following to:

```text
claude_desktop_config.json
```

Example:

```json
{
  "mcpServers": {
    "gemini-tts": {
      "command": "/Users/YOUR_USERNAME/.nvm/versions/node/v24.15.0/bin/node",
      "args": [
        "/Users/YOUR_USERNAME/mcp-servers/gemini-tts-mcp/src/server.js"
      ]
    }
  }
}
```

### Important

Replace both paths with the paths from your own Mac.

You can get them with:

```bash
which node
```

and:

```bash
pwd
```

---

## 11. If You Already Have Other MCP Servers

Do **not** replace your existing configuration.

For example, if you already have:

```json
{
  "mcpServers": {
    "other-server": {
      "command": "..."
    }
  }
}
```

add `gemini-tts` alongside it:

```json
{
  "mcpServers": {
    "other-server": {
      "command": "..."
    },
    "gemini-tts": {
      "command": "/Users/YOUR_USERNAME/.nvm/versions/node/v24.15.0/bin/node",
      "args": [
        "/Users/YOUR_USERNAME/mcp-servers/gemini-tts-mcp/src/server.js"
      ]
    }
  }
}
```

---

# 12. Restart Claude Desktop

Completely quit Claude Desktop:

```text
CMD + Q
```

Then open Claude Desktop again.

---

# 13. Verify the MCP Connection

In Claude Desktop, go to:

```text
Settings
→ Developer
```

You should see:

```text
gemini-tts
```

The server should show as connected.

The available tools should include:

```text
generate_speech
get_audio_files
```

---

# 14. Test Gemini TTS

Open a new Claude conversation and ask:

> Use the `gemini-tts` MCP server to generate speech.
>
> Generate a test using exactly this text:
>
> "This is a test of the Gemini text to speech setup."
>
> Save the file as:
>
> `test-voice`

Claude should use the `generate_speech` tool.

The generated audio should be saved inside the project's:

```text
audio/
```

folder.

---

# 15. Generated Audio

Generated `.wav` files are stored in:

```text
audio/
```

For example:

```text
audio/
├── test-voice.wav
├── college-vs-university.wav
└── scampi-vs-shrimps.wav
```

You can open the audio folder in Finder with:

```bash
open audio
```

---

# 16. Default TTS Settings

The MCP server is already configured with the following defaults:

* Voice: `Algenib`
* Vocal style: subtle smile
* Speaking speed: rapid-fire
* Accent: neutral English
* Style: energetic, natural and clear
* Target format: short-form content such as TikTok and Instagram

No additional configuration is required.

---

# 17. Troubleshooting

## `GEMINI_API_KEY is missing`

Make sure the `.env` file exists inside the repository:

```bash
ls -la
```

You should see:

```text
.env
```

Check it with:

```bash
cat .env
```

It should contain:

```env
GEMINI_API_KEY=YOUR_GEMINI_API_KEY
```

---

## `Server disconnected`

First test the server manually:

```bash
node src/server.js
```

If an error appears, fix that error first.

Also check:

```bash
which node
```

and:

```bash
pwd
```

Then make sure the paths in `claude_desktop_config.json` are correct.

---

## Claude does not show `gemini-tts`

Check:

1. The MCP configuration JSON is valid.
2. The Node.js path is correct.
3. The `server.js` path is correct.
4. `.env` exists.
5. `GEMINI_API_KEY` exists in `.env`.
6. Claude Desktop has been completely restarted.

---

# 18. Quick Setup Checklist

* [ ] Clone repository
* [ ] Open repository in Terminal
* [ ] Run `npm install`
* [ ] Create `.env`
* [ ] Add `GEMINI_API_KEY`
* [ ] Run `node src/server.js` successfully
* [ ] Run `which node`
* [ ] Run `pwd`
* [ ] Add `gemini-tts` to Claude Desktop's MCP configuration
* [ ] Restart Claude Desktop
* [ ] Check `Settings → Developer`
* [ ] Confirm `gemini-tts` is connected
* [ ] Generate a test voice

---

## Done

Once `gemini-tts` appears as connected in Claude Desktop, no further setup is required.

Claude can now generate Gemini TTS audio through the MCP server.

````

### One important change I'd make to your repository

Since **you're giving her the repository**, I'd actually recommend that she clones it into a simple, predictable location, e.g.:

```text
~/mcp-servers/gemini-tts-mcp
````

Then the setup becomes very easy and your Claude config can follow the same structure on both Macs.

Also, **don't put your own `.env` into the repository**. The repository should contain something like:

```text
gemini-tts-mcp/
├── src/
│   └── server.js
├── audio/
├── package.json
├── package-lock.json
├── .gitignore
└── README.md
```

and **each person creates their own `.env` locally** with their own Gemini API key.

TDQS

A4.1/5.0

Scored across 2 tools

Disambiguation5/5

The two tools are entirely distinct: one generates speech, the other lists generated files. There is no overlap or ambiguity in their purposes.

Naming Consistency5/5

Both tools follow the verb_noun pattern: generate_speech and get_audio_files. The naming is consistent, clear, and predictable.

Tool Count3/5

Two tools is on the thin side for a TTS server, but they cover the core generate and retrieve workflow. It feels slightly minimal rather than unreasonably sparse.

Completeness4/5

The server covers the essential TTS lifecycle: generating speech and listing outputs. Minor gaps exist such as no delete operation or voice selection flexibility, but agents can work around them for basic use.

Maintenance

ActivityStale
ResponsivenessNo recent community issues