MCP Tool Langgraph Integration
- agent-framework
MCP Tools Langraph Integration
About
What is MCP Tool Langgraph Integration?
MCP Tool Langgraph Integration is an example project demonstrating how to connect MCP (Model Context Protocol) endpoint tools to a Langgraph tool node. It runs as a command-line Python application and is intended for developers building agentic workflows with Langgraph and MCP servers.
How to use MCP Tool Langgraph Integration?
Install Python 3.11 and the uv package manager. Set up a .env file with API keys for Brave Search and your chosen AI provider (default Anthropic). Run uv run mcp_langgraph_tools. To use the multi‑server example, switch to the multi_server branch. You can change the AI provider by editing __main__.py.
Key features of MCP Tool Langgraph Integration
- Integrates MCP endpoint tools into a Langgraph tool node.
- Uses a simple two-node graph: agent and tool.
- Example uses the @modelcontextprotocol/server-brave-search MCP server.
- Supports multiple MCP servers (on the multi_server branch).
- Licensed under the MIT License.
- Written in Python 3.11 with uv for dependency management.
Use cases of MCP Tool Langgraph Integration
- Adding web search capabilities to a Langgraph agent via Brave Search.
- Prototyping MCP‑based tool integration in an AI agent pipeline.
- Building a minimal, extensible foundation for custom MCP server integrations in Langgraph.
FAQ from MCP Tool Langgraph Integration
What does MCP Tool Langgraph Integration do?
It is an example project that shows how to connect MCP server tools (like Brave Search) into a Langgraph agent’s tool node, allowing the agent to call external tools via the MCP protocol.
Which MCP servers are supported?
The default example uses @modelcontextprotocol/server-brave-search. For using multiple MCP servers, see the multi_server branch. You can adapt the code to work with any MCP server.
What AI provider and models can I use?
The default AI provider is Anthropic, but you can change it by editing __main__.py. You will need a corresponding API key.
What are the pricing and licensing terms?
The project is MIT licensed and free to use. You must obtain your own API keys for Brave Search and the AI provider (Brave offers a free tier).
Are there any known limitations?
The main branch supports only a single MCP server at a time. The multi‑server branch is provided as a more advanced example. The project is an example, not a production‑ready application.
Details
- Author
- paulrobello
- GitHub stars
- 43
- Category
- agent-framework
- Repository
- paulrobello/mcp_langgraph_tools
MCP Tool Langgraph Integration
Description
Example project of how to integrate MCP endpoint tools into a Langgraph tool nodeThe graph consists of only 2 nodes, agent and tool.
Prerequisites
To use this project, make sure you have Python 3.11.uv is recommended
Linux and Mac
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
MCP Server requirements
- This example uses the MCP Server sample@modelcontextprotocol/server-brave-search to add Brave Search tools. This requires that you have node and npx installed.
API Keys
- The MCP Server sample used is for Brave Search, you can get a free API key from https://brave.com/search/api/ - You will need and API key for the chosen AI provider which defaults to Anthropic but can be changed by editing the__main__.py file
- Put all api keys in a .env file in the repository root.
From source Usage
uv run mcp_langgraph_tools
Multiple MCP servers at one time
Check the multi_server branch for a more advanced example of how to use multiple MCP servers at once.Whats New
- Version 0.1.0:
- Initial release
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Paul Robello - probello@gmail.com