Brave Langchain
БесплатноНе проверенEnables Brave Search and web content fetching via MCP, and integrates as LangChain tools for AI agents.
Описание
Enables Brave Search and web content fetching via MCP, and integrates as LangChain tools for AI agents.
README
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. Below is how to validate tool.
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())
Use with langchain example
import asyncio
from langchain.agents import initialize_agent
from langchain.agents.agent_types import AgentType
from langchain_ollama import ChatOllama
from brave_mcp_langchain import brave_tool
llm = ChatOllama(model="llama3.1:8b")
tools = [
brave_tool.search_tool,
brave_tool.fetch_content_tool
]
agent = initialize_agent(
tools=[brave_tool.search_tool, brave_tool.fetch_content_tool],
llm=llm,
agent=AgentType.STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION,
verbose=True
)
async def run_agent_query():
response = await agent.ainvoke(
"Search for 'iamatulsingh' overview, then fetch content from https://iamatulsingh.github.io"
)
print("\nAgent Response:")
print(response)
asyncio.run(run_agent_query())
🧠 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!
Установить Brave Langchain в Claude Desktop, Claude Code, Cursor
unyly install brave-mcp-langchainСтавит в Claude Desktop, Claude Code, Cursor и VS Code — сам разбирается с npx, uvx и сборкой из исходников.
Впервые? Поставь CLI: curl -fsSL https://unyly.org/install | sh
Или настроить вручную
Выполни в терминале:
claude mcp add brave-mcp-langchain -- uvx brave-mcp-langchainFAQ
Brave Langchain MCP бесплатный?
Да, Brave Langchain MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Brave Langchain?
Нет, Brave Langchain работает без API-ключей и переменных окружения.
Brave Langchain — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Brave Langchain в Claude Desktop, Claude Code или Cursor?
Открой Brave Langchain на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Brave Langchain with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
