MCP.so
登录

MCP with Langchain Sample Setup

@TaQuangTu

基本信息

分类

AI 与智能体

传输方式

stdio

作者

TaQuangTu

关于 MCP with Langchain Sample Setup

Sample MCP Server & Client setup, compatible with LangChain

MCP with Langchain Sample Setup 配置

暂无标准配置

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

代码仓库

MCP with Langchain Sample Setup 工具

工具列表暂未提供

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

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

概览

What is MCP with Langchain Sample Setup?

MCP with Langchain Sample Setup is a demonstration project that implements the Model Context Protocol (MCP) with Langchain. It includes three sample MCP servers (math, weather, and which_llm_to_use), each exposing one or two functions, and a Streamlit-based MCP client that bridges users with those servers. It is intended for developers exploring MCP and Langchain integration.

How to use MCP with Langchain Sample Setup?

Start each of the three MCP servers in the mcp_servers folder on ports 8000, 8001, and 8002 (e.g., nohup python math_mcp_server.py > math.log 2>&1 &). Then export your OpenAI API key and launch the Streamlit client with streamlit run my_chat_bot_app.py. The web UI will be available on port 8501.

Key features of MCP with Langchain Sample Setup

  • Three sample MCP servers: math, weather, and which_llm_to_use
  • Each server provides one or two functions
  • Streamlit-based web UI as the MCP client
  • Bridges user requests to multiple MCP servers
  • Demonstrates MCP integration with Langchain and OpenAI

Use cases of MCP with Langchain Sample Setup

  • Learning how to set up and run multiple MCP servers concurrently
  • Testing interactions between a chat interface and math, weather, or LLM-selection tools
  • Prototyping applications that combine several MCP services under a single client

常见问题

1

What MCP servers are included?

Three sample servers: `math_mcp_server`, `weather_mcp_server`, and `which_llm_to_use_mcp_server`, each with one or two functions.

2

What ports do the MCP servers use?

They listen on ports 8000, 8001, and 8002 respectively.

3

How do I start the client?

Set the `OPENAI_API_KEY` environment variable and run `streamlit run my_chat_bot_app.py`. The client starts a web UI on port 8501.

4

Do I need an API key?

Yes, an OpenAI API key is required and must be set as the `OPENAI_API_KEY` environment variable.

5

What runtime dependencies are required?

Python is needed to run the servers and client. The project uses Streamlit and the OpenAI library, though exact dependency details are not listed in the README.

评论

AI 与智能体 分类下的更多 MCP 服务器