Back to MCP directory
publicPublicdnsLocal runtime

langchain-mcp-t9h

该项目利用LangChain实现模型上下文协议(MCP),包含Twitter信息获取和ArXiv论文检索两大核心功能。

article

README

🚀 使用LangChain实现模型上下文协议(MCP)

本仓库探索了如何通过LangChain实现模型上下文协议(MCP)。该协议包含两个核心组件,能够帮助用户获取推文和研究论文信息,为特定场景提供丰富的数据支持。

🚀 快速开始

📦 安装指南

安装所需的依赖项:

pip install -r requirements.txt

💻 使用示例

基础用法

要启动MCP服务器,请运行以下命令:

python server_name.py

服务器将在其分配的端口上启动并准备好处理请求。

✨ 主要特性

本项目的MCP包含两个核心组件:

  • Twitter服务器:根据用户查询获取并返回相关的推文。
  • ArXiv服务器:从ArXiv检索相关研究论文,总结内容、作者等信息。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client