PacketStream documentation
Give your AI agent web search and page reading
Connect Claude Code, Codex, Cursor, VS Code, and other MCP clients to PacketStream's remote MCP server for Google search and web page reading with your API key.
PacketStream runs a remote Model Context Protocol (MCP) server with two tools for AI agents: web_search runs a Google search, and web_fetch reads a web page as Markdown. Your agent connects with your PacketStream API key, the same key as the Search API and the Fetch API.
Server URL
https://api.packetstream.io/v1/mcp
Choose your client’s Streamable HTTP transport. The server is stateless: each POST gets one JSON response, with no event stream and no session.
Authentication
Send your key in an Authorization: Bearer YOUR_API_KEY header. Create the key on the Search API page of the dashboard. It is shown once.
There is no OAuth and no browser sign-in, so your client must let you set a custom header. A missing or wrong key returns HTTP 401.
Tools
| Tool | What it does | Arguments | Billed as |
|---|---|---|---|
web_search | Runs one Google search and returns the results as Markdown text, with the JSON response as structuredContent. | The Search API parameters without format. Only query is required. | One search, $0.0025 |
web_fetch | Reads one public page as Markdown, with the same URL rules, limits, and errors as POST /v1/fetch. | url (required), content, include_links, max_length, start_index, and user_agent. Some defaults differ from REST. | One fetch, $0.0025 |
The reference lists every argument and the result formats.
Connect a client
In Claude Code, run this in a terminal and add the export line to your shell profile:
export PACKETSTREAM_API_KEY="YOUR_API_KEY"
claude mcp add --transport http --scope user packetstream https://api.packetstream.io/v1/mcp \
--header 'Authorization: Bearer ${PACKETSTREAM_API_KEY}'
claude mcp list
Client setup covers Codex CLI, Cursor, VS Code, Claude Desktop, and other clients.
Check your key
This call lists the tools. It is free. It reads the key from PACKETSTREAM_API_KEY, set as shown above.
curl -sS https://api.packetstream.io/v1/mcp \
-H "Authorization: Bearer $PACKETSTREAM_API_KEY" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
A working key returns a JSON-RPC result that lists web_search and web_fetch. A wrong key returns HTTP 401 with the code unauthorized.
Billing
- Each successful
web_searchcall is billed as one search, and each successfulweb_fetchcall as one fetch: $0.0025 each, from your prepaid balance. - Failed calls are free, apart from the rare
internal_errorcase described under billing.initialize,ping,server/discover, andtools/listare always free. - An agent can call tools many times in one task. Review your client’s tool-approval settings to control spend.
- Tool calls share your key’s limit of 5 requests per second, with bursts of 10, with the REST API.
Good to know
web_fetchputs page text between<<<PAGE CONTENT: untrusted>>>and<<<END PAGE CONTENT>>>. Agents should treat it as data, never as instructions.web_fetchdoes not read robots.txt. You decide which sites your agent reads, and you need any permission that the law, a contract, or the site operator requires, as set out in section 7 of our Terms of Service.web_fetchreturns at most 40,000 characters by default and leaves out link URLs unless the agent setsinclude_links. It always uses a US exit.- Keep the key in an environment variable or your client’s own settings, never in a file you commit or share.