Sponsored by Deepsite.site

MCP Tool Langgraph Integration

Created By
paulrobello10 months ago
MCP Tools Langraph Integration
Content

MCP Tool Langgraph Integration

Description

Example project of how to integrate MCP endpoint tools into a Langgraph tool node

The graph consists of only 2 nodes, agent and tool.

Prerequisites

To use this project, make sure you have Python 3.11.

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

Recommend Clients
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Roo Code (prev. Roo Cline)Roo Code (prev. Roo Cline) gives you a whole dev team of AI agents in your code editor.
Refact.aiOpen-source AI Agent for VS Code and JetBrains that autonomously solves coding tasks end-to-end.
Cherry Studio🍒 Cherry Studio is a desktop client that supports for multiple LLM providers.
MCP PlaygroundCall MCP Server Tools Online
WindsurfThe new purpose-built IDE to harness magic
ChatWiseThe second fastest AI chatbot™
ZedCode at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
MCP ConnectEnables cloud-based AI services to access local Stdio based MCP servers via HTTP requests
CursorThe AI Code Editor
Cline – #1 on OpenRouterAutonomous coding agent right in your IDE, capable of creating/editing files, executing commands, using the browser, and more with your permission every step of the way.
chatmcpChatMCP is an AI chat client implementing the Model Context Protocol (MCP).
HyperChatHyperChat is a Chat client that strives for openness, utilizing APIs from various LLMs to achieve the best Chat experience, as well as implementing productivity tools through the MCP protocol.
LutraLutra is the first MCP compatible client built for everyone
y-cli 🚀A Tiny Terminal Chat App for AI Models with MCP Client Support
VISBOOM
A Sleek AI Assistant & MCP Client5ire is a cross-platform desktop AI assistant, MCP client. It compatible with major service providers, supports local knowledge base and tools via model context protocol servers .
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
DeepChatYour AI Partner on Desktop
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Continue⏩ Create, share, and use custom AI code assistants with our open-source IDE extensions and hub of models, rules, prompts, docs, and other building blocks