PacketStream integration

Add PacketStream web search to Gemini CLI

Add PacketStream's remote MCP server to Gemini CLI's settings.json with httpUrl and your API key in an environment variable, then check the tools.

Give Gemini CLI live Google results and readable web pages through PacketStream’s remote MCP server. Gemini CLI reads your API key from an environment variable when it loads its settings. The MCP server is in early beta.

Configure

Create an API key on the MCP page of the dashboard, then set the variable and add it to your shell profile:

export PACKETSTREAM_API_KEY="YOUR_API_KEY"

Add the server to ~/.gemini/settings.json for every project, or to .gemini/settings.json in a project’s root directory:

{
  "mcpServers": {
    "packetstream": {
      "httpUrl": "https://api.packetstream.io/v1/mcp",
      "headers": { "Authorization": "Bearer ${PACKETSTREAM_API_KEY}" }
    }
  }
}
  • Use httpUrl, not url. In Gemini CLI, url selects the SSE transport, which the server does not support.
  • Gemini CLI replaces ${PACKETSTREAM_API_KEY} with the variable’s value when it loads the settings, so the key stays out of the file.
  • Keep the server name free of underscores. Gemini CLI names each tool mcp_<server>_<tool>, for example mcp_packetstream_packetstream_search, and its policy rules split that name at the first underscore after mcp_.

Check it works

  1. Run gemini mcp list. It should show packetstream as connected.
  2. In a Gemini CLI session, run /mcp. The packetstream server should list packetstream_search and packetstream_fetch.
  3. Check the key on its own with the free key check. Listing the tools works without a key, so a connected server does not prove the key works:
curl -sS https://api.packetstream.io/v1/account \
  -H "Authorization: Bearer $PACKETSTREAM_API_KEY"

A working key returns your balance as JSON. A missing or wrong key returns HTTP 401 with the code unauthorized.

Then ask Gemini something that needs current information. It should call packetstream_search.

Tool confirmations

Gemini CLI asks you to confirm each tool call. Setting "trust": true on the packetstream entry skips every confirmation for the server. To load only some tools, list them in includeTools, for example ["packetstream_search"]. Every successful call is billed, and the server asks agents to use these tools for every web search and page fetch.

Troubleshooting

  • The tool result says missing_api_key. The MCP server does not answer a missing key with HTTP 401. The tool call returns an error result that the agent reads and passes on, and the call is not billed. Check the headers entry and that PACKETSTREAM_API_KEY is set where Gemini CLI starts.
  • invalid_api_key. The header does not hold a PacketStream key, for example because the variable is not set or the file still has the YOUR_API_KEY placeholder. It should read Bearer followed by a key that starts with ps_.
  • unauthorized. The key was revoked or replaced on the dashboard. Create a new key and update the variable.
  • HTTP 405 or a connection error. The entry uses url, so Gemini CLI tried SSE. Change it to httpUrl.
  • Tool filters or policies stopped matching after an update. Version 1.3.0 renamed web_search and web_fetch to packetstream_search and packetstream_fetch. Update includeTools, excludeTools, and any policy rule that names the old tools, such as mcp_packetstream_web_search.

See MCP client troubleshooting for the other error results.

Ready to give Gemini CLI live web results? Create an account, add funds, and create the API key on the MCP page of the dashboard.
Create account