Skip to content

AI assistants

Use the Qelka MCP server in Gemini CLI

Add the Qelka MCP server to Gemini CLI with gemini mcp add or settings.json, keep the API key in an environment variable and verify emails and phones.

Updated 2026-11-26

This guide connects Gemini CLI to the Qelka MCP server, so you can ask it to verify the addresses in a CSV, rewrite the phone numbers of a fixture in E.164, or check the IPs in a log, from your terminal. There is no Qelka extension for Gemini CLI: you add the remote server https://mcp.qelka.com/mcp and authenticate with your API key.

The server speaks Streamable HTTP, is stateless, and accepts one kind of authentication: an Authorization: Bearer header with your key. It offers no OAuth, so /mcp auth does not apply to it.

What you need

  • Gemini CLI installed and signed in to Gemini.
  • A Qelka API key. Start with a sk_test_ key: tools return simulated, fixed answers and never spend credits. See Test mode.
  • Preferably a restricted key, since it lives on your machine: tick the endpoints you want the model to call, plus account for the free get_account tool. See restricted keys.

Steps

1. Put the key in your environment

Export the key in your shell profile:

Terminal
export QELKA_API_KEY=sk_test_your_key

Gemini CLI also reads variables from a .env file, searched in the current directory, then each parent up to the project root, then ~/.env. If you use one, add it to .gitignore.

2. Add the server

Run gemini mcp add with the HTTP transport and the header:

Terminal
gemini mcp add --scope user --transport http \
  --header 'Authorization: Bearer ${QELKA_API_KEY}' \
  qelka https://mcp.qelka.com/mcp
  • --scope user writes to ~/.gemini/settings.json, so the server is available in every directory. Without it, the command writes to the project's .gemini/settings.json.
  • The single quotes keep ${QELKA_API_KEY} as written. Gemini CLI replaces it with the variable's value each time it loads its settings, so the file never holds the key. With double quotes, your shell would expand it and write the key itself into the file.
  • Do not use underscores in the server name: Gemini CLI names tools mcp_<server>_<tool> and splits on the first underscore.

The command writes this entry, which you can also add by hand:

settings.json
{
  "mcpServers": {
    "qelka": {
      "type": "http",
      "url": "https://mcp.qelka.com/mcp",
      "headers": {
        "Authorization": "Bearer ${QELKA_API_KEY}"
      }
    }
  }
}

Gemini CLI's configuration reference documents httpUrl for Streamable HTTP servers. "httpUrl": "https://mcp.qelka.com/mcp" with the same headers works too; use one form or the other, not both.

3. Limit the tools (optional)

The server has 12 tools. To load only the ones you need, add includeTools to the entry:

settings.json
{
  "mcpServers": {
    "qelka": {
      "type": "http",
      "url": "https://mcp.qelka.com/mcp",
      "headers": {
        "Authorization": "Bearer ${QELKA_API_KEY}"
      },
      "includeTools": ["verify_email", "validate_phone", "lookup_ip", "get_account"],
      "description": "Phone, email and IP validation"
    }
  }
}

excludeTools does the opposite and wins when a tool is in both lists. The gemini mcp add command takes the same lists as --include-tools and --exclude-tools.

4. Check the connection

Run gemini mcp list in your terminal, or /mcp inside a session, to see the server, its status and its tools. Then ask:

Prompt
Use the qelka tools to tell me my Qelka credit balance, and whether this key is in test or live mode.

The model calls mcp_qelka_get_account, which is free, and answers with your plan, balance and key.mode, test or live.

5. Approve tool calls

Gemini CLI asks before each tool call. You can run it once, always allow that tool, or always allow every tool of the server. --trust on gemini mcp add, or "trust": true in the entry, skips all confirmations for the server. Leave it off at first: on a live key, each call except get_account spends credits.

To pause the server without deleting it, run gemini mcp disable qelka, and gemini mcp enable qelka to bring it back.

What each call costs

Each tool call is one API request made with your key: same price, cache and rate limits as a REST call.

Tool What it does Credits
verify_email Checks that an address exists, without sending mail 1
validate_phone Validates a number and returns E.164, country, line type 1 at basic, 3 at live
lookup_ip Location, network type, VPN, Tor and data center flags 1
get_account Plan, balance, limits and key mode 0

The server tells models to prefer the fast email mode and the basic phone level. Ask for "check that the mailbox exists" or "who is the current carrier" when you need mode: "full" or level: "live". All tools are listed in the MCP server docs.

Example prompts

Prompt
Read fixtures/users.json and give me every phone number in E.164. Numbers without a + are American.
Prompt
Verify these addresses and tell me which ones I should not send to:
jane@example.com, john@exmaple.com, sales@acme.example
Prompt
Check the client IPs in logs/access.log and list the ones that come from Tor or a data center.

Before a long list, ask the model to call get_account and compare the balance with the number of rows. For thousands of values, a bulk file check is a better fit than one tool call per row.

Handle errors and rate limits

When the API refuses a call, the tool result is marked as an error and carries the API's message, the error type and the HTTP status, plus "Retry after N seconds." when there is a Retry-After. Refused calls are not billed.

What you see Cause Fix
/mcp shows the server as disconnected, with a 401 The header is missing or empty Check that QELKA_API_KEY is exported in the shell that starts gemini, and the word Bearer then a space
Gemini offers to authenticate with OAuth It read the 401 as a sign-in request The server has no OAuth: fix the header instead
Tools appear but every call fails with invalid_api_key The key is well formed but revoked or mistyped Create a new key and update the variable
A call fails with forbidden The key is restricted and the tool's endpoint is not in its list Use a key that allows it, with account for get_account
A call fails with insufficient_credits The balance cannot cover the call Ask for get_account, then add credits
A call fails with rate_limited A key allows 200 requests per 10 seconds Wait the seconds given, or ask for fewer calls at a time

Gemini CLI applies its own per-server request timeout (in milliseconds) from the entry; its documented default is long, so lower it if you prefer a stuck call to fail fast. See Errors and Rate limits.

Frequently asked questions

Should I use httpUrl or url in settings.json?
Gemini CLI's configuration reference lists httpUrl for Streamable HTTP and url for SSE. Recent versions also accept url with "type": "http", which is what gemini mcp add --transport http writes, and treat httpUrl as the older form. Either reaches the Qelka server; do not set both on one server.
Where does Gemini CLI read the API key from?
From your environment, when it loads settings.json: string values can reference variables as $NAME, ${NAME} or ${NAME:-default}. It also loads variables from a .env file in the current directory, a parent directory up to the project root, or your home directory. Keep that file out of version control.
Can I stop Gemini from asking before each tool call?
Yes, with "trust": true on the server, or by choosing to always allow a tool or the server when Gemini asks. Every tool except get_account spends credits on a live key, so keep the confirmation until you know how the model uses them, or limit the tools with includeTools.

More in AI assistants

All integrations

Put this check in your product

Get an API key in under a minute. 100 free credits every month, no card required.

  • 100 free credits a month
  • No card
  • Test keys spend nothing
  • Cancel any time