# Gemini CLI + Dizo

> Add Dizo to the Gemini CLI as a remote MCP server and look up people, companies, emails and phones from your terminal.

Type: MCP client — server URL `https://mcp.dizo.ai/mcp`. No native app needed.

## Steps
1. Export `DIZO_API_KEY` in your shell.
2. Run the `gemini mcp add` command below, or add the `dizo` entry to `~/.gemini/settings.json`.
3. Start `gemini` and run `/mcp` to confirm the Dizo tools are listed.

## Where to go
In your terminal: `gemini mcp add --transport http --header "Authorization: Bearer $DIZO_API_KEY" dizo https://mcp.dizo.ai/mcp`.

Open the Gemini CLI MCP docs: https://geminicli.com/docs/tools/mcp-server/

## Terminal
```
gemini mcp add --transport http dizo https://mcp.dizo.ai/mcp \
  --header "Authorization: Bearer $DIZO_API_KEY"
```

## ~/.gemini/settings.json
```
{
  "mcpServers": {
    "dizo": {
      "httpUrl": "https://mcp.dizo.ai/mcp",
      "headers": { "Authorization": "Bearer $DIZO_API_KEY" }
    }
  }
}
```

## Notes
- Gemini CLI expands environment variables in settings.json, so the key stays out of the file.
- Use `--scope user` to make Dizo available in every project.

