MCP ExplorerExplorer

Mcp Langgraph Tools

@paulrobelloon 9 months ago
43 MIT
FreeCommunity
AI Systems
#ai#mcp#python3
MCP工具Langraph集成

Overview

What is Mcp Langgraph Tools

mcp_langgraph_tools is a project that demonstrates how to integrate MCP endpoint tools into a Langgraph tool node, consisting of two nodes: ‘agent’ and ‘tool’.

Use cases

Use cases include building AI-driven applications that require access to external search tools, creating data pipelines that utilize multiple MCP servers, and developing prototypes for testing Langgraph integrations.

How to use

To use mcp_langgraph_tools, ensure you have Python 3.11 installed. You can run the project using the command ‘uv run mcp_langgraph_tools’ after setting up the necessary API keys in a .env file.

Key features

Key features include integration with MCP endpoint tools, support for multiple MCP servers, and the ability to utilize Brave Search tools via the MCP Server sample.

Where to use

mcp_langgraph_tools can be used in fields such as AI development, data processing, and any application that requires integration of external tools with Langgraph.

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.

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 - [email protected]

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers