English
How to integrate LlamaIndex with Bright Data’s The Web MCP server for enhanced AI agent capabilities.
Get your API token
2dceb1aa0***************************
Install LlamaIndex MCP Toolkit
pip install llama-index-tools-mcp
Configure your MCP server
import asyncio from llama_index.tools.mcp import BasicMCPClient async def main(): http_client = BasicMCPClient("https://mcp.brightdata.com/mcp?token=<API_TOKEN>") # List tools tools = await http_client.list_tools() print("Tools:", tools) # Call a tool result = await http_client.call_tool("scrape_as_markdown", {"url":"https://docs.llamaindex.ai/en/stable/examples/tools/mcp/"}) print("Result:", result) asyncio.run(main())
Test it works
Monitor usage
Was this page helpful?