Docs › Integrations › LlamaIndex
How to add a web search tool to LlamaIndex
LlamaIndex uses the Blopus SDK directly — install the package, pass your key, and the search tool is available to your agent. This page has the exact configuration, where it goes, how to check it worked, and what to do when the tools do not show up.
Before you start
You need a Blopus API key. Create one in the
Blopus console — it is shown once, so store it before closing the
dialog. Keys start with blp_live_. If you do not have an account yet, pick a plan
on the pricing section; the first key is issued immediately.
Everything below bills from the same credit pool: a search costs one credit per block of ten
results, and fetch is billed the same way. See
rate limits and credits for the exact rules.
Set up Blopus in LlamaIndex
Load the Blopus tool spec and hand it to any LlamaIndex agent.
Python
# pip install llama-index-tools-blopus from llama_index.tools.blopus import BlopusToolSpec tools = BlopusToolSpec(api_key="blp_live_...").to_tool_list() agent = FunctionAgent(tools=tools, llm=llm)
MCP
{ "mcpServers": { "blopus": { "url": "https://mcp.blopus.ai", "headers": { "Authorization": "Bearer blp_live_..." } }}}
cURL
curl -X POST https://api.blopus.ai/v1/search \ -H "Authorization: Bearer blp_live_..." \ -H "Content-Type: application/json" \ -d '{"query":"...","count":5,"freshness":"pw"}'
Replace blp_live_... with your own key. Treat it like a password —
anyone holding it can spend your credits. If a key is ever pasted somewhere public, revoke it in
the console and create a new one; revocation takes effect within thirty seconds.
Check that it worked
Restart LlamaIndex after saving the configuration — most clients only read MCP settings at start-up. Then confirm two tools are listed:
search— takes a query, returns ranked web resultsfetch— takes a URL, returns the extracted page text
The quickest end-to-end check is to ask the model something it cannot know from training data — today's date in a news story, or the current version number of a fast-moving package. If it answers with a source link, the connection is live.
If the tools do not appear
- Nothing in the tool list. Almost always a restart: the config is read once at start-up. Quit LlamaIndex fully rather than reloading a window.
- 401 unauthorized. The key is wrong, revoked, or the
Bearerprefix is missing. The header must readAuthorization: Bearer blp_live_.... - 402 payment required. The monthly credit allowance is spent. Usage and remaining credits are in the console; see credits.
- 429 too many requests. You are over the per-minute ceiling for your plan. Back off
and retry — the response carries a
Retry-Aftervalue. - Malformed JSON config. A trailing comma is the usual culprit. Paste the file into a JSON validator before assuming the server is at fault.
Full error reference: API error codes.
Related
- The Blopus MCP server — transport, tools and arguments
- Search endpoint reference — filters, freshness, domains, topics
- All supported clients
- LlamaIndex docs: tools