brave-mcp-langchain
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@brave-mcp-langchainsearch for LangGraph overview and fetch its content"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
brave-mcp-langchain
Create venv
uv syncRelated MCP server: Tagny MCP Server
Install package
uv pip install brave-mcp-langchainRun MCP server in STDIO mode
uvx brave-mcp-langchainTo run MCP server in SSE mode
uvx brave-mcp-langchain sse 5003MCP 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!
Available Tools
2 toolsfetch_contentA
Fetch and parse content from a webpage URL.
Args:
url: The webpage URL to fetch content from
ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior, but it only states it fetches and parses content. It does not mention whether it executes JavaScript, handles errors, follows redirects, or any authentication/rate-limit implications, leaving the agent without behavioral transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the purpose, but includes an 'Args' section listing 'ctx' which is not present in the input schema, adding unnecessary (and possibly confusing) content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple single-parameter tool, the description covers purpose and parameter semantics, but lacks usage guidance and behavioral details that would be expected given no annotations; overall it is minimally adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only defines 'url' as a string with no description; the description compensates by defining 'url' as 'The webpage URL to fetch content from', adding meaning beyond the bare schema. The mention of 'ctx' is not in the schema and may be an implementation detail.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Fetch and parse') and resource ('webpage URL'), clearly distinguishing this content-fetching tool from the sibling 'search' tool which searches rather than fetches a specific URL.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides clear context that this tool fetches a specific webpage URL, but it does not explicitly state when to use it instead of the sibling 'search' tool, nor does it give any exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
searchC
Search Brave and return formatted results.
Args:
query: The search query string
max_results: Maximum number of results to return (default: 10)
ctx: MCP context for logging
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| max_results | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description must fully disclose behavioral traits. It only states it 'return formatted results' and includes a 'ctx' parameter for logging, but does not mention rate limits, authentication, error behavior, or whether it's a read-only operation. The mention of 'ctx' is not in the schema, adding slight confusion.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and front-loaded with the core purpose in the first sentence. It includes an Args list that mirrors the schema, which is somewhat redundant, but overall it remains brief and easy to scan. The extra 'ctx' parameter is a minor blemish.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple search tool with no annotations, the description leaves several gaps: no usage context, no alternatives, no behavioral caveats, and no insight into the output format beyond 'formatted results'. Although an output schema exists (so return values don't need explaining), overall completeness is lacking given the sibling tool and absent annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It provides minimal explanations ('query' is 'The search query string', 'max_results' is 'Maximum number of results to return'), but these add little beyond the schema's existing titles and default value. The description also lists a 'ctx' parameter that is absent from the schema, causing inconsistency.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search Brave and return formatted results.' This uses a specific verb ('search'), resource ('Brave'), and output ('formatted results'). It distinguishes from the sibling tool 'fetch_content' by focusing on searching rather than fetching.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not provide explicit guidance on when to use this tool versus alternatives like fetch_content. It merely describes what the tool does without explaining when to choose it over the sibling. No prerequisites or exclusions are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.2.0- First observed
fetch_content - First observed
search
TDQS
Scored across 2 tools
The two tools are completely distinct: one performs web searches, the other fetches webpage content. There is no overlap or confusion between their purposes.
Both names are verb-based and clear, but 'search' is a single verb while 'fetch_content' follows a verb_noun pattern, showing a minor inconsistency in naming convention.
With only 2 tools, the server feels thin for a search-related service. While these two cover the basic search-and-fetch workflow, the count is on the low end of the borderline range.
The core functionality of searching and fetching content is covered, but there are minor gaps such as lack of search result filtering options or pagination controls. Overall, the surface is adequate for simple search tasks.
Maintenance
Related MCP Connectors
Scrape, crawl and search the web for AI agents via MCP.
Web search, browser automation, scraping, crawling and CAPTCHA solving for AI agents.
Hyperbrowser MCP — wraps the Hyperbrowser AI-agent browsing API
One MCP for the Web. Easily search, crawl, navigate, and extract websites without getting blocked.…
Related MCP Servers
AlicenseAqualityAmaintenanceAn MCP implementation that integrates the Brave Search API, providing comprehensive search capabilities including web, local business, image, video, news searches, and AI-powered summarization.8810,280 npm1,441MIT- AlicenseNot gradedqualityCmaintenanceEnables web browsing capabilities for locally served LLMs through URL text fetching, link extraction, and web search using Brave and DuckDuckGo engines. Designed to enhance LLMs with real-time web access through the MCP protocol.MIT
- AlicenseBqualityDmaintenanceEnables web search capabilities through the Brave Search API, including web search, local POI lookups, and rich search results retrieval for MCP-compatible clients.422 npmMIT
- FlicenseAqualityDmaintenanceEnables Brave Search via MCP, deployed on Railway for seamless integration with AI agents.6-