A tool that can give you freedom of using Brave search and content fetching using MCP and Langchan
Project description
Local test
Create venv
uv sync
Install package
uv pip install brave-mcp-langchain
Run MCP server in STDIO mode
uvx brave-mcp-langchain
To run MCP server in SSE mode
uvx brave-mcp-langchain sse 5003
MCP Setting
{
"mcpServers": {
"brave-mcp-langchain": {
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "uvx",
"args": [
"brave-mcp-langchain"
]
}
}
}
Use as Langchain tool
It can also be used as Langchain tool. Try below code to try
import httpx
import asyncio
from langchain.tools import Tool
from brave_mcp_langchain import brave_tool
async def test_search():
result = await brave_tool.search_tool.ainvoke({"query": "LangGraph overview", "max_results": 10})
print(result)
result = await brave_tool.fetch_content_tool.ainvoke({
"url": "https://iamatulsingh.github.io"
})
print(result)
asyncio.run(test_search())
🧠 Inspiration & Attribution
This project, brave-mcp-langchain, was inspired by and partially based on the excellent work in duckduckgo-mcp-server by @nickclyde. That project laid the groundwork for integrating DuckDuckGo search and content fetching into the MCP ecosystem.
While brave-mcp-langchain extends the concept to support Brave Search and LangChain workflows, several architectural ideas and implementation patterns were adapted from duckduckgo-mcp-server, which is licensed under the MIT License.
I'm grateful for the open-source community and contributors who make projects like this possible. If you’re interested in DuckDuckGo-based search tools, definitely check out the original repository!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file brave_mcp_langchain-0.1.1.tar.gz.
File metadata
- Download URL: brave_mcp_langchain-0.1.1.tar.gz
- Upload date:
- Size: 45.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
99fe128692d71baf050b48f04351b36dd3178a858e5302bb4ded39f782decd2e
|
|
| MD5 |
d889cb1149e640bd6365490b7bbb83df
|
|
| BLAKE2b-256 |
0cc368d6b348a156ec40eca0822ea4ce542cf7913666fcfa43f4939a9f4e4fb5
|
File details
Details for the file brave_mcp_langchain-0.1.1-py3-none-any.whl.
File metadata
- Download URL: brave_mcp_langchain-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e8238b502ac05ec1f5c33f306f101edb0f4c0ebab8dc49f50a5ed88c9c93956
|
|
| MD5 |
cf29ab798fa0cf5ce0833a9b55806dbf
|
|
| BLAKE2b-256 |
a0ba65da521de2d674b203431eefda3bdc859c12075ddcfffdcae2f1c697df70
|