This project implements an automated book writing system using AI agents.
- Bright Data is used to scrape data from the web
- Qdrant as the local vector database.
- Cursor IDE as the MCP client.
Get BrightData API Key:
- Go to Bright Data and sign up for an account.
- Select "Proxies & Scraping" and create a new "SERP API"
- Select "Native proxy-based access"
- You will find your username and password there.
- Store it in the .env file.
BRIGHDATA_USERNAME="..."
BRIGHDATA_PASSWORD="..."
Install Dependencies: Ensure you have Python 3.11 or later installed.
pip install mcp qdrant-clientFirst, start a Qdrant docker container as follows (make sure you have downloaded Docker):
docker run -p 6333:6333 -p 6334:6334 \
-v $(pwd)/qdrant_storage:/qdrant/storage:z \
qdrant/qdrantNext, go to the notebook.ipynb file, run the code to create a collection in your vector database.
Finally, set up your local MCP server as follows:
- Go to Cursor settings
- Select MCP
- Add new global MCP server.
In the JSON file, add this:
{
"mcpServers": {
"mcp-rag-app": {
"command": "python",
"args": ["/absolute/path/to/server.py"],
"host": "127.0.0.1",
"port": 8080,
"timeout": 30000
}
}
}Done! You can now interact with your vector database and fallback to web search if needed.
Get a FREE Data Science eBook 📖 with 150+ essential lessons in Data Science when you subscribe to our newsletter! Stay in the loop with the latest tutorials, insights, and exclusive resources. Subscribe now!
Contributions are welcome! Please fork the repository and submit a pull request with your improvements.
