BL

braincrew-lab/langgraph-mcp-agents

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

719 stars 223 forks 质量 46 趋势 0

基于LangGraph的ReAct代理,集成模型上下文协议(MCP)。一个Streamlit网页界面,用于动态配置、部署和与能够访问......

概览

LangChain-MCP-适配器是一套工具包,使AI代理能够通过模型上下文协议(MCP)与外部工具和数据源交互。该项目为部署ReAct代理提供了用户友好的界面,通过MCP工具访问各种数据源和API。 - : 一个用户友好的网页界面,用于与 MCP 工具交互 LangGraph ReAct 代理 - : 通过界面添加、移除和配置 MCP 工具(支持 Smithery JSON 格式)。此操作动态完成,无需重启应用程序 - : 实时查看代理响应和工具调用 - : 跟踪和管理与代理的对话 模型上下文协议(MCP)由三个主要组成部分组成: 1. :通过MCP访问数据的程序,如Claude Desktop、IDE或LangChain/LangGraph。 2. : 一个与服务器保持1:1连接的协议客户端,作为主机与服务器之间的中介。 3.

概述(AI 翻译)

项目概述

LangChain-MCP-Adapters 是由 LangChain AI 提供的工具包,使 AI 代理能够通过模型上下文协议(MCP)与外部工具和数据源交互。该项目为部署可通过 MCP 工具访问各种数据源和 API 的 ReAct 代理提供了用户友好的界面。

特色

  • Streamlit 界面:一个用户友好的网页界面,用于与 MCP 工具交互 LangGraph ReAct Agent
  • 工具管理:通过UI添加、移除和配置MCP工具(支持Smithery JSON格式)。此操作动态完成,无需重启应用程序
  • 流式响应:实时查看代理响应和工具调用
  • 对话记录:跟踪和管理与客服的对话

MCP架构

模型上下文协议(MCP)由三个主要组成部分组成:

  1. MCP Host:通过 MCP 访问数据的程序,如 Claude Desktop、IDE 或 LangChain/LangGraph。

  2. MCP 客户端:一种协议客户端,与服务器保持1:1连接,作为主机与服务器之间的中介。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

LangGraph Agents + MCP

Project Overview

LangChain-MCP-Adapters is a toolkit provided by LangChain AI that enables AI agents to interact with external tools and data sources through the Model Context Protocol (MCP). This project provides a user-friendly interface for deploying ReAct agents that can access various data sources and APIs through MCP tools.

Features

  • Streamlit Interface: A user-friendly web interface for interacting with LangGraph ReAct Agent with MCP tools
  • Tool Management: Add, remove, and configure MCP tools through the UI (Smithery JSON format supported). This is done dynamically without restarting the application
  • Streaming Responses: View agent responses and tool calls in real-time
  • Conversation History: Track and manage conversations with the agent

MCP Architecture

The Model Context Protocol (MCP) consists of three main components:

  1. MCP Host: Programs seeking to access data through MCP, such as Claude Desktop, IDEs, or LangChain/LangGraph.

  2. MCP Client: A protocol client that maintains a 1:1 connection with the server, acting as an intermediary between the host and server.

  3. MCP Server: A lightweight program that exposes specific functionalities through a standardized model context protocol, serving as the primary data source.

Quick Start with Docker

You can easily run this project using Docker without setting up a local Python environment.

Requirements (Docker Desktop)

Install Docker Desktop from the link below:

Run with Docker Compose

  1. Navigate to the dockers directory
cd dockers
  1. Create a .env file with your API keys in the project root directory.
cp .env.example .env

Enter your obtained API keys in the .env file.

(Note) Not all API keys are required. Only enter the ones you need.

  • ANTHROPIC_API_KEY: If you enter an Anthropic API key, you can use “claude-3-7-sonnet-latest”, “claude-3-5-sonnet-latest”, “claude-3-haiku-latest” models.
  • OPENAI_API_KEY: If you enter an OpenAI API key, you can use “gpt-4o”, “gpt-4o-mini” models.
  • LANGSMITH_API_KEY: If you enter a LangSmith API key, you can use LangSmith tracing.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →