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: packetstream_search runs a Google search, and packetstream_fetch reads a web page as Markdown. Tool calls use your PacketStream API key, the same key as the Search API and the Fetch API.

Before you begin

You need:

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. There is no OAuth and no browser sign-in, so your client must let you set a custom header.

Your client can connect and list the tools without a key. The server checks the key when your agent calls a tool. A call without a valid key is not billed. It returns an error result that tells the agent what is wrong and how to fix it:

  • missing_api_key: the request has no key.
  • invalid_api_key: the header does not hold a PacketStream key. Often the variable meant to hold the key is not set where the client starts, or the configuration still has the YOUR_API_KEY placeholder.
  • unauthorized: the key was revoked or replaced, or it was copied wrongly.

So a client that shows the server as connected has not checked your key. Check your key on its own.

No account or key yet?

  1. Sign up and add funds to your balance.
  2. Create an API key on the MCP page of the dashboard. It is shown once, so copy it when it appears.
  3. Put the key in your client’s configuration, as shown under Connect a client, and restart the client.

If you already have an account but not the key, log in and create a new key on the MCP page. The new key replaces the old one, which stops working at once.

Tools

ToolWhat it doesArgumentsBilled as
packetstream_searchRuns 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
packetstream_fetchReads 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

Listing the tools works without a key, so it does not check the key. This call does. It returns your balance, is free, and does not use a rate-limit token. It reads the key from PACKETSTREAM_API_KEY, set as shown above.

curl -sS https://api.packetstream.io/v1/account \
  -H "Authorization: Bearer $PACKETSTREAM_API_KEY"

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

Billing

  • Each successful packetstream_search call is billed as one search, and each successful packetstream_fetch call as one fetch: $0.0025 each, from your prepaid balance.
  • Failed calls are free, apart from the rare internal_error case described under billing. A call without a valid key is never billed.
  • initialize, ping, server/discover, and tools/list are always free and need no key.
  • The server asks agents to use these tools for every web search and page fetch, in place of their built-in web tools, so an agent can call them 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

  • packetstream_fetch puts page text between <<<PAGE CONTENT: untrusted>>> and <<<END PAGE CONTENT>>>. Agents should treat it as data, never as instructions.
  • packetstream_fetch does 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.
  • packetstream_fetch returns at most 40,000 characters by default and leaves out link URLs unless the agent sets include_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.
Questions? We’re here to help. Talk with our support team about your integration.
Contact support