Documentation Index
Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt
Use this file to discover all available pages before exploring further.
托管 MCP
安装 LlamaIndex MCP 工具包
pip install llama-index-tools-mcp
配置 MCP 服务器
import asyncio
from llama_index.tools.mcp import BasicMCPClient
async def main():
http_client = BasicMCPClient("https://mcp.brightdata.com/mcp?token=<API_TOKEN>")
# 列出工具
tools = await http_client.list_tools()
print("工具列表:", tools)
# 调用工具
result = await http_client.call_tool("scrape_as_markdown", {"url":"https://docs.llamaindex.ai/en/stable/examples/tools/mcp/"})
print("结果:", result)
asyncio.run(main())
测试功能
- 运行 LlamaIndex 脚本并手动调用工具
- 您应能看到以 Markdown 格式返回的指定 URL 内容
监控使用情况
- 在 Bright Data 控制台的 我的区域 查看 API 使用情况
- 免费层包含每月 5,000 个请求