LangGraph agent tutorial adapted to use MCP servers.
Overview
What is MCP + LangGraph Agent?
MCP + LangGraph Agent is a minimal example of an agent powered by LangGraph, utilizing MCP (Model Context Protocol) servers instead of traditional LangChain tools. It serves as a tutorial for integrating MCP servers as tools in a LangGraph agent.
How to use MCP + LangGraph Agent?
To use the MCP + LangGraph Agent, clone the repository, install dependencies using Poetry, set up the Anthropic API key, start the MCP servers, and run the agent in interactive mode to enter prompts.
Key features of MCP + LangGraph Agent?
- Integrates LangGraph for managing agent state and message routing.
- Uses MCP servers for tool access, including math and weather servers.
- Provides a command-line interface for user interaction.
Use cases of MCP + LangGraph Agent?
- Performing mathematical calculations through the math server.
- Fetching weather information using the weather server.
- Building custom agents with integrated MCP tools.
FAQ from MCP + LangGraph Agent?
- Can I customize the MCP servers?
Yes! You can modify the configuration in
src/main.pyto add or remove servers.
- Is there a graphical interface for the agent?
No, the agent currently operates through a command-line interface.
- What programming language is used?
The project is implemented in Python.