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, noturl. In Gemini CLI,urlselects 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 examplemcp_packetstream_packetstream_search, and its policy rules split that name at the first underscore aftermcp_.
Check it works
- Run
gemini mcp list. It should showpacketstreamas connected. - In a Gemini CLI session, run
/mcp. Thepacketstreamserver should listpacketstream_searchandpacketstream_fetch. - 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 theheadersentry and thatPACKETSTREAM_API_KEYis 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 theYOUR_API_KEYplaceholder. It should readBearerfollowed by a key that starts withps_.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 tohttpUrl. - Tool filters or policies stopped matching after an update. Version 1.3.0 renamed
web_searchandweb_fetchtopacketstream_searchandpacketstream_fetch. UpdateincludeTools,excludeTools, and any policy rule that names the old tools, such asmcp_packetstream_web_search.
See MCP client troubleshooting for the other error results.