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 とエージェント」の他のコンテンツ