The TNZ Model Context Protocol (MCP) client acts as a bridge between Gemini CLI and TNZ's messaging suite.
By integrating the TNZ MCP client with the Google Gemini CLI, you empower your AI environment to interact directly with the TNZ CPaaS platform.
You'll be able to use natural language prompts to trigger SMS, Email and Voice messages, effectively giving your AI the ability to reach out to the real world.
Prerequisites
Before configuring the Gemini CLI, ensure you have completed the following:
-
TNZ Account: You must have an active TNZ account with an API Auth Token.
-
Gemini CLI Installed: Ensure the Google Gemini CLI is installed and running.
-
TNZ MCP Installed: You must have the tnz-mcp Python package installed. Refer to this guide: TNZ MCP Client
Understanding the Integration
The Gemini CLI is designed to be extensible:
When you type a command like "Send an SMS to +6421...", Gemini analyses the intent, routes it through the MCP configuration, and the TNZ Python plugin executes the message delivery.
Configuration Steps
To enable the integration, you must register the tnz-mcp server within the Gemini CLI configuration file. The CLI supports two connection methods: Stdio (Standard Input/Output) and HTTP.
1. Locate or Create the Configuration File
The Gemini CLI looks for a settings.json (or sometimes config.json) file to load external tools. The location of this file depends on your operating system:
If the .gemini folder or settings.json file does not exist, create them manually.
2. Edit the Configuration
Open the JSON file in your preferred text editor and add the mcpServers block using one of the methods below.
Stdio Mode (Recommended for Local Use)
This method runs the TNZ MCP server directly within the Gemini process. It is the simplest way to get started.
This tells Gemini CLI to run tnz-mcp as a stdio-based MCP server using the appropriate AuthToken.
HTTP Mode (For Remote/Networked Servers)
Use this method if you are running the TNZ MCP server separately (e.g. via Docker or on a remote machine) and exposing it via a URL.
Verifying the Installation
Once you have saved your settings.json file:
Step 1: Restart your terminal
Restart your terminal to ensure the changes take effect.
Step 2: Check Server Status
Run the following command in your terminal to list the active MCP servers:
You should see an output confirming the connection.
Step 3: Test Functionality
Interact with Gemini using natural language to test the connection. Try the following prompt:
If configured correctly, Gemini will confirm the action and send the SMS.
Troubleshooting
-
Key Names: Depending on the version of the Gemini CLI you are using, the configuration key might be mcpServers or simply tools. If mcpServers does not work, consult the official Gemini CLI documentation for the exact syntax of your version.
-
Path Issues: Ensure the tnz-mcp command is in your system's PATH. If Gemini cannot find the command, provide the full absolute path to the python executable in the JSON config (e.g., /usr/bin/python3 -m tnz_mcp).
-
Authentication: If you receive a 401 error, double-check that your TNZ_AUTH_TOKEN is copied correctly without extra spaces.