Skip to main content

Google Gemini + Nitrosend MCP

Gemini CLI has native MCP support, giving you the full Nitrosend toolkit — 20 tools, live brand context, and account state — directly in your terminal.

Setup

Step 1: Add the MCP server

Add to your Gemini CLI settings (~/.gemini/settings.json):
{
  "mcpServers": {
    "nitrosend": {
      "httpUrl": "https://api.nitrosend.com/mcp"
    }
  }
}

Step 2: Sign in

On first use, Gemini opens your browser for Nitrosend sign-in. Log in or create a free account — no API key needed.

Step 3: Use it

gemini "Check my Nitrosend account status and draft a welcome email"
gemini "Create a campaign for our product launch and target my VIP segment"
Gemini now has access to all 20 Nitrosend MCP tools — composing emails, managing contacts, building flows, checking analytics, and more.
MCP gives Gemini your full brand context — colors, fonts, tone of voice — so emails it creates are on-brand without extra prompting.

Example workflows

Set up brand + compose

gemini "Scrape my brand from https://mysite.com and draft a product announcement email"

Build a flow

gemini "Create a welcome flow that sends 3 emails over a week when someone subscribes"

Check performance

gemini "Show me insights for my last campaign compared to benchmarks"

Function Calling via Google AI SDK (Alternative)

For programmatic integration or Google AI Studio, you can define Nitrosend operations as function declarations and call the REST API directly. This requires an API key from Settings > API Keys in the Nitrosend dashboard.

Define function declarations

from google import genai
from google.genai import types

client = genai.Client()

nitrosend_tools = types.Tool(
    function_declarations=[
        types.FunctionDeclaration(
            name="send_email",
            description="Send a transactional email to one recipient immediately",
            parameters=types.Schema(
                type=types.Type.OBJECT,
                properties={
                    "to": types.Schema(type=types.Type.STRING, description="Recipient email"),
                    "subject": types.Schema(type=types.Type.STRING, description="Subject line"),
                    "body": types.Schema(type=types.Type.STRING, description="Email body (HTML)")
                },
                required=["to", "subject", "body"]
            )
        ),
        types.FunctionDeclaration(
            name="list_campaigns",
            description="List all email campaigns with their status",
            parameters=types.Schema(
                type=types.Type.OBJECT,
                properties={
                    "status": types.Schema(
                        type=types.Type.STRING,
                        description="Filter by status: draft, active, paused, completed"
                    )
                }
            )
        )
    ]
)

Handle function calls

import requests

NITROSEND_API_KEY = "nskey_live_your_key_here"  # From Settings > API Keys
BASE_URL = "https://api.nitrosend.com/v1/my"
HEADERS = {
    "Authorization": f"Bearer {NITROSEND_API_KEY}",
    "Content-Type": "application/json"
}

def execute_nitrosend_function(name, args):
    if name == "send_email":
        resp = requests.post(f"{BASE_URL}/messages", headers=HEADERS, json={
            "channel": "email", "to": args["to"],
            "subject": args["subject"], "body": args["body"]
        })
        return resp.json()
    elif name == "list_campaigns":
        params = {"status": args["status"]} if "status" in args else {}
        resp = requests.get(f"{BASE_URL}/campaigns", headers=HEADERS, params=params)
        return resp.json()

Key API endpoints

Function nameAPI callWhat it does
send_emailPOST /v1/my/messagesSend a single email immediately
list_campaignsGET /v1/my/campaignsList all campaigns
create_campaignPOST /v1/my/campaignsCreate a new campaign
list_contactsGET /v1/my/contactsList contacts in your audience
get_accountGET /v1/my/accountCheck account status and limits
See the full API Reference for all available endpoints.
MCP via Gemini CLI is the recommended setup — OAuth sign-in, no API keys to manage. The function calling method is for programmatic use where you need direct API access.