MCP.so
登录

MCP + LangGraph Agent

@hirokiyn

基本信息

分类

推理

传输方式

stdio

作者

hirokiyn

关于 MCP + LangGraph Agent

LangGraph agent tutorial adapted to use MCP servers.

MCP + LangGraph Agent 配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

MCP + LangGraph Agent 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP + LangGraph Agent?

It is a minimal, functional example of an agent powered by LangGraph where tools are implemented using MCP (Model Context Protocol) servers instead of traditional LangChain tools. It is based on the official LangGraph tutorial and is intended as a skeleton for building custom LangGraph agents with MCP tools.

How to use MCP + LangGraph Agent?

Clone the repository, install dependencies using Poetry, and set the Anthropic API key in the .env file. Start the MCP servers (python src/mcp_servers/math_server.py and python src/mcp_servers/weather_server.py), then run poetry run main to launch the agent in interactive mode.

Key features of MCP + LangGraph Agent

  • Integrates LangGraph for managing agent state and message routing.
  • Uses MCP servers to provide access to tools.
  • Includes example MCP servers for math and weather.
  • Provides a command-line interface for interacting with the agent.

Use cases of MCP + LangGraph Agent

  • Building a custom LangGraph agent with MCP-based tools.
  • Experimenting with MCP integration in a LangGraph workflow.
  • Prototyping an interactive CLI agent with math and weather capabilities.
  • Using the project as a skeleton for rapid agent development.

常见问题

1

What does this project demonstrate?

It demonstrates how to integrate MCP servers as tools in a LangGraph agent, using math and weather as example servers.

2

How do I install and run the agent?

Clone the repository, install dependencies with Poetry, set your Anthropic API key in `.env`, start the MCP servers, and run `poetry run main` for interactive mode.

3

Can I change the LLM used by the agent?

Yes, the LLM configuration can be changed in `src/common.py`.

4

How do I configure which MCP servers are used?

The MCP servers are configured in `src/main.py`; you can modify the configuration to add or remove servers, or to change the transport mechanism.

5

What are the example tools included?

The example tools are a math server and a weather server, each providing basic functions like arithmetic and weather data retrieval.

评论

推理 分类下的更多 MCP 服务器