## Related API docs
- [/docs/search](https://dizo.ai/docs/search.md)
- [/docs/email-find](https://dizo.ai/docs/email-find.md)
- [/docs/domain-to-company](https://dizo.ai/docs/domain-to-company.md)


## Gemini CLI and Dizo: a data source for your terminal agent

The Gemini CLI is Google's open-source command-line agent. It runs Gemini models in your terminal, works with your local files and shell, and can be extended with MCP servers that it loads from its settings. Developers use it for coding, scripting and research tasks where staying in the terminal is faster than switching to a browser.

Adding Dizo as a remote MCP server gives that agent live access to B2B data: people, companies, work emails and phone numbers. You ask in plain English, and Gemini decides which Dizo tools to call. Because the hosted server is reached over HTTP at `https://mcp.dizo.ai/mcp`, there is nothing to install or run locally beyond the CLI itself. The data arrives in the same terminal session where you can immediately pipe it into a file, a script or another command.

## Why put B2B data in the Gemini CLI

Terminal agents are good at chaining small steps: read a file, transform it, call a tool, write the result. Data enrichment is exactly that kind of chain. A CSV of domains becomes a CSV of firmographics; a list of names and companies becomes a list with verified emails; a single domain becomes a quick briefing before a call. With Dizo connected, Gemini can do the whole chain without you copying data between tools.

It also helps engineers who are building on Dizo. Being able to ask "what does a domain-to-company response actually contain for stripe.com" and see the answer in the terminal is faster than reading reference docs, and the agent can then write code against what it saw. For quick lookups the [domain to company reference](/docs/domain-to-company) and the other endpoint docs remain the source of truth for parameters.

Finally, the CLI makes the results easy to check. Ask Gemini to print the `interpreted` filters a natural-language search produced, the `status` and `confidence` on each found email and the `updated_at` timestamp on each person record. Seeing those fields in plain text keeps you honest about what you are about to send, call or import, and it costs nothing extra because they come back in the same response.

## Things to ask Gemini once Dizo is connected

A few requests that play to the CLI's strengths:

- "Read domains.txt, look up each company with Dizo and write name, industry, employees and HQ country to companies.csv."
- "Who is behind the email address in this support ticket, and what company are they at?"
- "Find the work email for Maya Okafor at ledgerline.io." (1 credit, only if found)
- "How many security engineers are there at US banks with more than 5,000 employees?" (free count)
- "Get mobile numbers for these three people, but tell me the cost first."
- "Read bounced.csv, look up each bounced contact's current role with Dizo and write any new work email to refreshed.csv."
- "Call dizo_whoami and summarize my remaining budget for today."

## Configuring the server

Export your key in the shell first: `export DIZO_API_KEY=dz_live_...`, or a `dz_test_` key if you are still building. You then have two equivalent ways to register the server. The command-line way is `gemini mcp add --transport http dizo https://mcp.dizo.ai/mcp --header "Authorization: Bearer $DIZO_API_KEY"`. The file way is to add a `dizo` entry under `mcpServers` in `~/.gemini/settings.json`, with `httpUrl` set to `https://mcp.dizo.ai/mcp` and a `headers` object containing `Authorization: Bearer $DIZO_API_KEY`.

Notice that the settings file contains the variable reference, not the key. The Gemini CLI expands environment variables in `settings.json`, so the secret stays in your environment and the file is safe to keep in a dotfiles repository. If you want Dizo available in every project rather than just the current one, use `--scope user` when you add it.

Start `gemini` and run `/mcp`. You should see Dizo with its tools listed, including search, count, decision-maker finder, org chart, the email and phone finders, enrichment, reverse lookups, and the free `dizo_quote`, `dizo_whoami` and `dizo_balance` tools. The [MCP page](/mcp) lists every tool with its credit cost.

## Controlling what the CLI can spend

Give the Gemini CLI its own Dizo key rather than reusing one from a production service. Create it with `data:read` scope so it cannot touch billing, a maximum credits per request, a daily cap and a monthly cap. If you only use it for lookups, add an endpoint allow-list such as `/v1/email/find`, `/v1/companies/enrich` and `/v1/companies/{domain}` so a broad request cannot fan out into expensive phone lookups. The fields are documented in the [keys reference](/docs/keys).

Then use the free tools to stay informed. `dizo_quote` returns the exact credit cost of any call before it runs, and Gemini can call it when you ask for a cost first. `dizo_balance` returns balance, this month's spend, the cap and per-key usage. At the account level, a monthly spend cap stops further calls with `402 monthly_cap_reached`, and alerts at 50%, 80% and 100% arrive by email and webhook. Lookups that find nothing are free, so failed attempts in a loop do not add up.

## Cost examples for terminal workflows

Credit prices follow the size of each single purchase: $0.025 at $10 to $499, $0.021 at $500 to $1,999, $0.017 at $2,000 to $9,999, $0.013 at $10,000 to $49,999 and $0.010 at $50,000 and above. These examples use $0.025 and assume every lookup succeeds.

Enriching a file of 300 domains with domain to company costs at most 300 credits, $7.50; unknown domains cost nothing. Finding emails for 150 contacts from that file is up to 150 credits, $3.75. Identifying a support ticket's sender with email to profile is 2 credits, $0.05, if found. Three mobile numbers are 30 credits, $0.75. Re-identifying 200 bounced contacts with person enrich costs at most 400 credits, $10, and only matches are charged. Work email signups get 250 free credits, which would cover the 150 emails with 100 credits left over for company lookups. Use the [pricing page](/pricing) for larger volumes.

## Workflows from start to finish

Pre-call briefing. Before a meeting you type a domain and ask for a one-paragraph briefing plus the three most senior people in the department you sell into. Gemini calls `dizo_enrich_company` for headcount, revenue band, industry, HQ, funding and technologies, then `dizo_org_chart` filtered by department. You get the briefing in the terminal and can save it to your notes with one more instruction.

File-based enrichment. You have a CSV of 300 accounts exported from a spreadsheet. Gemini reads it, calls domain to company for each row and writes a new CSV with the added columns. For larger files, ask it to write a script that submits a single `POST /v1/batch` job, since batch handles up to 10,000 lookups per job asynchronously at the same per-item price.

Support and abuse triage. A ticket arrives from an unfamiliar address. Gemini runs email to profile, which returns the person, title, seniority and employer if found, so you know whether you are dealing with a customer's admin, a prospect or an unknown sender before you reply.

In each case, the useful output lands as text or a file in your working directory. That is the main advantage of doing this work in a terminal agent rather than a chat app: results are immediately available to the next command, script or commit.

## Troubleshooting and security

If `/mcp` does not show Dizo, check three things: that the entry is under `mcpServers`, that it uses `httpUrl` rather than another key name, and that `DIZO_API_KEY` is set in the shell that launched `gemini`. An unset variable expands to an empty header, which fails authentication. If calls return `402 monthly_cap_reached`, the account cap is reached for the month. Rate-limit errors carry `error.retryable` and `error.retry_after`; let Gemini wait the indicated seconds. Every error includes a plain-English `fix` field the agent can act on.

For security, keep keys in the environment, not in files, and use separate keys for personal CLI use and for any automated jobs. Use a `dz_test_` key while you experiment, since it returns synthetic data and spends nothing. Treat phone data with care: each number carries a `dnc` flag for the US National Do Not Call Registry, and Dizo's acceptable use terms require compliance with rules such as TCPA. The [trust page](/trust) covers opt-outs and privacy requests.

## FAQ

### Do I need to run a local server for the Gemini CLI?
No. The Gemini CLI connects to the hosted server at https://mcp.dizo.ai/mcp over HTTP. You only need the CLI and a Dizo key in your environment.

### Is it safe to keep the Dizo entry in settings.json?
Yes, as long as the header uses $DIZO_API_KEY rather than a literal key. The Gemini CLI expands environment variables in settings.json, so the secret stays in your shell environment.

### How do I make Dizo available in every project?
Add it with --scope user on the gemini mcp add command, or put the entry in ~/.gemini/settings.json in your home directory. Either way it loads in any project.

### Can Gemini tell me the cost before it calls Dizo?
Yes. Ask it to quote first. The dizo_quote tool returns the exact credit cost of a call and spends nothing, and every tool description includes its credit cost.

### What happens if a lookup finds nothing?
You are not charged. Email, phone, profile and company lookups that return nothing are free. The email finder returns an address only when it validates, so a miss is a free `404 not_found`.

### Can I use Dizo with the Gemini CLI today?
Anyone can [sign up](/signup) for a live key, and work email signups get 250 free credits with no card required. You can set everything up now with a dz_test_ key, which returns synthetic data in the live response format and never spends credits, then swap in a live key when you are ready.
