Example project of how to integrate MCP endpoint tools into a Langgraph tool node
The graph consists of only 2 nodes, agent
and tool
.
To use this project, make sure you have Python 3.11.
uv is recommended
curl -LsSf https://astral.sh/uv/install.sh | sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
- This example uses the MCP Server sample
@modelcontextprotocol/server-brave-search
to add Brave Search tools. This requires that you havenode
andnpx
installed.
- 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.
uv run mcp_langgraph_tools
- Version 0.1.0:
- Initial release
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Paul Robello - [email protected]